dgrat
5148e41c1a
AP_Math: Cleaned macro definitions
...
Moved Definitions into a separate header. Replaced PI with M_PI and
removed the M_PI_*_F macros.
2016-02-27 02:51:33 -03:00
Tom Pittenger
faa4238370
SITL: fixed warning comparing signed vs unsigned
2016-02-23 10:32:48 -08:00
Tom Pittenger
f20841f491
SITL: add reverse thrust to Plane Sim
2016-02-09 14:18:01 +11:00
Tom Pittenger
1f714ed75d
SITL: handle negative throttle
...
- negative throttle was causing negative offsets
2016-02-09 14:18:01 +11:00
Andrew Tridgell
d820eeaec6
SITL: use AP_Motors conventions for multicopters
...
this makes it easier to add a simulated vehicle to match a
MotorsMatrix frame type
2016-02-08 10:58:56 +11:00
Andrew Tridgell
5efe98a814
SITL: allow quadplane simulator to simulate other frame types
2016-02-08 09:17:22 +11:00
Andrew Tridgell
e62d6711c3
SITL: added very simple tiltrotor simulation
...
uses channel 9 to control tilt of rotors
2016-01-30 09:45:43 +11:00
Andrew Tridgell
6baae735de
SITL: updated fixed wing model based on last_letter skywalker_2013
...
many thanks to Georacer for this code!
2016-01-20 17:23:36 +11:00
Andrew Tridgell
a828db792e
SITL: added SIM_GYR_SCALE_{X,Y,Z}
...
allows testing of gyro scale factor learning in EKF2
2016-01-19 15:28:53 +11:00
Andrew Tridgell
7a7bd0607f
SITL: first version of FlightAxis SITL support
2016-01-09 07:38:51 +11:00
Andrew Tridgell
2777ff63ba
SITL: heli-sim: prevent ground rotation and reduced affect of ground impact
2016-01-06 21:59:56 +11:00
Andrew Tridgell
62b2a2117d
SITL: only report ground contact at most once per second
2016-01-05 09:47:58 +11:00
Andrew Tridgell
0966398d8d
SITL: improved realism of fixed wing sim somewhat
...
still not good, but a bit better for manual flight
2016-01-04 08:03:46 +11:00
Andrew Tridgell
22873ee687
SITL: reduced drag in plane model
2016-01-01 18:40:22 +11:00
Andrew Tridgell
619a4c0925
SITL: use common dynamics code for QuadPlane
2016-01-01 17:20:30 +11:00
Andrew Tridgell
33998a58ac
SITL: prevent aircraft going below ground level
2016-01-01 17:01:23 +11:00
Andrew Tridgell
d425965f6d
SITL: expose home yaw to FDMs
2016-01-01 17:00:57 +11:00
Andrew Tridgell
630d4410d4
SITL: removed debug code from QuadPlane
2016-01-01 15:48:56 +11:00
Andrew Tridgell
8a98ce427c
SITL: moved to common code for attitude/pos update
2016-01-01 15:12:33 +11:00
Andrew Tridgell
f2c8193f8b
SITL: added a QuadPlane model
2016-01-01 14:35:15 +11:00
Andrew Tridgell
6f9e9d761f
SITL: move calculations into multicopter frame class
...
this will enable a QuadPlane model
2016-01-01 14:35:15 +11:00
Andrew Tridgell
fcfd11ef53
SITL: very simple fixed wing simulator
...
useful for debugging
2016-01-01 12:41:05 +11:00
Tom Pittenger
37054d9571
SITL: update units for new adsb mavlink msg
2015-12-09 14:36:30 +11:00
Tom Pittenger
7236b48518
SITL: compiler warning: double to float demotion
...
- replace atof() with strtof() for the correct return time
2015-12-08 14:54:58 +09:00
Tom Pittenger
55f84e9c05
SITL: update ADSB for squawk
2015-12-01 17:13:02 -08:00
Andrew Tridgell
2804434596
SITL: update ADSB for new format
2015-11-26 10:25:18 +11:00
Tom Pittenger
f88de986bc
SITL: created ADSB simulator to generate additional ghost aircraft within SITL
...
The values are very aggressive, you'll come into contact with another aircraft very soon
Credit goes to Tridge for this work
This feature is enabled with the following command:
sim_vehicle -A --adsb
2015-11-23 19:45:40 +11:00
Andrew Tridgell
77a67d73e7
SITL: fill in RPM from JSBSim
2015-11-23 14:30:47 +11:00
Andrew Tridgell
223ce2b6aa
SITL: allow FDM models to provide voltage, current and RPM
2015-11-23 13:46:27 +11:00
Andrew Tridgell
8b456be8c6
SITL: added battery voltage and rpm to SITL state
2015-11-23 13:31:09 +11:00
Andrew Tridgell
585e6dabb8
SITL: FDM structure is no longer a network protocol structure
...
remove unused fields and change comments
2015-11-23 13:25:00 +11:00
Caio Marcelo de Oliveira Filho
d343bfdc6c
SITL: use millis/micros/panic functions
2015-11-20 12:35:50 +09:00
Andrew Tridgell
e1cb9beeef
SITL: expose update rate to HAL_SITL
...
and fixed dataflash reference loop
2015-11-16 17:57:36 +11:00
Robert Lefebvre
4f7246c432
SITL: Helicopter parameter updates
2015-11-12 19:37:38 +09:00
Lucas De Marchi
831d8acca5
Remove use of PROGMEM
...
Now variables don't have to be declared with PROGMEM anymore, so remove
them. This was automated with:
git grep -l -z PROGMEM | xargs -0 sed -i 's/ PROGMEM / /g'
git grep -l -z PROGMEM | xargs -0 sed -i 's/PROGMEM//g'
The 2 commands were done so we don't leave behind spurious spaces.
AVR-specific places were not changed.
2015-10-30 14:35:16 +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
11b599bcd0
SITL: use #pragma once
...
For the general case, pragma once is better replacement for of include
guards. One line instead of three, less scopes to close in the end of
the file, no chance to having the outdated names in the define symbol.
2015-10-22 13:36:19 -02: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
5ddd802320
SITL: use coding style in class declarations
2015-10-22 11:15:34 -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
Andrew Tridgell
05876b7e1b
SITL: Changed Rover to SimRover
...
this avoids the rover crash in master
2015-10-21 22:04:19 +11:00
Andrew Tridgell
b9aad88d17
SITL: moved ignition to channel 6
2015-09-29 10:59:41 +10:00
Andrew Tridgell
76aa1a9704
SITL: ensure zero rotor speed with ignition off in gas heli
2015-09-14 12:46:04 +10:00
Michael Oborne
b861233677
AP_HAL_SITL: add file based gps
2015-09-03 19:43:31 +10:00
Andrew Tridgell
a3d7156f28
SITL: raise default simulation rate to 1200Hz
...
this greatly improves things for the heli sim
2015-09-01 16:34:20 +10:00
Andrew Tridgell
85ab1c3444
SITL: added ignition control for gas heli
2015-08-18 13:07:19 +10:00
Andrew Tridgell
c2e68eaf79
SITL: tidy up frame handling a bit
2015-08-13 18:44:35 +10:00
Fredrik Hedberg
e2027a8414
SITL: Add HELI_DUAL_FRAME and HELI_COMPOUND_FRAME.
2015-08-13 18:23:30 +10: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
Grant Morphett
538a077ae8
SITL: fix coverity warning - removed unused variable heli_servos
2015-07-30 12:37:09 +10:00
Tom Pittenger
0c9cec7958
SITL: param SITL_ARSP_FAIL should be a float instead of byte
...
this param was meant to represent an airspeed which is a float
2015-07-28 11:03:13 +10:00
Tom Pittenger
250dcd31a2
SITL: Add ARSP_FAIL param
...
This will allow testing pitot tube hardware failures
2015-07-23 14:38:06 +10:00
Tom Pittenger
9737c426eb
SITL: Gazebo index out of bound
...
- imu_orientation_quat[size=3] is fed to Quaternion[size=4] which causes an index-out-of-range problem
2015-07-22 21:33:46 +10:00
Lucas De Marchi
5c9bf90d94
SITL: use ARRAY_SIZE macro
2015-07-21 14:25:19 +09:00
John Hsu
14e462706d
SITL: added gazebo SITL shim
2015-07-20 09:10:48 +10:00
Randy Mackay
2b4aaf2368
SITL: add vibe monitor and SIM_ACC2_RND to sitl
2015-07-12 16:50:30 +09:00
Andrew Tridgell
1f58e0080a
SITL: fixed some build warnings
2015-07-06 09:21:49 +10:00
Andrew Tridgell
f8944ab6be
SITL: define number of RC out channels
2015-06-30 08:54:46 +10:00
Andrew Tridgell
ff88932091
SITL: setup turbulence in JSBSim
2015-06-29 11:25:59 +10:00
Andrew Tridgell
322a61635f
SITL: allow extra arguments to be passed to last_letter
2015-06-19 16:39:46 +10:00
Georacer
b375a8debf
SITL: Allows last_letter to start at the location specified by the SITL arguments
2015-06-19 12:49:29 +10:00
Andrew Tridgell
83cc60a699
SITL: added simple balloon simulator
...
for testing balloon release code in plane
2015-06-15 09:20:55 +10:00
Andrew Tridgell
96737a3982
SITL: fixed yaw wrap in simulated AntennaTracker
2015-06-01 14:08:45 +10:00
Andrew Tridgell
edb54cabb5
SITL: added simulated antenna tracker
2015-06-01 12:53:30 +10:00
Andrew Tridgell
14bdfe2889
SITL: started to use C++11 variable initialisation
2015-06-01 08:04:51 +10:00
Andrew Tridgell
b541bfb739
SITL: fixed build warnings
2015-05-30 22:51:38 +10:00
Andrew Tridgell
d8df31c023
SITL: initialise a couple of variables to prevent a valgrind error
2015-05-27 11:54:18 +10:00
Peter Barker
88015503ac
SITL: use 64-bit timestamps for dataflash logs
2015-05-27 11:54:16 +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
563be63d00
SITL: try to get speedup accurate on both windows and linux
2015-05-25 21:48:42 +10:00
Andrew Tridgell
2b2259a6d7
SITL: use more granrular sleeps for windows
2015-05-25 17:05:44 +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
4f37926aea
SITL: fixed gimbal build on PX4
2015-05-25 12:39:40 +10:00
Andrew Tridgell
7f5b206c55
SITL: added gimbal simulator class
2015-05-25 12:20:26 +10:00
Andrew Tridgell
2bb5f677c7
SITL: removed earth frame rates
2015-05-25 09:03:10 +10:00
Andrew Tridgell
2d53a1ff9a
SITL: fixed airspeed in last_letter
2015-05-23 11:37:21 +10:00
Andrew Tridgell
ae6ac1b82d
SITL: fixed airspeed in CRRCSim
2015-05-23 11:35:56 +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
Andrew Tridgell
60221f5e9c
SITL: use sendto() in CRRCSim
...
this makes us robust to restart of client or server
2015-05-22 16:07:45 +10:00
Andrew Tridgell
b35c21fbe2
SITL: fixed socket recv error check
2015-05-22 16:07:43 +10:00
Andrew Tridgell
e487d95c1b
SITL: added direct support for last_letter simulator
2015-05-22 16:07:43 +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
f40c96de9d
SITL: add 'quad' and 'copter' as aliases for quadcopter
2015-05-11 09:19:53 +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
aa9853179c
SITL: fixed startup yaw
2015-05-10 21:57:19 +10:00
Andrew Tridgell
c136d65c25
SITL: added initial JSBSim simulator backend
2015-05-10 21:01:49 +10:00
Andrew Tridgell
1127b716c4
SITL: lower the default noise
...
prevents problems calibrating the gyro
2015-05-09 07:22:37 +10:00
Andrew Tridgell
cbdc9f0706
SITL: fixed autotest SITL
2015-05-06 10:09:43 +10:00
Andrew Tridgell
93d5101bf9
SITL: added CRRCSim simulation connection
2015-05-05 21:42:45 +10:00
Andrew Tridgell
42c6801d61
SITL: reformat SITL code with astyle
2015-05-05 11:49:54 +10:00
Andrew Tridgell
a58a663085
SITL: fixed build on APM2
2015-05-05 09:45:58 +10:00
Andrew Tridgell
64fa219c05
SITL: converted rover simulator from python to C++
2015-05-05 09:45:53 +10:00
Andrew Tridgell
6ec6158b8b
SITL: converted helicopter simulator from python
2015-05-05 09:45:53 +10:00
Andrew Tridgell
a17fc9e5ab
SITL: fixed time handling type
2015-05-05 09:45:53 +10:00
Andrew Tridgell
77f007ab27
SITL: support speedup setting on the command line
2015-05-05 09:45:52 +10:00
Andrew Tridgell
19147a05f6
SITL: support functions for new simulators
2015-05-05 09:45:52 +10:00
Andrew Tridgell
437e1bdba0
SITL: added fill_fdm() for FDM output from simulator
2015-05-05 09:45:52 +10:00
Andrew Tridgell
914b91af9e
SITL: initial conversion of multicopter sim to C++
2015-05-05 07:12:36 +10:00
Tom Pittenger
91476d78ae
SITL: fix compile warnings re float constants
2015-04-24 14:04:19 +09:00
Fergus Noble
0480867de2
SITL: Update SBP simulation functions for pseudo-absolute mode
2015-04-24 08:01:32 +10:00
Andrew Tridgell
1ce9cb693a
SITL: added SIM_MAG_OFS for setting compass offsets in SITL
2015-04-21 08:29:27 +10:00
Sean O\'Brien
6474aa2477
AP_HAL_AVR_SITL: added sensor delays to sitl.
2015-04-14 10:10:38 +10:00
Andrew Tridgell
b17878c8c4
SITL: lower default GPS delay to 0.2 seconds
...
this matches typical uBlox
2015-04-14 09:57:47 +10:00
Andrew Tridgell
63c792bc1c
SITL: added SIM_GPSDRIFTALT simulation control
2015-02-21 08:32:49 +11:00
Andrew Tridgell
5512a6f8a0
SITL: lower the default noise in SITL
...
the noise levels were well above realistic levels, especially for gyro
noise, and were causing EKF issues
2015-01-22 11:33:09 +11:00
Andrew Tridgell
228b04e21e
SITL: added SIM_FLOW_DELAY parameter
2015-01-06 14:19:02 +11:00
Andrew Tridgell
5758f39127
SITL: added SIM_FLOW_RATE parameter
2015-01-06 14:19:02 +11:00
Andrew Tridgell
9b65376961
SITL: added SIM_TERRAIN parameter
...
to choose either flat earth or AP_Terrain for sonar and optical flow
AGL emulation
2015-01-03 21:47:28 +11:00
Andrew Tridgell
66a03d100e
SITL: make some units clearer in comment
2015-01-03 15:44:19 +11:00
Andrew Tridgell
254aa32d4e
SITL: added SIM_FLOW_ENABLE option
2015-01-03 14:16:34 +11:00
Andrew Tridgell
ef98eba722
SITL: added SIM_SONAR_SCALE parameter
...
used for simulating different kinds of rangefinders
2014-08-10 22:36:38 +10:00
Randy Mackay
79291f25a0
SITL: add ACC_BIAS and BARO_GLITCH parameters
...
These allow testing accelerometer bias which often comes from vibration
and sudden changes in baro altitude.
2014-07-28 22:16:21 +09:00
Jonathan Challinger
e883b889b6
SITL: Add compassmot interference
2014-05-15 21:14:20 +10:00
Andrew Tridgell
e0db7b117f
SITL: added SIM_FLOAT_EXCEPT parameter
...
this enables checking for floating point exceptions
2014-04-21 15:37:08 +10:00
Andrew Tridgell
7404fc9d40
SITL: added SIM_BARO_DISABLE parameter
...
useful for testing baro failure
2014-04-11 16:47:40 +10:00
Niels Joubert
00064ac883
SITL: Adding GPS types for Swift Binary Protocol
2014-04-05 13:42:23 +11:00
Niels Joubert
161b5f99b3
SITL: Adding Swift Binary Protocol GPS type
2014-04-05 13:42:23 +11:00
Andrew Tridgell
7a52938f68
SITL: added SIM_GPS2_ENABLE option
2014-03-03 07:07:09 +11:00
Andrew Tridgell
9e3bf685c2
SITL: use sinf() and cosf()
...
for some strange reason the double precision functions can crash
2014-02-15 05:48:17 +11:00
Andrew Tridgell
38ac8d404a
SITL: fixed PX4 build
2014-02-15 05:48:17 +11:00
Andrew Tridgell
fba0891617
SITL: fixed SIM df altitude
2014-02-15 05:48:17 +11:00
Andrew Tridgell
fcd9041e62
SITL: added dataflash logging
2014-02-15 05:48:14 +11:00
Andrew Tridgell
5eac5fb26f
SITL: added SIM_RC_FAIL
...
simulate RC failure with no signal
2013-12-20 09:43:04 +11:00
Andrew Tridgell
b075f8735f
SITL: moved airspeed pin to pin 1
...
keep it separate from the sonar, allowing both to be used at the same time
2013-11-28 21:44:05 +11:00
Ben Nizette
339da1c21b
SITL: Add noise and glitching behaviour for the sonar sensor
2013-11-28 21:38:05 +11:00
Ben Nizette
70d37d2cf6
SITL: Wire in basic support for SITL downward-looking sonar sensors
2013-11-28 21:38:05 +11:00
Ben Nizette
59a54aae20
SITL: Add barometer drift parameter to the SITL library
2013-11-28 21:35:13 +11:00
Andrew Tridgell
428479b9d5
SITL: added SIM_ACCEL_FAIL option
...
used to test accelerometer failure in flight
2013-11-07 12:49:08 +11:00
Andrew Tridgell
ede927f68a
HAL_SITL: added airspeed noise control
2013-10-14 15:40:45 +11:00
Randy Mackay
8d1d8c78b5
SITL: add SIM_BATT_VOLTAGE
2013-10-03 11:16:35 +09:00
Andrew Tridgell
42bc8b12df
SITL: added a SIM_GPS_HZ option
...
this allows simulation of slow GPS updates (for example, the 1Hz GPS
problem)
2013-10-01 16:39:16 +10:00
Randy Mackay
c6a99ac24a
AutoTest: add support for GPS glitching
2013-09-24 21:41:04 +09:00
Andrew Tridgell
4864496ae6
SITL: reduce default GPS delay to 0.4
...
closer to real uBlox delay
2013-09-16 11:41:51 +10:00
Andrew Tridgell
e85d275fe5
SITL: added SIM_SERVO_RATE parameter
...
this allows a slew rate for servos to be specified in degrees/second
2013-09-16 09:16:52 +10:00
Andrew Tridgell
97b7130bb9
libraries: update license header to GPLv3
...
we switched to GPLv3 a long time ago, but neglected to update the
per-file license headers
2013-08-30 13:01:39 +10:00
Andrew Tridgell
97baec8bc7
SITL: update for new SIMSTATE message
2013-08-14 14:36:44 +10:00
Andrew Tridgell
e75c48c029
SITL: added simulated NMEA GPS
...
useful for validating the NMEA GPS driver
2013-08-14 14:36:44 +10:00
Andrew Tridgell
15a84972d1
SITL: added SIM_MAG_ERROR parameter
...
this is a compass yaw error in degrees, used for testing navigation
with a bad compass
2013-05-27 13:37:34 +10:00
Andrew Tridgell
220e7b019c
SITL: use PACKED attribute in fdm structure
2013-05-09 20:10:31 +10:00
Andrew Tridgell
055da3c4b6
SITL: added SIM_GPS_NUMSATS parameter
...
this allows testing of the DCM code with less than 6 satellites
2013-05-07 10:38:36 +10:00
Andrew Tridgell
9d3b32bd27
SITL: change default wind speed to zero
...
makes starting SITL easier for new users
2013-04-17 11:39:43 +10:00
Andrew Tridgell
0ffc7dab6b
SITL: added GPS speed down to SITL state
2013-03-28 10:29:12 +11:00
Andrew Tridgell
fb4e68f0f0
SITL: added SIM_GPS_BYTELOSS option
...
this allows testing of protocol recovery after losing bytes on the GPS
serial link
2013-02-16 22:00:16 +11:00
Andrew Tridgell
428966160a
SITL: added support for MTK16 and MTK19 simulated GPS types
2013-02-16 20:59:48 +11:00
Andrew Tridgell
2ec2c58f67
SITL: added SIM_GPS_TYPE control
...
for choosing what sort of GPS to simulate
2013-02-16 20:15:57 +11:00
Andrew Tridgell
fc8bd8cf95
SITL: updates for new AP_Param API
2012-12-20 14:51:39 +11:00
Pat Hickey
6943d32d76
SITL: fixed to build under AP_HAL
...
* won't work or naything like that
2012-12-20 14:51:35 +11:00
Andrew Tridgell
697b2074a5
SITL: added SIM_WIND_* parameters
...
this allows control of the simulated wind during a flight
2012-08-25 17:49:26 +10:00
Andrew Tridgell
34a1297842
SITL: added SIM_ENGINE_MUL
...
this allows for simulated engine failures
2012-08-17 14:22:08 +10:00
Andrew Tridgell
3419d8e006
SITL: fill in SIMSTATE.lat and SIMSTATE.lng
2012-08-11 11:58:25 +10:00
Andrew Tridgell
518d6365ff
AP_Param: update remaining libraries for new constructor syntax
2012-08-08 12:11:57 +10:00
Andrew Tridgell
ec0995eea1
SITL: lower baro noise a bit
2012-07-05 16:29:21 +10:00
Andrew Tridgell
c35a2e999b
SITL: added SIM_GPS_DELAY parameter
...
this allows a delay to be added to the gps data to test the impact on
AHRS/DCM
2012-07-04 21:05:22 +10:00
Andrew Tridgell
ed691fc465
SITL: added SITL class for controlling simulation
...
this holds mavlink settable parameters for controlling sensor noise
levels
2012-06-29 15:10:51 +10:00