From 42181ee7c826301a4d25b15188a3b255bfd6896b Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 14 Jul 2017 15:00:55 +1000 Subject: [PATCH] HAL_SITL: use SIM_GPS_LOCKTIME --- libraries/AP_HAL_SITL/sitl_gps.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libraries/AP_HAL_SITL/sitl_gps.cpp b/libraries/AP_HAL_SITL/sitl_gps.cpp index 3c9c9e8ba2..1900c4ce2b 100644 --- a/libraries/AP_HAL_SITL/sitl_gps.cpp +++ b/libraries/AP_HAL_SITL/sitl_gps.cpp @@ -1122,6 +1122,11 @@ void SITL_State::_update_gps(double latitude, double longitude, float altitude, struct gps_data d; char c; + // simulate delayed lock times + if (AP_HAL::millis() < _sitl->gps_lock_time*1000UL) { + have_lock = false; + } + //Capture current position as basestation location for if (!_gps_has_basestation_position) { if (have_lock) {