Browse Source

Rover: update current_loc in update_ahrs

this ensures the current_loc is updated before any of the flight mode code runs
mission-4.1.18
Randy Mackay 7 years ago
parent
commit
cc53b9c39d
  1. 4
      APMrover2/APMrover2.cpp

4
APMrover2/APMrover2.cpp

@ -159,6 +159,9 @@ void Rover::ahrs_update() @@ -159,6 +159,9 @@ void Rover::ahrs_update()
ahrs.update();
// update position
have_position = ahrs.get_position(current_loc);
// update home from EKF if necessary
update_home_from_EKF();
@ -303,7 +306,6 @@ void Rover::one_second_loop(void) @@ -303,7 +306,6 @@ void Rover::one_second_loop(void)
void Rover::update_GPS_10Hz(void)
{
have_position = ahrs.get_position(current_loc);
if (gps.last_message_time_ms() != last_gps_msg_ms) {
last_gps_msg_ms = gps.last_message_time_ms();

Loading…
Cancel
Save