Commit Graph

43 Commits

Author SHA1 Message Date
Andrew Tridgell a0af08a3aa SITL switched to motor_mask for which actuators are motors
this allows for any output to be an ESC, which allows for proper
simulation of quadplanes with ESCs on outputs 5-8 or 9-12, for testing
notch filtering
2022-10-16 20:38:19 +11:00
Shiv Khanna 2814605a2c SITL: Fixed rounding lat/lng issue when running JSBSim SITL
Fixed an issue in recieving aircraft state data from JSBSim where
the location was being converted to degrees but as a float. This
caused rounding issues in the lat and lng. Changed the conversion to use
a double.
2022-09-21 17:58:40 +10:00
Peter Barker 90f8cbde13 SITL: provide HAL_x_ENABLED for many SITL features
This allows for the feature to be compiled out
2021-10-12 09:04:55 +11:00
bugobliterator 3033589fca SITL: change class name from SITL::SITL to SITL::SIM 2021-08-05 07:25:31 +10:00
Patrick José Pereira 07c3435f9d SITL: Add missing const in member functions
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2021-02-03 18:45:14 +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
Peter Barker f7b47679bb SITL: remove home_str from constructor 2019-08-15 15:16:11 +10:00
Peter Barker 81222fbde0 SITL: correct RC2_REV to RC2_REVERSED in comment 2019-07-24 13:36:26 +09:00
Rajat Singhal 82413a1528 SITL: JSBSim: Fix comments 2019-07-03 23:58:22 -07:00
Rajat Singhal 2c519d5176 SITL: Fix to sync to JSBSim simulation time
SITL: Additional fix to remove time-lag in JSBSim
2019-05-10 17:12:52 +10:00
Rajat Singhal dedb7e108f SITL: Added <time> tag to JSBSim output directive
Instructs JSBSim to transmit current simulation time which is used to sync with Ardupilot
2019-05-10 17:12:52 +10:00
Rajat Singhal 2317e73e0b SITL: JSBSim: Use rate_hz to specify timestep 2019-05-10 17:12:52 +10:00
Rajat Singhal 732f2e7a2e SITL: Change JSBSim mode to Batch mode, specify nice sleeptime
Previously it was run in realtime mode which doesn't support iterate command. Without setting sleeptime, defaults to 0.01s which slows down a lot
2019-05-10 17:12:52 +10:00
Simon Schopferer 6beac98d4a fixed conversion of airspeed from ft/s to knots as defined in latest JSBSim versions 2019-02-26 09:14:42 +11:00
Andrew Tridgell 28a12224c3 SITL: fixed FDM UDP socket for JSBSim
needs to be uppercase for new versions
also improved debug output
2018-12-18 13:06:03 +11:00
Willem Eerland f8407dd33a SITL: fixed JSBSim backend for latest version 2018-12-18 13:06:03 +11:00
Lucas De Marchi f6d475c1e6 AP_HAL_SITL: add O_CLOEXEC in places missing it
By opening with O_CLOEXEC we make sure we don't leak the file descriptor
when we are exec'ing or calling out subprograms. Right now we currently
don't do it so there's no harm, but it's good practice in Linux to have
it.
2016-11-07 12:37:30 -03: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
Andrew Tridgell 5e03358b0b SITL: added servo filtering
SIM_SERVO_SPEED is servo time constant in seconds
2016-10-25 20:39:38 +11: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 5b7b799046 SITL: fixed mag field in JSBSim and last_letter 2016-06-20 11:07:51 +10:00
Andrew Tridgell 4f99c17aae SITL: added X-Plane 10 SITL backend 2016-06-19 13:59:15 +10:00
Peter Barker 7510e4d0a7 SITL: setsid() when starting JSBSim so Ctrl-C doesn't kill it in GDB 2016-05-11 14:10:48 +10:00
Andrew Tridgell ed4e8b635a SITL: fixed fd leak
coverity #125056
2016-04-26 16:43:54 +10:00
Andrew Tridgell 57aef8e1e9 SITL: added basic wind support in multicopter, plane and quadplane
this adds non-turbulent wind support for the built-in simulators. I
added it primarily for quadplane testing, but it should also be useful
for multicopter navigation testing.
2016-04-20 11:48:37 +10:00
Andrew Tridgell 77a67d73e7 SITL: fill in RPM from JSBSim 2015-11-23 14:30:47 +11:00
Caio Marcelo de Oliveira Filho d343bfdc6c SITL: use millis/micros/panic functions 2015-11-20 12:35:50 +09:00
Andrew Tridgell 724f5511aa SITL: support multiple jsbsim aircraft types
use -f jsbsim:ModelName
2015-10-27 10:01:34 +11:00
Caio Marcelo de Oliveira Filho 288dc2a385 SITL: clean up includes
Remove unnecessary includes, reorder them in blocks separated by a blank
line

   - Corresponding header file (if exists)
   - System headers
   - Other ArduPilot library headers
   - "Local" headers (from the same library)
2015-10-22 13:36:19 -02:00
Caio Marcelo de Oliveira Filho 8a55b26443 SITL: no need to use #ifdefs
Now that SITL is compiled only when it's needed (i.e. using the SITL
board), there's no need to ifdef its files based on the
CONFIG_HAL_BOARD. So remove them.
2015-10-22 13:36:19 -02:00
Caio Marcelo de Oliveira Filho e2fa456742 SITL: remove "constructor" comment 2015-10-22 11:16:39 -02:00
Caio Marcelo de Oliveira Filho f0a20cdc7c SITL: remove trailing whitespace 2015-10-22 11:15:20 -02:00
Caio Marcelo de Oliveira Filho 49a42dc985 SITL: use a SITL namespace 2015-10-22 11:04:42 -02:00
Gustavo Jose de Sousa a02e7730ea SITL: standardize inclusion of libaries headers
This commit changes the way libraries headers are included in source files:

 - If the header is in the same directory the source belongs to, so the
 notation '#include ""' is used with the path relative to the directory
 containing the source.

 - If the header is outside the directory containing the source, then we use
 the notation '#include <>' with the path relative to libraries folder.

Some of the advantages of such approach:

 - Only one search path for libraries headers.

 - OSs like Windows may have a better lookup time.
2015-08-11 16:38:25 +10:00
Andrew Tridgell ff88932091 SITL: setup turbulence in JSBSim 2015-06-29 11:25:59 +10:00
Andrew Tridgell 527fc2a610 SITL: use 127.0.0.1 to improve reliability on windows 2015-05-25 22:02:18 +10:00
Andrew Tridgell c06d81a06a SITL: use autotest_dir
this allows for the aircraft directory for SITL to be packaged without
the source tree
2015-05-25 13:04:46 +10:00
Andrew Tridgell da5d5c9936 SITL: fixed airspeed pass-thru from simulators 2015-05-23 11:24:10 +10:00
Andrew Tridgell 091a1e7fe0 SITL: fixed wind support in JSBSim 2015-05-23 11:03:57 +10:00
Peter Barker 6299a8c90d autotest: drain control socket in SITL
fixes SITL on plane
2015-05-22 08:09:15 +10:00
Andrew Tridgell bab94c8a04 SITL: close high fds before launching JSBSIM 2015-05-11 08:06:10 +10:00
Andrew Tridgell 7692889248 SIM_JSBSim: added elevon and vtail support 2015-05-10 21:57:39 +10:00
Andrew Tridgell c136d65c25 SITL: added initial JSBSim simulator backend 2015-05-10 21:01:49 +10:00