From 284492cfecbb3a929680355289f7e9097508a7e9 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 16 Sep 2013 21:20:36 +1000 Subject: [PATCH] AP_GPS: fixed an initialisation problem with GPS drivers before the first full packet arrives we could report uninitialised values for groundspeed and heading --- libraries/AP_GPS/GPS.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libraries/AP_GPS/GPS.cpp b/libraries/AP_GPS/GPS.cpp index d1bbbdb1f6..2b213f34ad 100644 --- a/libraries/AP_GPS/GPS.cpp +++ b/libraries/AP_GPS/GPS.cpp @@ -21,6 +21,14 @@ extern const AP_HAL::HAL& hal; GPS::GPS(void) : // ensure all the inherited fields are zeroed time(0), + date(0), + latitude(0), + longitude(0), + altitude_cm(0), + ground_speed_cm(0), + ground_course_cd(0), + speed_3d_cm(0), + hdop(0), num_sats(0), new_data(false), fix(FIX_NONE),