Skip to content

Commit

Permalink
Copter: Guided Angle: Initialize yaw to current yaw.
Browse files Browse the repository at this point in the history
  • Loading branch information
lthall committed Mar 5, 2024
1 parent 2d5e6a5 commit d130bc9
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions ArduCopter/mode_guided.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -313,14 +313,11 @@ void ModeGuided::angle_control_start()

// initialise targets
guided_angle_state.update_time_ms = millis();
guided_angle_state.attitude_quat.initialise();
guided_angle_state.attitude_quat.from_euler(Vector3f(0.0, 0.0, attitude_control->get_att_target_euler_rad().z));
guided_angle_state.ang_vel.zero();
guided_angle_state.climb_rate_cms = 0.0f;
guided_angle_state.yaw_rate_cds = 0.0f;
guided_angle_state.use_yaw_rate = false;

// pilot always controls yaw
auto_yaw.set_mode(AutoYaw::Mode::HOLD);
}

// set_destination - sets guided mode's target destination
Expand Down

0 comments on commit d130bc9

Please sign in to comment.