mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-21 23:33:57 -04:00
Copter: integrate init_loiter_target name change
This commit is contained in:
parent
597d5227f5
commit
d5a0ca4f3c
@ -252,7 +252,7 @@ static void auto_land_start(const Vector3f& destination)
|
||||
auto_mode = Auto_Land;
|
||||
|
||||
// initialise loiter target destination
|
||||
wp_nav.set_loiter_target(destination);
|
||||
wp_nav.init_loiter_target(destination);
|
||||
|
||||
// initialise altitude target to stopping point
|
||||
pos_control.set_target_to_stopping_point_z();
|
||||
|
@ -399,7 +399,7 @@ static void hybrid_run()
|
||||
hybrid.pitch_mode = HYBRID_BRAKE_TO_LOITER;
|
||||
hybrid.brake_to_loiter_timer = HYBRID_BRAKE_TO_LOITER_TIMER;
|
||||
// init loiter controller
|
||||
wp_nav.set_loiter_target(inertial_nav.get_position(), hybrid.loiter_reset_I); // (false) to avoid I_term reset. In original code, velocity(0,0,0) was used instead of current velocity: wp_nav.init_loiter_target(inertial_nav.get_position(), Vector3f(0,0,0));
|
||||
wp_nav.init_loiter_target(inertial_nav.get_position(), hybrid.loiter_reset_I); // (false) to avoid I_term reset. In original code, velocity(0,0,0) was used instead of current velocity: wp_nav.init_loiter_target(inertial_nav.get_position(), Vector3f(0,0,0));
|
||||
// at this stage, we are going to run update_loiter that will reset I_term once. From now, we ensure next time that we will enter loiter and update it, I_term won't be reset anymore
|
||||
hybrid.loiter_reset_I = false;
|
||||
// set delay to start of wind compensation estimate updates
|
||||
|
@ -13,7 +13,7 @@ static bool land_init(bool ignore_checks)
|
||||
// set target to stopping point
|
||||
Vector3f stopping_point;
|
||||
wp_nav.get_loiter_stopping_point_xy(stopping_point);
|
||||
wp_nav.set_loiter_target(stopping_point);
|
||||
wp_nav.init_loiter_target(stopping_point);
|
||||
}
|
||||
|
||||
// initialize vertical speeds and leash lengths
|
||||
|
@ -236,7 +236,7 @@ static void rtl_descent_start()
|
||||
rtl_state_complete = false;
|
||||
|
||||
// Set wp navigation target to above home
|
||||
wp_nav.set_loiter_target(wp_nav.get_wp_destination());
|
||||
wp_nav.init_loiter_target(wp_nav.get_wp_destination());
|
||||
|
||||
// initialise altitude target to stopping point
|
||||
pos_control.set_target_to_stopping_point_z();
|
||||
@ -295,7 +295,7 @@ static void rtl_land_start()
|
||||
rtl_state_complete = false;
|
||||
|
||||
// Set wp navigation target to above home
|
||||
wp_nav.set_loiter_target(wp_nav.get_wp_destination());
|
||||
wp_nav.init_loiter_target(wp_nav.get_wp_destination());
|
||||
|
||||
// initialise altitude target to stopping point
|
||||
pos_control.set_target_to_stopping_point_z();
|
||||
|
Loading…
Reference in New Issue
Block a user