particle-iot / ElectronAssetTracker

Library for the Electron Asset Tracker!
Apache License 2.0
53 stars 84 forks source link

gpsFix does not work correctly. #27

Open jasonwray opened 7 years ago

jasonwray commented 7 years ago

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 commented 7 years ago

It is worth noting that getFixQuality does work as expected.