Skip to content

Commit

Permalink
Don't send anybody to null island ever (#3308)
Browse files Browse the repository at this point in the history
  • Loading branch information
thebentern authored Feb 28, 2024
1 parent 6acc637 commit bf88773
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/modules/PositionModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,11 @@ meshtastic_MeshPacket *PositionModule::allocReply()
LOG_INFO("Providing time to mesh %u\n", p.time);
}

if (p.latitude_i == 0 && p.longitude_i == 0) {
LOG_WARN("Skipping position send because lat/lon are zero!\n");
return nullptr;
}

LOG_INFO("Position reply: time=%i, latI=%i, lonI=%i\n", p.time, p.latitude_i, p.longitude_i);

// TAK Tracker devices should send their position in a TAK packet over the ATAK port
Expand Down

1 comment on commit bf88773

@anm
Copy link

@anm anm commented on bf88773 Mar 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is wrong. There should be proper distinction between unknown position and zeros. I am planning an expedition to null island and don't want my radios to fail there.

Please sign in to comment.