[Ovmsdev] GPS location glitch (flatbed theft false alert)

Craig Leres leres at xse.com
Thu Jul 1 01:39:07 HKT 2021


On 6/30/21 1:05 AM, Michael Balzer wrote:
>> Another (possibly far fetched) idea I had was is it possible we' 
>> seeing corruption transferring the gps location from the simcom to the 
>> esp32? A race condition where the latitude or the longitude gets 
>> clobbered while reading it? I don't have a good idea of what other 
>> symptoms that kind of problem would have.
> 
> Actually… not far fetched at all, as we continuously see multiplex frame 
> errors in the logs -- see my previous posts on this. We don't have flow 
> control on the ESP-SIMCOM serial line, and the handler may not catch all 
> losses.
> 
> You can test that theory by enabling the verbose log on "gsm-nmea". Be 
> aware that's a lot of log messages.
> 
> Better option: I already do some consistency checks in 
> GsmNMEA::IncomingLine(), but I didn't implement the NMEA checksum. You 
> might give that a try first.

Ooooh NMEA... Yeah, if we're getting errors there I can guess where the 
0.0's are coming from; gps2latlon() uses atof() so if the field it tries 
to parse is empty or is a non-numeric, it'll return 0.0.

I'll spend some time looking at that module, at a minimum implementing 
the checksum is worth doing.

		Craig


More information about the OvmsDev mailing list