diff --git a/src/GPSfix.h b/src/GPSfix.h index 8c456e7..2b750e4 100644 --- a/src/GPSfix.h +++ b/src/GPSfix.h @@ -160,6 +160,8 @@ class gps_fix CONST_CLASS_DATA uint32_t M_PER_NMI = 1852; uint32_t speed_metersph() const { return (spd.whole * M_PER_NMI) + (spd.frac * M_PER_NMI)/1000; }; + + uint32_t speed_metersps() const { return ((spd.whole * M_PER_NMI) + (spd.frac * M_PER_NMI)/1000 ) / 3600; }; CONST_CLASS_DATA float MI_PER_NMI = 1.150779; float speed_mph() const { return speed() * MI_PER_NMI; }; @@ -588,4 +590,4 @@ class gps_fix } NEOGPS_PACKED; -#endif \ No newline at end of file +#endif