mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-06 05:21:36 +08:00
fixed code style in standard.cpp
This commit is contained in:
committed by
Lorenz Meier
parent
ac9a81c0c7
commit
9ec9210a08
@@ -312,10 +312,11 @@ void Standard::update_mc_state()
|
|||||||
matrix::Dcmf R_yaw = matrix::Eulerf(0.0f, 0.0f, -euler(2));
|
matrix::Dcmf R_yaw = matrix::Eulerf(0.0f, 0.0f, -euler(2));
|
||||||
body_z_sp = R_yaw * body_z_sp;
|
body_z_sp = R_yaw * body_z_sp;
|
||||||
body_z_sp.normalize();
|
body_z_sp.normalize();
|
||||||
|
|
||||||
// calculate the desired pitch seen in the heading frame
|
// calculate the desired pitch seen in the heading frame
|
||||||
// this value corresponds to the amount the vehicle would try to pitch forward
|
// this value corresponds to the amount the vehicle would try to pitch forward
|
||||||
float pitch_forward = asinf(body_z_sp(0));
|
float pitch_forward = asinf(body_z_sp(0));
|
||||||
|
|
||||||
// only allow pitching forward up to threshold, the rest of the desired
|
// only allow pitching forward up to threshold, the rest of the desired
|
||||||
// forward acceleration will be compensated by the pusher
|
// forward acceleration will be compensated by the pusher
|
||||||
if (pitch_forward < -_params_standard.down_pitch_max) {
|
if (pitch_forward < -_params_standard.down_pitch_max) {
|
||||||
|
|||||||
Reference in New Issue
Block a user