mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-24 03:13:34 +08:00
added min saturation for airspeed scaling
This commit is contained in:
+1
-1
Submodule Tools/sitl_gazebo updated: a3eef9d3a1...59a34c17ff
@@ -1112,7 +1112,7 @@ FixedwingPositionINDIControl::_compute_NDI_stage_2(Vector3f ctrl)
|
|||||||
// compute velocity in body frame
|
// compute velocity in body frame
|
||||||
Dcmf R_ib(_att);
|
Dcmf R_ib(_att);
|
||||||
Vector3f vel_body = R_ib.transpose()*_vel;
|
Vector3f vel_body = R_ib.transpose()*_vel;
|
||||||
float q = 0.5f*sqrtf(vel_body*vel_body)*vel_body(0); // dynamic pressure
|
float q = fmaxf(0.5f*sqrtf(vel_body*vel_body)*vel_body(0), 0.5f*5.f*5.f); // dynamic pressure, saturates at minimum 5m/s stall
|
||||||
//Vector3f vel_body_2 = Dcmf(Quatf(_attitude.q)).transpose()*Vector3f{_local_pos.vx,_local_pos.vy,_local_pos.vz};
|
//Vector3f vel_body_2 = Dcmf(Quatf(_attitude.q)).transpose()*Vector3f{_local_pos.vx,_local_pos.vy,_local_pos.vz};
|
||||||
//PX4_INFO("ENU body frame velocity: \t%.2f\t%.2f\t%.2f", (double)vel_body_2(0), (double)vel_body_2(1), (double)vel_body_2(2));
|
//PX4_INFO("ENU body frame velocity: \t%.2f\t%.2f\t%.2f", (double)vel_body_2(0), (double)vel_body_2(1), (double)vel_body_2(2));
|
||||||
//PX4_INFO("FRD body frame velocity: \t%.2f\t%.2f\t%.2f", (double)vel_body(0), (double)vel_body(1), (double)vel_body(2));
|
//PX4_INFO("FRD body frame velocity: \t%.2f\t%.2f\t%.2f", (double)vel_body(0), (double)vel_body(1), (double)vel_body(2));
|
||||||
|
|||||||
Reference in New Issue
Block a user