Skip to content

Commit

Permalink
Plane: optimise get-posvelaccel-target usage
Browse files Browse the repository at this point in the history
  • Loading branch information
rmackay9 committed Sep 17, 2024
1 parent f9de2c5 commit 380518b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ArduPlane/GCS_Mavlink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ void GCS_MAVLINK_Plane::send_nav_controller_output() const
const Vector3f &targets = quadplane.attitude_control->get_att_target_euler_cd();

const Vector2f& curr_pos = quadplane.inertial_nav.get_position_xy_cm();
const Vector2f& target_pos = quadplane.pos_control->get_pos_target_cm().xy().tofloat();
const Vector2f target_pos = quadplane.pos_control->get_pos_target_cm().xy().tofloat();
const Vector2f error = (target_pos - curr_pos) * 0.01;

mavlink_msg_nav_controller_output_send(
Expand Down

0 comments on commit 380518b

Please sign in to comment.