Get speed & heading from NMEA RMC sentences
Submitted by Fabrice Bellet
It may be more interesting to use data from $GPRMC NMEA sentences to obtain speed directly from GPS output, instead of processing it based on two consecutive location updates : http://aprs.gids.nl/nmea/#rmc (speed over ground, knots).
The rationale is that NMEA updates from ModemManager over DBUS are scheduled every 30 seconds, even if the NMEA stream from hardware is updated more frequently. In such case, processing information obtained from previous location will provide an average speed over the last 30 secs, while $GPRMC data may provide an instantaneous speed every 30 secs.