Commit Graph

39 Commits

Author SHA1 Message Date
Peter Barker 3cf7091525 SITL: make parsing of json files dependent on PICOJSON
picojson uses the standard library; this will be a problem on embedded
platforms
2022-03-17 14:39:55 +11:00
Peter Barker 9ef959b93b SITL: make C_TO_KELVIN a function macro; create KELVIN_TO_C
These are in celsius
2022-01-13 18:31:46 +11:00
Andrew Tridgell ba58558bd1 SITL: fixed default BATT_CAPACITY for SITL
don't override from JSON model unless we have a value
2021-12-21 19:53:43 +11:00
Iampete1 6628fd2837 SITL: swap rotation direciton of motor 2 for lower yaw offset 2021-08-28 10:32:59 +09:00
Peter Barker d38e704115 SITL: fix memory over-read detected by Valgrind
==15803== Conditional jump or move depends on uninitialised value(s)
==15803==    at 0x4C34975: index (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==15803==    by 0x444D8D: SITL::Frame::load_frame_params(char const*) (SIM_Frame.cpp:363)
==15803==    by 0x445415: SITL::Frame::init(char const*, SITL::Battery*) (SIM_Frame.cpp:432)
==15803==    by 0x3696ED: SITL::MultiCopter::MultiCopter(char const*) (SIM_Multicopter.cpp:35)
==15803==    by 0x34B49C: SITL::MultiCopter::create(char const*) (SIM_Multicopter.h:44)
==15803==    by 0x34C58E: HALSITL::SITL_State::_parse_command_line(int, char* const*) (SITL_cmdline.cpp:480)
==15803==    by 0x344005: HALSITL::SITL_State::init(int, char* const*) (SITL_State.cpp:923)
==15803==    by 0x33D854: HAL_SITL::run(int, char* const*, AP_HAL::HAL::Callbacks*) const (HAL_SITL_Class.cpp:182)
==15803==    by 0x15ACDD: main (Copter.cpp:678)
==15803==
2021-05-05 21:21:56 +10:00
Peter Barker 0661a27400 SITL: ensure st.size is valid when loading model json
Before this patch st.size is undefined when we use it to create a buffer
on the stack - probably not a good thing.
2021-05-05 21:21:56 +10:00
Paul Riseborough b258cb0539 SITL: Add momentum drag to Z axis to work around thrust model deficiencies 2020-12-11 15:21:41 +11:00
Paul Riseborough a907c10733 SITL: Add momentum drag to multicopter model 2020-12-11 15:21:41 +11:00
murata 13c7980f0b SITL: Support for decacopters 2020-12-08 11:59:10 +11:00
Andrew Tridgell d8337cf9e5 SITL: allow loading of model from ROMFS 2020-10-28 14:20:44 +11:00
Andrew Tridgell e07cecb264 SITL: added support for simulated battery discharge 2020-10-28 14:20:44 +11:00
Andrew Tridgell a0bc9d3148 SITL: fixed quadplane mass and rpm indexing 2020-10-28 14:20:44 +11:00
Andrew Tridgell 767773da5e SITL: improved multicopter simulation
this takes account of motor expo, velocity of air over propellers,
mass, size and other factors

It also allows for frame parameters to be supplied as an external json file
2020-10-28 14:20:44 +11:00
Andrew Tridgell 7c2d13c571 SITL: added simulation of pressure altitude for multicopter
this gives us a ceiling of 5.4km above sea level for the default
copter
2020-06-05 11:35:53 +10:00
Rishabh 08f27f7668 SITL: Added cwx motor setup for hexa, octa and octaquad 2020-02-19 11:28:25 +09:00
Rishabh dc662a56b2 SITL: Added DJI Hexa and Octa for SITL 2020-01-29 16:57:23 +09:00
Andrew Tridgell dc80df23e9 SITL: added betaflight-rev-x frame 2020-01-16 19:13:13 +11:00
Andy Piper c807267bab SITL: add rpm-based motor noise per-motor to gyros and accels
convert multicopter thrust to rpm per motor
2019-12-17 10:07:06 +11:00
Andrew Tridgell 40babb1172 SITL: support 3 more X quad motor orders
- betaflight X
 - DJI X
 - clockwise X
2019-02-06 11:17:35 +11:00
Andrew Tridgell 358c570d9d SITL: added simulated battery for quadplane
needed for motor interference for mag
2019-01-14 08:23:47 +11:00
Pierre Kancir 37f7cc4bcf SITL: rearrange Grippers and Sprayers in SITL 2018-07-31 23:34:43 +10:00
mirkix 93b3970141 SITL: Add tilthvec frame 2017-09-18 21:20:39 +10:00
murata c21b586ccc SITL: add dodeca-hexa support 2017-05-27 14:21:13 +09:00
Andrew Tridgell 1e69508322 SITL: added a vectored tilt tricopter quadplane 2017-04-24 16:54:41 +10:00
Andrew Tridgell 0171b64feb SITL: setup simulator to match firefly6 AvA servo outputs 2017-02-06 16:18:58 +11:00
murata c808ee2f49 Global: To nullptr from NULL.
RC_Channel: To nullptr from NULL.

AC_Fence: To nullptr from NULL.

AC_Avoidance: To nullptr from NULL.

AC_PrecLand: To nullptr from NULL.

DataFlash: To nullptr from NULL.

SITL: To nullptr from NULL.

GCS_MAVLink: To nullptr from NULL.

DataFlash: To nullptr from NULL.

AP_Compass: To nullptr from NULL.

Global: To nullptr from NULL.

Global: To nullptr from NULL.
2016-11-02 16:04:47 -02:00
Peter Barker 1997a4e044 SITL: include mass of sprayer payload in vehicle mass 2016-10-29 15:02:56 +09:00
Mathieu OTHACEHE 152edf7189 Global: remove mode line from headers
Using a global .dir-locals.el file is a better alternative than
reincluding the same emacs header in every file of the project.
2016-10-24 09:42:01 -02:00
Andrew Tridgell f387f248d3 SITL: added support for servo slew rates and retract servos
this is for tiltrotors with retract servos
2016-07-05 09:40:37 +10:00
Andrew Tridgell 88b910c13d SITL: changed firefly motors to be suitable for a pixhawk
get channel groupings right
2016-05-11 05:55:25 +10:00
Andrew Tridgell 3e1cad5df2 SITL: adjust tricopter so default yaw servo values will work 2016-05-11 05:55:24 +10:00
Andrew Tridgell bd8cd71745 SITL: fixed fwd motor angles for tri and y6 frames
should be 60 degrees to have motors evenly spaced around frame for
equal lift per motor when level
2016-05-11 05:55:23 +10:00
Andrew Tridgell 125a9feb3d SITL: added tilttri frame type
tiltrotor tricopter
2016-05-11 05:55:22 +10:00
Andrew Tridgell 9e01d7de6c SITL: added support for "quad-fast" frame
much more powerful copter for testing nav at high speed
2016-04-28 10:05:04 +10:00
Andrew Tridgell 180a7905e5 SITL: make Z down in motors 2016-04-22 10:45:55 +10:00
Andrew Tridgell 8880635fe1 SITL: support vtail and elevon planes in builtin plane sim
remove old tiltrotor in favor of new tiltrotor code
2016-04-22 10:28:15 +10:00
Andrew Tridgell 71ca534ec6 SITL: added Y6 frame 2016-04-21 21:11:38 +10:00
Andrew Tridgell 49822effca SITL: added tricopter simulator 2016-04-21 20:29:49 +10:00
Andrew Tridgell c262d6a1b4 SITL: break up multicopter into Motor/Frame/Multicopter classes
ready for more tiltrotors
2016-04-21 19:56:44 +10:00