Commit Graph

247 Commits

Author SHA1 Message Date
Andrew Tridgell 8944d298ed SITL: added SingleCopter simulator 2016-05-26 16:30:39 +10:00
Grant Morphett 52755c893d Rover: Print message when running skid steering SITL 2016-05-24 12:24:53 +10:00
Tom Pittenger c77a5e6764 SITL: rename aspd variables and params to arspd 2016-05-17 16:36:07 -07: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 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 48ca1a8d92 SITL: increase the mass of the plane to 2kg
less wafty in the air
2016-05-11 05:55:24 +10:00
Andrew Tridgell 9c90709872 SITL: fixed namespace of SITL classes 2016-05-11 05:55:23 +10:00
Andrew Tridgell 91abc636f4 SITL: fixed quadplanes with elevons 2016-05-11 05:55:23 +10:00
Andrew Tridgell 2d47ca8095 SITL: fixed moment of rotated motors 2016-05-11 05:55:23 +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
dgrat 41661f815f AP_Math: Replace the pythagorous* functions with a variadic template
The new function can deal with a variable number of function parameters.
Additionally, I renamed the functions to norm(), because this is the
standard name used in several other projects.
2016-05-10 11:41:26 -03:00
Gustavo Jose de Sousa 9fa85d9bcf SITL: add SIM_Calibration
That model can be used to run compass and accelerometer calibration by rotating
the vehicle through the servos channels.
2016-05-10 16:16:37 +10:00
Gustavo Jose de Sousa 45754ef37c SITL: Multicopter: remove leftover comment
That went unnoticed by 8a98ce4 ("SITL: moved to common code for attitude/pos
update")
2016-05-10 16:16:37 +10:00
Gustavo Jose de Sousa ce8766e1cd SITL: remove set_yaw_degrees()
That function isn't being used anywhere.
2016-05-10 16:16:37 +10:00
Andrew Tridgell 7cdab2a6c9 SITL: FlightAxis can support 8 channels 2016-05-04 13:05:43 +10:00
Andrew Tridgell 3b0cd9f101 SITL: added RC input from FlightAxis
use the interlink controller for input for 6 channels
2016-05-04 12:51:27 +10:00
Andrew Tridgell 68e17af070 SITL: allow for changing FlightAxis controller IP 2016-04-29 09:03:48 +10:00
Andrew Tridgell e428d1e72d SITL: support tricopter quadplanes 2016-04-28 22:36:53 +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 785ad0614a SITL: fixed coverity 125055 2016-04-26 16:46:06 +10:00
Andrew Tridgell ed4e8b635a SITL: fixed fd leak
coverity #125056
2016-04-26 16:43:54 +10:00
Andrew Tridgell 847483d744 SITL: fixed coverity warning 2016-04-26 16:37:17 +10:00
Andrew Tridgell 180a7905e5 SITL: make Z down in motors 2016-04-22 10:45:55 +10:00
Andrew Tridgell aa80851138 SITL: support fireflyY6 quadplane model 2016-04-22 10:28:15 +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 b4d24d8e03 SITL: fixed rotations of motors by large angles 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
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
Grant Morphett 5861b754cc Rover: fixing a bug the Rover simulation
Just a small change to ensure the max_wheel_turn parameter is used
instead of a hard coded value.
2016-04-14 08:55:04 +09:00
Andrew Tridgell 7dcd17a2fa SITL: make multicopter motors only effective above 10% 2016-04-02 22:45:05 +11:00
Andrew Tridgell 73a2c99d56 SITL: limit rotational rate to 2000dps 2016-03-26 14:23:05 +11:00
Andrew Tridgell 1d42b0281a SITL: ADSB: fixed heading and fixed windows startup 2016-03-18 11:18:19 +11:00
Andrew Tridgell b0ac6c26e0 SITL: support octaquad in quadplane sim 2016-03-13 10:12:14 +11:00
Will Sackfield 8b5fa9d23d SITL: Initialise yaw_rate and pitch_rate
* Clang requires these variables to be initialized
2016-02-29 14:14:37 +11:00
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