From 19ba07a3f996c80e922462f0f30b53079b27a150 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 23 Oct 2013 22:14:33 +1100 Subject: [PATCH] AP_InertialNav: updates for new GPS API --- libraries/AP_InertialNav/AP_InertialNav.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/AP_InertialNav/AP_InertialNav.cpp b/libraries/AP_InertialNav/AP_InertialNav.cpp index d1ed648aa6..3cf1b9dac0 100644 --- a/libraries/AP_InertialNav/AP_InertialNav.cpp +++ b/libraries/AP_InertialNav/AP_InertialNav.cpp @@ -125,13 +125,13 @@ void AP_InertialNav::check_gps() uint32_t now = hal.scheduler->millis(); // compare gps time to previous reading - if( _gps != NULL && _gps->time != _gps_last_time ) { + if( _gps != NULL && _gps->last_fix_time != _gps_last_time ) { // call position correction method correct_with_gps(now, _gps->longitude, _gps->latitude); // record gps time and system time of this update - _gps_last_time = _gps->time; + _gps_last_time = _gps->last_fix_time; }else{ // clear position error if GPS updates stop arriving if (now - _gps_last_update > AP_INTERTIALNAV_GPS_TIMEOUT_MS) { @@ -414,4 +414,4 @@ void AP_InertialNav::set_position_xy(float pos_x, float pos_y) _historic_xy_counter = 0; _hist_position_estimate_x.add(_position_base.x); _hist_position_estimate_y.add(_position_base.y); -} \ No newline at end of file +}