SITL: added plane-3d for aerobatic plane

This commit is contained in:
Andrew Tridgell 2022-10-15 19:35:27 +11:00 committed by Peter Barker
parent d04f4d8178
commit 256addc0f0
2 changed files with 8 additions and 2 deletions

View File

@ -82,6 +82,11 @@ Plane::Plane(const char *frame_str) :
thrust_scale *= 1.5;
}
if (strstr(frame_str, "-3d")) {
aerobatic = true;
thrust_scale *= 1.5;
}
if (strstr(frame_str, "-ice")) {
ice_engine = true;
}
@ -142,7 +147,7 @@ Vector3f Plane::getTorque(float inputAileron, float inputElevator, float inputRu
//calculate aerodynamic torque
float effective_airspeed = airspeed;
if (tailsitter) {
if (tailsitter || aerobatic) {
/*
tailsitters get airspeed from prop-wash
*/
@ -321,7 +326,7 @@ void Plane::calculate_forces(const struct sitl_input &input, Vector3f &rot_accel
angle_of_attack = atan2f(velocity_air_bf.z, velocity_air_bf.x);
beta = atan2f(velocity_air_bf.y,velocity_air_bf.x);
if (tailsitter) {
if (tailsitter || aerobatic) {
/*
tailsitters get 4x the control surfaces
*/

View File

@ -99,6 +99,7 @@ protected:
bool reverse_elevator_rudder;
bool ice_engine;
bool tailsitter;
bool aerobatic;
bool copter_tailsitter;
bool have_launcher;
float launch_accel;