Skip to content

Commit 1fb2529

Browse files
committed
keep in sync with master
1 parent fe2d78c commit 1fb2529

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/modules/fw_pos_control_l1/FixedwingPositionControl.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1505,16 +1505,19 @@ FixedwingPositionControl::control_auto_takeoff(const hrt_abstime &now, const flo
15051505
* Update navigation: _autogyro_takeoff returns the start WP according to mode and phase.
15061506
* If we use the navigator heading or not is decided later.
15071507
*/
1508+
Vector2f prev_wp_local = _global_local_proj_ref.project(_runway_takeoff.getStartWP()(0),
1509+
_runway_takeoff.getStartWP()(1));
15081510

15091511
if (_param_fw_use_npfg.get()) {
15101512
_npfg.setAirspeedNom(target_airspeed * _eas2tas);
15111513
_npfg.setAirspeedMax(_param_fw_airspd_max.get() * _eas2tas);
1512-
_npfg.navigateWaypoints(_autogyro_takeoff.getStartWP(), curr_wp, curr_pos, ground_speed, _wind_vel);
1514+
_npfg.navigateWaypoints(prev_wp_local, curr_wp_local, curr_pos_local, ground_speed, _wind_vel);
1515+
15131516
_att_sp.roll_body = _autogyro_takeoff.getRoll(_npfg.getRollSetpoint());
15141517
target_airspeed = _npfg.getAirspeedRef() / _eas2tas;
15151518

15161519
} else {
1517-
_l1_control.navigate_waypoints(_runway_takeoff.getStartWP(), curr_wp, curr_pos, ground_speed);
1520+
_l1_control.navigate_waypoints(prev_wp_local, curr_wp_local, curr_pos_local, ground_speed);
15181521
_att_sp.roll_body = _autogyro_takeoff.getRoll(_l1_control.get_roll_setpoint());
15191522
}
15201523

0 commit comments

Comments
 (0)