1

I'm building a small yacht racing app to measure my speed upwind, where the speed is relatively low, in the 6-10 knot range, and where the inherent GPS positional error is causing significant fluctuations in reported speed (which is why I'm going to this effort instead of using a hand-held GPS unit).
So, I'm trying to smooth out the errors by calculating the speed over longer periods of 5 and 10 calls to the onNmeaReceived event (which occur by default at 1000 ms), using the NMEA lat/lon and time from the $GPRMC sentence.

When comparing the NMEA reported speed to the speed computed since the previous event I find they are significantly different, so I'm wondering how the NMEA speed provided in the $GPRMC sentence is computed? Possible answers could be

  • Deduced from GPS Doppler speed ?
  • calculated as distance/time over the previous second?
  • Or something else....?

The documentation is entirely silent on this matter.

Using Android 4.0.3 Samsung SGS 11

Sailor Al
  • 797
  • 1
  • 7
  • 20
  • 1
    I am prety sure that this info would come straight from the GPS chip. So it would change from device to device. You seam to have a good handle on how it could be calc.ed at this level tho. – pvyParts Jan 22 '13 at 05:47
  • Thanks for your input, but that's just my question. I'm trying to find out if the speed is reported by the chip or is it calculated in the OS. – Sailor Al Jan 23 '13 at 21:18

1 Answers1

0

speed in GPS comes from Doppler Effect, which is much more accurate than the position itself. ( this works only when the device is moving, the faster, the better) Determing the speed from location change related to time, does work for GPS only for higher speeds. (> 10 km/h).

Same applies four "course" (heading).

These values always come from the GPS chip, although hardly documented on API side.

averaging over the last x calls is a bit to simple, it should be over the last x seconds. if you dont get a position, you still have to close the averge window. when the device stands still, some devices do not report any position, so you cant wait to get exactly x events.

AlexWien
  • 28,470
  • 6
  • 53
  • 83
  • 1
    Hi, thanks for your input. As you know, I'm aware that the GPS can deduce the speed/direction from the Doppler Effect, but since the GPS is separated from me (the java coder) by two layers of software: 1) the GPS firmware and 2) Android itself, I don't know what is being reported to me in the NMEA sentence or the location object. So, I'm wondering if your knowledge is based on "inside information" or, like mine, on general reading and an interest in the technology? – Sailor Al Apr 22 '13 at 05:42
  • my knowledge is based, on the interfaces that all GPS chips provide. On a Smartphone GPS is the only way to reliably measure speed. Theretically on low speeds there could be additonial support by the acceleration sensor (like in ios Mode CllLocationbestForNavigation) – AlexWien Apr 22 '13 at 17:21
  • @AlexWien I have issues with receiving `GPGGA` and `GPRMC` while listening for NMEA sentences https://stackoverflow.com/questions/63917764/gpgga-and-gprmc-sentences-are-not-received-in-onnmeamessage maybe you can help me with this? – Viktor Apoyan Sep 22 '20 at 08:20