ElectronAssetTracker icon indicating copy to clipboard operation
ElectronAssetTracker copied to clipboard

gpsFix does not work correctly.

Open jasonwray opened this issue 7 years ago • 1 comments

gpsFix will return true as long as a fix was established once.

Current code as of v.10: bool AssetTracker::gpsFix() { if ((gps.latitude == 0.0) || (gps.longitude == 0.0)){ return false; } else { return true; }

If a fix is lost, gps.latitude and gps.longitude return their previous values, so this logic will only ever work upon powerup.

jasonwray avatar Apr 09 '17 06:04 jasonwray

It is worth noting that getFixQuality does work as expected.

jasonwray avatar Apr 09 '17 08:04 jasonwray