Open jasonwray opened 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; }
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.
It is worth noting that getFixQuality does work as expected.
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.