Andrew Tridgell
7f5b206c55
SITL: added gimbal simulator class
2015-05-25 12:20:26 +10:00
Andrew Tridgell
2f7facba40
GCS_MAVLink: removed old MAVLink 0.9 headers
2015-05-25 10:19:47 +10:00
Andrew Tridgell
d96e62cce7
AP_Mount: update gimbal for changed quaternion API
2015-05-25 09:08:45 +10:00
Andrew Tridgell
2a8f645d81
AP_Math: use matrix3 euler312 operations in quaternion library
2015-05-25 09:08:31 +10:00
Andrew Tridgell
7aa7e03169
AP_Math: added euler312 functions (for gimbal)
2015-05-25 09:03:11 +10:00
Andrew Tridgell
2bb5f677c7
SITL: removed earth frame rates
2015-05-25 09:03:10 +10:00
Andrew Tridgell
8dce5e11d6
HAL_SITL: removed earth-frame rates
2015-05-25 09:03:10 +10:00
Andrew Tridgell
19419fd901
AP_Mount: fixed reporting of MAVLink gimbal position to GCS
2015-05-24 15:24:02 +10:00
Andrew Tridgell
b61f7fa2f6
AP_AHRS: enable EKF by default on plane
...
now we have arming checks enabled by default I think this is the best
choice
2015-05-23 17:17:44 +10:00
Andrew Tridgell
efd958f0b0
AP_NavEKF: rename file to remove spaces
...
spaces in file names break shell scripts
2015-05-23 17:14:52 +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
e7f3716e8c
HAL_SITL: pass in wind speed to C++ simulators
2015-05-23 11:04:13 +10:00
Andrew Tridgell
091a1e7fe0
SITL: fixed wind support in JSBSim
2015-05-23 11:03:57 +10:00
Andrew Tridgell
4486ddc53e
DataFlash: changed TimeUS to SampleUS for raw IMU logging
...
this prevents a problem with an upcoming patch from Peter
2015-05-22 17:58:18 +10:00
Jonathan Challinger
28731d2bdc
AP_Motors: add throttle filter input constraint from -100 to 1100
2015-05-22 16:12:27 +09: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
6cbd291dd2
HAL_SITL: make model name case insensitive
2015-05-22 16:07:44 +10:00
Andrew Tridgell
9336914598
AP_HAL: added sendto socket method
2015-05-22 16:07:44 +10:00
Andrew Tridgell
4e117bc90f
HAL_SITL: support last_letter simulator
2015-05-22 16:07:44 +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
Robert Lefebvre
bcc3fa0526
AC_HELI_PID: Pass default FF param setting in constructor
2015-05-22 09:38:28 +09:00
Robert Lefebvre
73bafa131e
AP_MotorsHeli: Overload output()
...
To protect it from future interference from Multirotor code.
2015-05-22 09:38:23 +09:00
Robert Lefebvre
d3ce68a8ca
AP_MotorsHeli: Overload update_throttle_filter()
...
Do not reset filter to zero when disarmed to allow collective pitch servo movement.
2015-05-22 09:38:20 +09:00
Peter Barker
6299a8c90d
autotest: drain control socket in SITL
...
fixes SITL on plane
2015-05-22 08:09:15 +10:00
Andrew Tridgell
cd66ce1c74
HAL_SITL: don't advance clock on garbage SIM input
2015-05-21 21:17:22 +10:00
Andrew Tridgell
605b8b4ece
AP_Math: converted rotations example to cpp
...
this is just a test conversion before we start converting on-mass
2015-05-21 13:41:20 +10:00
Andrew Tridgell
062c9406bd
AP_Math: fixed rotations example build
2015-05-21 13:37:44 +10:00
Andrew Tridgell
a1a3212131
AP_Common: moved NOINLINE define to AP_Common.h
2015-05-21 09:35:26 +10:00
Andrew Tridgell
fb97c16a84
AP_Param: make data pointer const
2015-05-21 07:48:52 +10:00
Andrew Tridgell
84726e4a3a
GCS_MAVLink: use APM_BUILD_DELEGATES
2015-05-21 07:48:52 +10:00
Andrew Tridgell
f8aef57ec3
DataFlash: use APM_BUILD_DELEGATES
2015-05-21 07:48:51 +10:00
Andrew Tridgell
0847bd2608
AP_Scheduler: use APM_BUILD_DELEGATES
2015-05-21 07:48:51 +10:00
Andrew Tridgell
e7ba2c8d93
AP_Mission: use APM_BUILD_DELEGATES
2015-05-21 07:48:51 +10:00
Andrew Tridgell
3a300575bc
AP_Menu: use APM_BUILD_DELEGATES
2015-05-21 07:48:51 +10:00
Andrew Tridgell
98d2b9b3aa
AP_Vehicle: added APM_BUILD_DELEGATES macro
2015-05-21 07:48:50 +10:00
Andrew Tridgell
c3aa8d67fa
AP_Arming: convert to delegates
2015-05-21 07:48:50 +10:00
Andrew Tridgell
71b550d7b5
GCS_MAVLink: support member functions for rover
2015-05-21 07:48:47 +10:00
Andrew Tridgell
b5d930be61
DataFlash: support member functions for rover
2015-05-21 07:48:47 +10:00
Andrew Tridgell
1237772479
AP_Scheduler: support member functions for rover
2015-05-21 07:48:46 +10:00
Andrew Tridgell
12cbf7888f
AP_Mission: support member functions for rover
2015-05-21 07:48:46 +10:00
Andrew Tridgell
db13f657a8
AP_Menu: support member functions for rover
2015-05-21 07:48:46 +10:00
Andrew Tridgell
e1e85ecc3d
AP_Progmem: simpler PROGMEM header
2015-05-21 07:48:46 +10:00
Andrew Tridgell
abfb601db6
AP_Progmem: added pgm_read_block()
2015-05-21 07:48:45 +10:00
Andrew Tridgell
d57fcf7e46
AP_HAL: added workaround for AVR delegates in PROGMEM
2015-05-21 07:48:45 +10:00
Andrew Tridgell
be587beedc
AP_HAL: disable nagle on sockets for faster local operation
2015-05-21 07:48:45 +10:00
Andrew Tridgell
b0932548d8
AP_GPS: enable NMEA GPS on AntennaTracker
...
we have enough flash space for it
2015-05-21 07:30:21 +10:00
Andrew Tridgell
411a96b4b3
AP_NavEKF: take at most 30s to accept DCM attitude
...
velocity noise on the GPS can cause DCM to take a long time to
converge. If it takes longer than 30s then allow EKF to start
2015-05-20 15:22:15 +10:00
Andrew Tridgell
7a76f72bf5
AP_AHRS: added uptime_ms() interface
2015-05-20 15:22:14 +10:00
ziltoid2
23787cf695
AP_Baro: use ground_temperature instead of calibration_temperature for alt calculation
2015-05-20 11:42:21 +10:00
Andrew Tridgell
92c4c5cbcf
AP_NavEKF: change using_gps threshold to 4s
...
this means plane will continue to use dead reckoning with GPS 3D lock
for 4s
2015-05-19 20:52:39 +10:00
Paul Riseborough
69ca654194
AP_NavEKF: Update declination when we know our location
...
This ensures that when we start using GPS, that the EKF will be using the correct declination for that location
If declination is not known it defaults to zero
2015-05-19 20:35:52 +10:00
Paul Riseborough
c1c5e3598a
AP_NavEKF: Enforce alignment of realigned earth mag field with declination
...
This prevents bad inertial or GPS data combined with the post takeoff heading alignment check used by plane from resulting in earth field states that have an incorrect declination
2015-05-19 20:35:52 +10:00
Paul Riseborough
b1d8805114
AP_NavEKF: Reduce takeoff detection sensitivity
...
This patch reworks the in-air transition criteria to reduce the likelihood of false positives and to ensure that there will be enough ground speed to make the heading check work reliably.
2015-05-19 20:35:52 +10:00
Randy Mackay
d1808c645d
AC_PosControl: recalc leash length on speed or accel change
...
This resolves an issue in which do-set-speed would not take effect until
one waypoint too late in a mission.
2015-05-19 18:16:39 +09:00
Andrew Tridgell
5514a9f690
AP_NavEKF: base EKF decisions on vehicle class
...
using the vehicle class rather than the build macros allows this to
work correctly in replay
2015-05-19 15:21:22 +10:00
Andrew Tridgell
92daa15ccc
AP_AHRS: on plane and rover make AHRS unhealthy when EKF not initialised
...
planes and rovers need full absolute position from the EKF if the EKF
is going to be used. We don't want users to arm without full
capabilities
2015-05-19 15:21:21 +10:00
Andy Piper
c600c1a746
DataFlash: log Gyro and Accel Health for IMUs.
...
Log the health of the various IMUs under GyHlt and AcHlt.
(Names are shortened to get inside the string array limit).
2015-05-19 13:13:35 +09:00
Andrew Tridgell
0619247992
HAL_Linux: don't advance time in delay() and delay_microseconds()
...
this could cause time to go backwards in Replay. Thanks to Peter for
finding this
2015-05-19 13:17:15 +10:00
Andrew Tridgell
29f0561ce4
AP_AHRS: reject EKF for plane when we have GPS and aren't fusing
...
plane users would prefer to use GPS in this case
2015-05-17 21:24:57 +10:00
Andrew Tridgell
6154db5cf8
AP_NavEKF: added using_gps status bit
2015-05-17 21:24:57 +10:00
Randy Mackay
0077cac1b7
AC_WPNav: rename stop to brake
2015-05-17 14:44:33 +09:00
Andrew Tridgell
80c20b5cf2
DataFlash: use L for latitude/longitude in DF messages
2015-05-16 14:04:31 +10:00
Tom Pittenger
e987173ffb
AP_NavEKF: float to double promotion via tan instead of tanf
2015-05-16 08:21:49 +10:00
Tom Pittenger
5f677c2b5b
AP_Math: float to double promotion via cos instead of cosf
2015-05-16 08:21:49 +10:00
Tom Pittenger
7b95241306
AP_HAL_SITL: float to double promotion via cos instead of cosf
2015-05-16 08:21:37 +10:00
Tom Pittenger
4f1dd2c8a4
AC_AttitudeControl: compiler warning stuff
...
float to double promotion via cos & sin instead of cosf & sinf
(this code is commented out but in case it ever gets included it would be nice to be correct
2015-05-16 08:21:36 +10:00
Andrew Tridgell
aaa35bd1ec
AP_InertialSensor: using atan2f() gives more accurate euler corrections
...
thanks to Jon and Paul!
2015-05-16 08:19:18 +10:00
Andrew Tridgell
9e723ef907
AP_InertialSensor: added calibrate_trim() function
...
used for redoing trim calculation
2015-05-16 07:56:34 +10:00
Andrew Tridgell
b564ba0868
AP_InertialSensor: fixed AHRS_TRIM calculation again
2015-05-16 07:56:33 +10:00
Andrew Tridgell
2475ee9630
AP_Compass: setup HIL/SITL for two compasses
2015-05-16 07:06:04 +10:00
Andrew Tridgell
ab687ab0f5
DataFlash: added double to list of format strings
...
thanks to Dario <proyectoire@gmail.com> for noticing this
2015-05-15 21:14:49 +10:00
Jonathan Challinger
159599879f
AP_InertialSensor: simplify and correct AHRS_TRIM computation
2015-05-15 21:03:03 +10:00
Andrew Tridgell
d7e4310df0
DataFlash: Lat can be negative in POS
2015-05-15 17:55:50 +10:00
Randy Mackay
559684b257
GCS_MAVLink: fix flow control check
...
Thanks to Tridge for spotting is
2015-05-15 15:39:34 +09:00
Andrew Tridgell
b0a90df135
DataFlash: fixed double Init of DF object
...
thanks to Michael De Breuil
2015-05-15 16:33:10 +10:00
Randy Mackay
763c671d0a
GCS_Console: fix example sketch after mavlink_comm_port to array
2015-05-15 15:07:32 +09:00
Randy Mackay
85eeba93c0
GCS_MAVLink: mavlink_comm_port to array
2015-05-15 15:07:31 +09:00
Randy Mackay
facbfaf31f
SerialManager: support for 4th mavlink channel
2015-05-15 15:07:24 +09:00
Randy Mackay
62e7e8cc7d
GCS_MAVLink: add support for 4th mavlink chan on PX4
2015-05-15 15:07:23 +09:00
Andrew Tridgell
74485c5754
DataFlash: added Log_Write_POS() call
...
write AHRS position to DF log
2015-05-15 14:28:08 +10:00
Andrew Tridgell
3370ec62a1
HAL_SITL: fix for multi-compass SITL
2015-05-15 14:25:44 +10:00
Andrew Tridgell
91b4ba3588
AP_Compass: allow for more than one compass in HIL/SITL
2015-05-15 14:25:44 +10:00
Andrew Tridgell
11f70da8b4
DataFlash: fixed incorrect change to GPS message
2015-05-15 14:25:43 +10:00
Randy Mackay
ade4f81c77
Compass: fix example sketch
2015-05-15 11:53:28 +09:00
Paul Riseborough
bd91b9727f
AP_NavEKF: Add pre-arm check for horizontal inertial errors
...
This check will declare the EKF as unhealthy if the horizontal position innovations exceed a threshold before motors are armed.
This will help to prevent a takeoff with bad inertial data caused by bad accel or gyro offsets.
2015-05-15 10:35:25 +09:00
Randy Mackay
1b13250fd8
RC_Channel: small parameter description change
2015-05-14 10:33:08 +09:00
Randy Mackay
61c851885f
AC_WPNav: remove unused set_spline_dest_and_vel
2015-05-13 22:40:08 +09:00
Randy Mackay
7056484ef0
Copter: fix spline overshoot
2015-05-13 22:40:06 +09:00
Randy Mackay
56b92e7d8c
AC_PID: fix example sketch
2015-05-13 17:55:39 +09:00
Paul Riseborough
c2ac80cc63
AP_AHRS: Prevent copter from switching to DCM unless EKF has severe errors
2015-05-13 16:11:13 +09:00
Randy Mackay
3f8b832075
InertialSensor: fix example sketch
2015-05-13 10:13:51 +09:00
Randy Mackay
3bcd97fcd1
Parachute: increase deployment duration to 2sec
2015-05-12 22:08:20 +09:00
Randy Mackay
5560d3dba1
BattMonitor: fix example sketch
2015-05-12 21:34:24 +09:00
Randy Mackay
e080b2acce
AP_Arming: use accel_calibrated_ok_all
2015-05-12 16:32:22 +09:00
Randy Mackay
1f14eec4ea
InertialSensor: accel_calibrated_all_ok replaces calibrated
...
This checks that the current number of accelerometers matches the number
of calibrated accels in order to catch accel failures at boot
2015-05-12 16:32:16 +09:00
Randy Mackay
0d72f3ac29
AP_HAL: fix example sketches
2015-05-12 14:42:15 +09:00
Andrew Tridgell
8bf2baef70
AP_InertialSensor: fixed primary accel/gyro in replay
2015-05-11 11:19:11 +10:00
Andrew Tridgell
f40c96de9d
SITL: add 'quad' and 'copter' as aliases for quadcopter
2015-05-11 09:19:53 +10:00
Andrew Tridgell
2a47cc3c81
HAL_SITL: cleanup command line handling
2015-05-11 08:48:42 +10:00
Andrew Tridgell
bab94c8a04
SITL: close high fds before launching JSBSIM
2015-05-11 08:06:10 +10:00
Andrew Tridgell
414f4125de
AP_HAL: use FD_CLOEXEC to prevent sockets being inherited in SITL
2015-05-11 08:05:51 +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
5687adbdba
HAL_SITL: support JSBSim backend
2015-05-10 21:02:20 +10:00
Andrew Tridgell
692fc18698
AP_HAL: protect Socket.h from double include
2015-05-10 21:02:04 +10:00
Andrew Tridgell
c136d65c25
SITL: added initial JSBSim simulator backend
2015-05-10 21:01:49 +10:00
Andrew Tridgell
8ec98a5ec9
SITL: make it possible to connect two SITL instances together
...
this adds --client to set uartC as a tcp client rather than a TCP
server
2015-05-10 15:36:18 +10:00
Andrew Tridgell
3991e0c476
DataFlash: fixed sign of sv in GRAW message
2015-05-10 12:15:04 +10:00
Andrew Tridgell
3529e02675
AP_AHRS: if we have 3 gyros then only use first two
...
the 3rd gyro on a PH2 has a lot more noise as it is not vibration
isolated
2015-05-09 21:00:49 +10:00
Paul Riseborough
cb59570938
AP_NavEKF: Remove bug preventing external selection of optical flow mode
2015-05-09 18:31:18 +10:00
Randy Mackay
3390d9932e
AP_AHRS: fix example sketch
2015-05-09 12:23:05 +09:00
Tom Pittenger
2deb0e08ea
AP_NavEKF: replace fabs() with fabsf()
2015-05-09 09:57:27 +10:00
Tom Pittenger
79605de8f5
AP_Mission: replace fabs() with fabsf()
2015-05-09 09:57:27 +10:00
Tom Pittenger
e20ffa8c75
AP_Math: replace fabs() with fabsf()
2015-05-09 09:57:27 +10:00
Tom Pittenger
1c8efb25a8
AP_HAL_SITL: replace fabs() with fabsf()
2015-05-09 09:57:26 +10:00
Tom Pittenger
4b6d0d8e24
AP_HAL: replace fabs() with fabsf()
2015-05-09 09:57:26 +10:00
Tom Pittenger
9d74f57ed3
AP_PID: replace fabs() with fabsf()
2015-05-09 09:57:26 +10:00
Tom Pittenger
70bef20a29
AC_AttitudeControl: replace fabs() with fabsf()
2015-05-09 09:57:26 +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
2552acbf12
AP_Arming: fixed accel cal test in arming
...
use a per-imu time of last cal pass, and triple accel threshold for
IMU3. Raise threshold to 0.5 for IMU1/IMU2
2015-05-08 21:01:52 +10:00
Tom Pittenger
d94c95a6ef
GCS_MAVLink: return true if mission recieve is complete
...
when handing a mission item, and that is the last item, return true so that whoever is handling this knows we have a new mission list. From here we can log a new mission
2015-05-08 21:01:51 +10:00
Paul Riseborough
a232606fc9
AP_NavEKF: Prevent EKF yaw errors due to fast yaw spins
...
Prolonged yaw rotations with gyro scale factor errors can cause yaw errors and gyro bias estimation errors to build up to a point where EKF health checks fail.
This patch introduces the following protections:
1) The assumed yaw gyro error is scaled using a filtered yaw rate and an assumed 3% scale factor error (MPU6000 data sheet)
2) When the filtered yaw rate magnitude is greater than 1 rad/sec, the Z gyro bias process noise is zeroed and the state variance set to zero to inhibit modification of the bias state
3) When the filtered yaw rate magnitude is greater than 1 rad/sec, the magnetometer quaternion corrections are scaled by a factor of four to maintain tighter alignment with the compass
2015-05-08 16:47:31 +09:00
Paul Riseborough
08382373f1
AP_NavEKF: Reduce likelihood of in-air switch to GPS with a bad heading
...
Increases magnetometer weighting on yaw corrections when there there is no other aiding to constrain yaw drift.
Prevents switch to GPS if magnetometer data is failing innovation checks which indicates a bad yaw angle
2015-05-08 16:47:29 +09:00
Randy Mackay
3781f133d7
AC_AttControlHeli: remove unused definitions
2015-05-08 14:50:38 +09:00
Randy Mackay
bef5633ed5
AC_AttControlHeli: use params from parent class
2015-05-08 14:50:36 +09:00
Randy Mackay
7951346d72
AC_AttControl: bf_feedfoward_save made more concise
2015-05-08 14:29:49 +09:00
Randy Mackay
3d9a6a69e2
MotorsHeli: COLYAW to float
2015-05-08 14:14:36 +09:00
Randy Mackay
edfa206bb8
Motors_Heli: nest heli params
2015-05-08 14:14:35 +09:00
Randy Mackay
68b05a4ca2
AP_Motors: is_throttle_mix_min returns bol
2015-05-08 14:14:32 +09:00
Leonard Hall
cf45a1cf3a
AC_AttitudeControl: add get accel and save ff
2015-05-08 14:14:30 +09:00
Leonard Hall
1900cc7582
AC_AttitudeControl: Enable FF by default
2015-05-08 14:14:21 +09:00
Leonard Hall
0f894ac1a8
AP_Motors: Rename and move Throttle Mix / Comp
2015-05-08 14:14:17 +09:00
Jonathan Challinger
142e018a18
AP_NavEKF: fix bug causing takeoff to fail
2015-05-08 09:15:45 +09:00
Randy Mackay
fa4ba456b4
GPS: fix example sketches
2015-05-07 14:01:14 +09:00
Andrew Tridgell
afc9812d0b
AP_InertialSensor: update VibTest after moving messages info DataFlash
2015-05-07 13:25:37 +10:00
Andrew Tridgell
7d90033a36
AP_InertialSensor: support raw accel and gyro dataflash logging
2015-05-07 12:08:30 +10:00
Andrew Tridgell
21d805422d
DataFlash: added defines for raw accel and gyro logging
2015-05-07 12:08:04 +10:00
Andrew Tridgell
f5140e25b0
AP_InertialSensor: updated VibTest for latest PX4 interfaces
2015-05-07 10:51:52 +10:00
Andrew Tridgell
cbdc9f0706
SITL: fixed autotest SITL
2015-05-06 10:09:43 +10:00
Andrew Tridgell
2369e06815
AP_HAL: fixed SITL build on windows
2015-05-06 09:07:03 +10:00
Andrew Tridgell
b09fcfc20e
HAL_Linux: cope with systems without I2C_RDRW_IOCTL_MAX_MSGS
...
such as my ubuntu 14.04 laptop :-)
2015-05-05 21:42:46 +10:00
Andrew Tridgell
6a8da06d19
HAL_SITL: hook in CRRCSim backend
2015-05-05 21:42:46 +10:00
Andrew Tridgell
93d5101bf9
SITL: added CRRCSim simulation connection
2015-05-05 21:42:45 +10:00
Andrew Tridgell
4c11002976
AP_HAL: added HAL_OS_SOCKETS define
...
used for systems with BSD sockets
2015-05-05 21:34:19 +10:00
Andrew Tridgell
08b9ed3342
AP_HAL: added socket handling class
2015-05-05 21:34:19 +10:00
Randy Mackay
9dede2f0ec
Math: remove duplicate HALF_SQRT_2 definition
2015-05-05 14:23:14 +09:00
Randy Mackay
151707cb0a
Filter: replace 2*M_PI_F with M_2PI_F
2015-05-05 14:22:52 +09:00