platform-aceinna_imu icon indicating copy to clipboard operation
platform-aceinna_imu copied to clipboard

Example, NovAtelGPS, _parseBestVelB_Fast Race Condition

Open jgladen opened this issue 4 years ago • 0 comments

in function _parseBestVelB_Fast

from file: platform-aceinna_imu/examples/OpenIMU300ZI/IMU/lib/Core/GPS/src/processNovAtelGPS.c

when solution status Non-ZERO (FIX WAS BAD) gpsFixType is set to potential non-zero this is inconsitant with bad fix

when solution status == ZERO (no problems, Fix is Good) gpsFixType is set to value zero (preventing fix use)

this was hard to find because of a race condition with the order of the BESTPOSB BESTVELB messages from Novatel hardware if BESTPOSB is processed after BESTVELB then gpsFixType is overwriten correctly if BESTVELB is processed after BESTPOSB then gpsFixType is overwriten in error

jgladen avatar May 18 '20 22:05 jgladen