From 3ce7e4b322394cc920069fcdca60d560937930b4 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 20 Feb 2017 19:43:31 +1100 Subject: [PATCH] AP_GPS: fixed fake uBlox with PVT message support --- libraries/AP_GPS/AP_GPS_UBLOX.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/libraries/AP_GPS/AP_GPS_UBLOX.cpp b/libraries/AP_GPS/AP_GPS_UBLOX.cpp index 02429d3783..24cbc0b262 100644 --- a/libraries/AP_GPS/AP_GPS_UBLOX.cpp +++ b/libraries/AP_GPS/AP_GPS_UBLOX.cpp @@ -1000,6 +1000,20 @@ AP_GPS_UBLOX::_parse_gps(void) // time state.time_week_ms = _buffer.pvt.itow; +#if UBLOX_FAKE_3DLOCK + state.location.lng = 1491652300L; + state.location.lat = -353632610L; + state.location.alt = 58400; + state.vertical_accuracy = 0; + state.horizontal_accuracy = 0; + state.status = AP_GPS::GPS_OK_FIX_3D; + state.num_sats = 10; + state.time_week = 1721; + state.time_week_ms = AP_HAL::millis() + 3*60*60*1000 + 37000; + state.last_gps_time_ms = AP_HAL::millis(); + state.hdop = 130; + next_fix = state.status; +#endif break; case MSG_VELNED: Debug("MSG_VELNED");