mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-10-06 19:00:27 +08:00
APM_Control: do not fetch unused position reset delta
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
committed by
Peter Barker
co-authored by
Claude Fable 5
parent
20e0978033
commit
5fa64dcd9b
@@ -406,16 +406,14 @@ void AR_PosControl::write_log()
|
||||
/// initialise ekf xy position reset check
|
||||
void AR_PosControl::init_ekf_xy_reset()
|
||||
{
|
||||
Vector2f pos_shift;
|
||||
_ekf_xy_reset_count = AP::ahrs().get_position_NE_reset_count(pos_shift);
|
||||
_ekf_xy_reset_count = AP::ahrs().get_position_NE_reset_count();
|
||||
}
|
||||
|
||||
/// handle_ekf_xy_reset - check for ekf position reset and adjust loiter or brake target position
|
||||
void AR_PosControl::handle_ekf_xy_reset()
|
||||
{
|
||||
// check for position shift
|
||||
Vector2f pos_shift;
|
||||
const uint16_t reset_count = AP::ahrs().get_position_NE_reset_count(pos_shift);
|
||||
// check for position reset
|
||||
const uint16_t reset_count = AP::ahrs().get_position_NE_reset_count();
|
||||
if (reset_count != _ekf_xy_reset_count) {
|
||||
Vector2p pos_ne_m;
|
||||
if (!AP::ahrs().get_relative_position_NE_origin(pos_ne_m)) {
|
||||
|
||||
Reference in New Issue
Block a user