From 2f18d1de73bf900b45b1b8350a3c6ffedebd5b55 Mon Sep 17 00:00:00 2001 From: murata Date: Tue, 4 Oct 2016 20:39:30 +0900 Subject: [PATCH] Plane: To add a judgment of 0 degrees longitude. --- ArduPlane/ArduPlane.cpp | 2 +- ArduPlane/navigation.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ArduPlane/ArduPlane.cpp b/ArduPlane/ArduPlane.cpp index 6e822f6458..271e912058 100644 --- a/ArduPlane/ArduPlane.cpp +++ b/ArduPlane/ArduPlane.cpp @@ -449,7 +449,7 @@ void Plane::update_GPS_10Hz(void) // We countdown N number of good GPS fixes // so that the altitude is more accurate // ------------------------------------- - if (current_loc.lat == 0) { + if (current_loc.lat == 0 && current_loc.lng == 0) { ground_start_count = 5; } else { diff --git a/ArduPlane/navigation.cpp b/ArduPlane/navigation.cpp index 776de4b08b..1f006444a1 100644 --- a/ArduPlane/navigation.cpp +++ b/ArduPlane/navigation.cpp @@ -63,7 +63,7 @@ void Plane::navigate() return; } - if (next_WP_loc.lat == 0) { + if (next_WP_loc.lat == 0 && next_WP_loc.lng == 0) { return; }