Commit Graph

5015 Commits

Author SHA1 Message Date
Andrew Tridgell a7f213a5c5 AP_NavEKF: use pythagorous2() 2014-04-01 22:13:03 +11:00
Andrew Tridgell 9ab1a79b5a AP_Airspeed: changed sqrt() to sqrtf() 2014-04-01 22:09:21 +11:00
priseborough 09c5ba1aed Dataflash : Improved logging of EKF sensor health checks
This changes the definition sof the messages in the EKF4 message to make it more useful
The values shown now relate directly to how much margin there is before a measurement
is rejected, enabling better tuning of error trap parameters
2014-04-01 21:27:07 +11:00
priseborough 04036d7777 AP_NavEKF : Updated GPS glitch protection logic
This adds new functionality to the detection and compensation of GPS
glitches:

1) A maximum allowable innovation is calculated using the GPS noise
parameter multiplied by the gate, with an additional component allowing
for growth in position uncertainty due to acceleration error since
the last valid measurement
2) Includes per vehicle type values for the acceleration error limit
3) If the innovation length exceeds the maximum allowable, no fusion occurs
4) If no fusion has occurred for long enough such that the position uncertainty
exceeds the maximum set by a per vehicle parameter or a maximum time, an offset
is applied to the GPS data to so that it matches the value predicted by the filter
5) The offset is never allowed to be bigger than 100m
6) The offset is decayed to zero at a rate of 1.0 m/s to allow GPS jumps to
be accommodated gradually
7) The default velocity innovation gate has been tightened up for copter and rover
8) The variance data logging output has been updated to make it more useful
2014-04-01 21:22:14 +11:00
Andrew Tridgell 7e2ef0cfc0 AP_GPS: fixed GPS for Replay 2014-04-01 17:25:15 +11:00
Andrew Tridgell 9278685cdf AP_Math: fixed location build on SITL 2014-04-01 14:20:10 +11:00
Andrew Tridgell 77e2f48581 AP_GPS: fixed notify updates for new API 2014-04-01 06:38:25 +11:00
Andrew Tridgell 9781175bf5 AP_GPS: fixed handling of driver destruction
this allows for more complex destructors, and ensures we don't have
multiple backends allocated at once per instance
2014-04-01 06:38:25 +11:00
Andrew Tridgell 7ceba8dce4 AP_GPS: prevent double allocation of GPS drivers 2014-04-01 06:38:25 +11:00
Andrew Tridgell 8779ffe088 AP_GPS: flush pending config strings when uBlox starts 2014-04-01 06:38:25 +11:00
Andrew Tridgell 0191355488 AP_GPS: fixed init strings to all be in progmem
and sent async ...
2014-04-01 06:38:25 +11:00
Andrew Tridgell bc0c9ad6d5 AP_InertialNav: fixed example build 2014-04-01 06:38:25 +11:00
Andrew Tridgell 35c111a63a AP_AHRS: fixed example build 2014-04-01 06:38:25 +11:00
Andrew Tridgell 7b2d56a8cb AC_Fence: disable example build
fails to build with compiler error
2014-04-01 06:38:25 +11:00
Andrew Tridgell 3b8c6e629d AC_AttitudeControl: updated example for new GPS API 2014-04-01 06:38:25 +11:00
Andrew Tridgell c2486d8d6e AP_GPS: updated examples for new API
removed old per-driver examples, and updates AUTO example
2014-04-01 06:38:25 +11:00
Andrew Tridgell d04d33a02d AP_InertialNav: convert to new GPS API 2014-04-01 06:38:24 +11:00
Andrew Tridgell 5a2e84e792 AP_NavEKF: changes for new GPS API 2014-04-01 06:38:24 +11:00
Andrew Tridgell b7a2db716b AP_Arming: convert to new GPS API 2014-04-01 06:38:24 +11:00
Andrew Tridgell eb67948171 AP_Mount: convert to new GPS API 2014-04-01 06:38:24 +11:00
Andrew Tridgell f07e4dee52 AP_AHRS: convert to new GPS API 2014-04-01 06:38:24 +11:00
Andrew Tridgell 31d3b6555f DataFlash: convert to new GPS API 2014-04-01 06:38:23 +11:00
Andrew Tridgell 368daf89f1 AP_GPS: new GPS API
This is a complete rewrite of the GPS driver structure, with a static
main driver and separate backend drivers. This will allow proper
support for multiple GPSes, and will allow parameters to be set on the
GPS object
2014-04-01 06:38:23 +11:00
Andrew Tridgell 2dd92832dc AP_GPS: support multiple AP_GPS_Auto drivers
move all static variables into a dynamically allocated structure in
the AUTO driver which gets freed when we have found a GPS type
2014-04-01 06:38:23 +11:00
Andrew Tridgell 3c4389180e AP_GPS: removed GPS_406 driver
this driver was untested and badly structured. If we want to support
the 406 we can revive it and do it properly
2014-04-01 06:38:23 +11:00
Jonathan Challinger f0fc0397d3 Notify: add arming failure tone 2014-03-31 20:34:27 +09:00
Randy Mackay 7bb981f2df AP_Notify: correct dos formatting 2014-03-31 20:34:24 +09:00
Andrew Tridgell 31082f4ce2 AP_Mission: fixed a bug re-entering AUTO
this fixes a bug found by Marco where we would continue in CRUISE mode
with no waypoint if we re-entered AUTO after a mission reset
2014-03-31 06:18:07 +11:00
Randy Mackay 93f8d53d1b Mission: make get_prev_nav_cmd_index const 2014-03-30 23:09:54 +09:00
Randy Mackay b15d4379d8 AC_WPNav: use atan2f, make methods const 2014-03-30 23:09:51 +09:00
Randy Mackay 3ad635feeb AC_AttControl: 45deg/sec yaw rate for Auto, RTL 2014-03-30 15:44:14 +09:00
Randy Mackay d27ca53a9d AC_WPNav: spline sets origin vel to zero when no prev segment
Issue caught by Michael Oborne
2014-03-30 15:19:18 +09:00
Randy Mackay 7dfde39e19 AC_WPNav: advance_spline to use dt 2014-03-30 15:02:07 +09:00
Randy Mackay c0458b786a AC_WPNav: check acceleration is non zero 2014-03-30 11:52:44 +09:00
Randy Mackay f0f3688172 AC_WPNav: rounder corners for short spline segments 2014-03-30 11:52:41 +09:00
priseborough 9c5f564dc5 AP_NavEKF : Fixes bug in initial earth magnetic field states
The calculation for these states was not being bias corrected
2014-03-30 07:43:52 +11:00
Randy Mackay 7bff8e9312 AC_AttControl: constrain earth frame yaw angle error
This temporarily resolves the wobble we see in Auto when the target
heading is suddenly changed leading to a large yaw angle error
2014-03-29 20:42:21 +09:00
Randy Mackay 197683d539 WPNav: clean up spline comments 2014-03-29 17:57:47 +09:00
priseborough e1819bb53a AP_NavEKF : Add initial parameter defaults for Copter, Rover and Plane 2014-03-29 14:06:43 +11:00
Randy Mackay ac339a0289 Mission: add decoding of NAV_SPLINE command 2014-03-28 09:23:30 +09:00
Randy Mackay e7be622eef GCS_MAVLink: generate after adding NAV_SPLINE cmd 2014-03-28 09:23:28 +09:00
Randy Mackay 519d5fc444 GCS_MAVLink: add MAV_CMD_NAV_SPLINE_WAYPOINT cmd
This is the same as a NAV_WAYPOINT except that the vehicle flies a
spline curved path to the destination
2014-03-28 09:23:23 +09:00
Randy Mackay 24eb195aa3 WPNav: add yaw control for straight line wp nav 2014-03-28 09:23:13 +09:00
Randy Mackay b42b12f7be AC_WPNav: add get_spline_yaw 2014-03-28 09:23:07 +09:00
Randy Mackay f2d9ad41aa Mission: minor comment update 2014-03-28 09:22:56 +09:00
Randy Mackay e5e71ce371 WPNav: add spline support 2014-03-28 09:22:53 +09:00
Michael Day e1d193f539 GCS_MAVLink: Generated code from message additions for autofence. 2014-03-27 09:26:20 +11:00
Michael Day c5ebd120f1 GCS_MAVLink: XML for MAV_CMD_DO_FENCE_ENABLE and MAV_SYS_STATUS_GEOFENCE 2014-03-27 09:26:20 +11:00
priseborough 55c60b8f07 AP_NavEKF : Reduce Magnetometer innovation consistency check threshold 2014-03-26 21:29:47 +11:00
priseborough 45b1a2fa46 AP_NavEKF : Reduce GPS position innovation consistency fail threshold
This patch reduces the maximum acceptable GPS jump from approximately 16 to 8 metres
This will provide copters with more protection for close in loiter situations
2014-03-26 21:29:45 +11:00