From 0c9badfae931512364d55bc3f410031100846b2e Mon Sep 17 00:00:00 2001 From: Tom Pittenger Date: Sat, 31 Aug 2024 14:56:25 -0700 Subject: [PATCH] SA: WIP basic SITL model --- Tools/autotest/arduplane.py | 1 + Tools/autotest/pysim/vehicleinfo.py | 4 ++++ libraries/SITL/SIM_Plane.cpp | 7 +++++++ 3 files changed, 12 insertions(+) diff --git a/Tools/autotest/arduplane.py b/Tools/autotest/arduplane.py index 3ca7780e5ff453..f220e19381b3f8 100644 --- a/Tools/autotest/arduplane.py +++ b/Tools/autotest/arduplane.py @@ -4157,6 +4157,7 @@ def FlyEachFrame(self): "quadplane-ice" : "needs ICE control channel for ignition", "quadplane-can" : "needs CAN periph", "stratoblimp" : "not expected to fly normally", + "sa_gd2000" : "not expected to fly normally", "glider" : "needs balloon lift", } for frame in sorted(vinfo_options["frames"].keys()): diff --git a/Tools/autotest/pysim/vehicleinfo.py b/Tools/autotest/pysim/vehicleinfo.py index ca07c51b8f19df..6486730f44e3e9 100644 --- a/Tools/autotest/pysim/vehicleinfo.py +++ b/Tools/autotest/pysim/vehicleinfo.py @@ -372,6 +372,10 @@ def __init__(self): "extra_mavlink_cmds": "module load sitl_calibration;", "external": True, # lies! OTOH, hard to take off with this }, + "sa_gd2000": { + "waf_target": "bin/arduplane", + "default_params_filename": "models/sa_gd2000.parm", + }, "stratoblimp": { "waf_target": "bin/arduplane", "default_params_filename": "default_params/stratoblimp.parm", diff --git a/libraries/SITL/SIM_Plane.cpp b/libraries/SITL/SIM_Plane.cpp index 82aa8c659d9ee4..406214b986d116 100644 --- a/libraries/SITL/SIM_Plane.cpp +++ b/libraries/SITL/SIM_Plane.cpp @@ -98,6 +98,13 @@ Plane::Plane(const char *frame_str) : ice_engine = true; } + if (strstr(frame_str, "-sa_gd2000")) { + mass = 907.1847; // 2000 lbs == 907.1847 kg + thrust_scale *= 0.0001; // no-ish thrust + launch_accel = 50; + launch_time = 1; + } + if (strstr(frame_str, "-soaring")) { mass = 2.0; coefficient.c_drag_p = 0.05;