Arduino_MKRGPS - speed()

Read the ground speed of the GPS.

Syntax

GPS.speed()

Parameters

None.

Returns

GPS ground speed in km/h.

Example

// Check if there is new GPS data available
if (GPS.available()) {
    // Read GPS data
    float speed = GPS.speed();

    // ...

    // Print GPS data
    Serial.print("Ground speed: ");
    Serial.print(speed);
    Serial.println(" km/h");
}

See also