on initial powerup GPS generates a fake zero alt report (before lock)
This commit is contained in:
parent
1f01b71d4a
commit
e1189839fe
@ -62,7 +62,8 @@ void buildPacket(uint8_t txBuffer[]); // needed for platformio
|
|||||||
*/
|
*/
|
||||||
bool trySend() {
|
bool trySend() {
|
||||||
packetSent = false;
|
packetSent = false;
|
||||||
if (0 < gps_hdop() && gps_hdop() < 50 && gps_latitude() != 0 && gps_longitude() != 0)
|
// We also wait for altitude being not exactly zero, because the GPS chip generates a bogus 0 alt report when first powered on
|
||||||
|
if (0 < gps_hdop() && gps_hdop() < 50 && gps_latitude() != 0 && gps_longitude() != 0 && gps_altitude() != 0)
|
||||||
{
|
{
|
||||||
char buffer[40];
|
char buffer[40];
|
||||||
snprintf(buffer, sizeof(buffer), "Latitude: %10.6f\n", gps_latitude());
|
snprintf(buffer, sizeof(buffer), "Latitude: %10.6f\n", gps_latitude());
|
||||||
|
Loading…
Reference in New Issue
Block a user