File tree Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ void loop() {
39
39
40
40
Serial.print (" Ground speed: " );
41
41
Serial.print (GPS.speed ());
42
- Serial.println (" knots " );
42
+ Serial.println (" km/h " );
43
43
44
44
Serial.print (" Number of satellites: " );
45
45
Serial.println (GPS.satellites ());
Original file line number Diff line number Diff line change @@ -95,7 +95,8 @@ float GPSClass::longitude()
95
95
96
96
float GPSClass::speed ()
97
97
{
98
- return _speed;
98
+ // convert speed from knots to kph
99
+ return _speed * 1.852 ;
99
100
}
100
101
101
102
float GPSClass::course ()
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ class GPSClass {
34
34
35
35
float latitude ();
36
36
float longitude ();
37
- float speed (); // Speed over the ground in knots
37
+ float speed (); // Speed over the ground in kph
38
38
float course (); // Track angle in degrees
39
39
float variation (); // Magnetic Variation
40
40
float altitude ();
You can’t perform that action at this time.
0 commit comments