Commit Graph

6512 Commits

Author SHA1 Message Date
priseborough
3891dada78 AP_NavEKF: remove unnecessary function 2014-12-31 13:13:44 +09:00
priseborough
a16253796f AP_NavEKF: Fix bug preventing the non-GPS mode being selected externally
When on the ground it is likely the flow sensor will be returning  data that does not meet the minimum quality requirements selected.
The previous check was for the presence of valid data. This has been loosened to look for the presence of data.
When the vehicle becomes airborne, the quality of flow data normally improves as the image comes into focus.
2014-12-31 13:13:42 +09:00
priseborough
a42100e4c5 AP_NavEKF: Improved handling of no GPS
This patch enables indoor operation of the EKF by putting it into static mode if optical flow operation is not enabled and no GPS is available
2014-12-31 13:13:40 +09:00
priseborough
73a06cd0c1 AP_NavEKF: Fix bug causing magnetic field state learning to be forgotten 2014-12-31 13:13:37 +09:00
priseborough
bf89c56e54 AP_NavEKF: Fix comments error in description of flow sensor sign conventions 2014-12-31 13:13:35 +09:00
priseborough
685fa383e4 DataFlash: Log EKF solution status message
This message is a bitmasked integer that will be used by control software to determine what data is available from the EKF and decide what control modes are available.
Duplicate static mode message removed. Static mode is now contained in the bitmasked solution status message
2014-12-31 13:13:33 +09:00
priseborough
4eb19c2324 AP_NavEKF: Rationalise health status reporting
1) Un-used public methods to report height and position drifting have been removed
2) A time-out has been added to the airspeed innovation consistency check so that if we are relying on airspeed to constrain velocity drift, a filter divergence or other fault that causes the airspeed to be continually rejected will trigger a change in health status.
3) A timeout of velocity, position or height measurements does not cause a filter fault to be reported. Timeouts can be due to sensor errors and do not necessarily indicate that the filter has failed.
4) Time-outs of various measurements are used to present a consolidated bitmask which inidicates which parts of the solution can be used, eg attitude, height, velocity, relative position, absolute position, etc.
2014-12-31 13:13:31 +09:00
priseborough
78b30e4ce5 AP_NavEKF: Increase rate at which GPS glitch offsets are reduced for planes 2014-12-31 13:13:29 +09:00
Andrew Tridgell
e0943851d6 DataFlash: log gyro and accel error counts 2014-12-30 12:16:02 +11:00
Andrew Tridgell
b9adc6e466 AP_InertialSensor: prefer sensors that have zero error counts
if a sensor has failed in flight then try not to use it if another
error-free sensor is available
2014-12-29 21:19:35 +11:00
Randy Mackay
4a1ba9b186 AC_WPNav: minor const fix 2014-12-27 13:19:32 +09:00
Randy Mackay
c7192c5eef Notify: remove Led class
This class didn't add any functionality beyond what the NotifyDevice class
already provided so in keeping with our desire to keep things simple we
can remove this class
2014-12-26 13:06:41 +09:00
Randy Mackay
352b52d73f Notify: remove reliance on Led class 2014-12-26 13:06:24 +09:00
Randy Mackay
d67b4a8d49 Notify: add pre_arm_gps_check flag
RGB LED will remain flashing blue when vehicle is disarmed and this
check has failed (i.e. false).
2014-12-26 12:32:34 +09:00
Andrew Tridgell
c93ae67541 DataFlash: don't try and open logfile on failure more than once
this prevents a corrupted microSD card from causing a continuous
attempt to open a log file while in flight, which can cause large
scheduler delays

Pair-Programmed-With: Grant Morphett <grant@gmorph.com>
2014-12-21 14:50:42 +11:00
Andrew Tridgell
abd1ece6e3 DataFlash: don't write out parameters if log open fails 2014-12-21 14:50:42 +11:00
priseborough
f2c506339a AP_NavEKF: Reduce time required to recover from GPS timeouts
The time required for GPS to be lost or rejected before vehicles with airspeed sensors either reset to GPS or invoke the zero side-slip assumption to constrain drift has been reduced from 15 to 10 seconds
A duplicate zeroing of the GPS position offset has been removed
If the vehicle is a non hovering vehicle (eg a plane) then the speed at which the GPS offset is pulled back to zero after a reset is increased from 1 to 3  m/s

This also improves recovery from bad inertial data for planes
2014-12-18 21:50:40 +11:00
priseborough
f73816dbb5 AP_NavEKF: Improve robustness to long periods without GPS 2014-12-18 21:07:45 +11:00
Randy Mackay
a44b4b5e87 Mission: allow 15 do-jump commands on Pixhawk 2014-12-18 17:02:48 +09:00
priseborough
3afde0061f AP_NavEKF: Use named states for velocity reset
Readibility improvement
2014-12-18 17:29:50 +11:00
priseborough
f6ce25df2a AP_NavEKF: Do not reset vertical velocity state from GPS
Doing this can cause large height and height rate errors if large GPS velocity errors cause the GPS tn be rejected for long enough to cause a timeout and reset of states.
2014-12-18 17:29:47 +11:00
Andrew Tridgell
597273cfff AP_TECS: remove lag from height demand in landing
this predicts ahead the height demand for landing, where we have a
continuous demanded descent. This removes the effect of the lag
introduced by the height demand filters
2014-12-18 09:58:12 +11:00
Andrew Tridgell
b5a5b71512 GCS_MAVLink: reverse sense of check_and_forward()
also increase number of routes on larger systems and improved route
learning logic
2014-12-17 10:32:28 +11:00
Andrew Tridgell
a967a682a4 GCS_MAVLink: added routing test sketch 2014-12-17 10:32:28 +11:00
Andrew Tridgell
7f817502c4 GCS_MAVLINK: implement new routing rules
see description in coments
2014-12-17 10:32:28 +11:00
Andrew Tridgell
70f5ec60e8 AP_TECS: added get_land_sinkrate() 2014-12-15 21:51:07 +11:00
Andrew Tridgell
8c1cab84c7 AP_SpdHgtControl: added get_land_sinkrate() 2014-12-15 21:51:07 +11:00
Randy Mackay
21beb26484 Notify: minor event reordering
No functional change
2014-12-15 14:10:26 +09:00
Randy Mackay
e68a69e139 ToneAlarm_PX4: remove user_mode_init flag
Replaced by an initialised check in the main ArduCopter flight code
2014-12-15 14:10:21 +09:00
Randy Mackay
1c8ab375e2 Notify: rename failsafe_action event 2014-12-15 14:10:15 +09:00
Randy Mackay
972c8e47d2 Notify: rename notify_types to notify_flags_type 2014-12-15 14:10:10 +09:00
Randy Mackay
bfc86ac7c0 ToneAlarm_PX4: add comments 2014-12-15 14:10:06 +09:00
Randy Mackay
c75ab8f3e5 Notify: add comments re events 2014-12-15 14:09:15 +09:00
Jonathan Challinger
3dfcdde6be AP_Notify: Rework ToneAlarm_PX4 to play tones from local array 2014-12-15 14:09:04 +09:00
priseborough
e2d47f836e AP_TECS: Fix bug causing plane to fly high on landing approach
The introduction of the height rate flare logic caused the demanded height rate to be zero except when a flare manouevre was being performed. This caused the plane to lag behind height changes if the D gain was non-zero, which caused it to fly high during landing approach.
2014-12-14 09:43:46 +11:00
Randy Mackay
b54b7b7448 GCS_MAVLink: fix compiler error 2014-12-11 16:26:26 +09:00
Randy Mackay
e581e81da5 AP_NavEKF: reorder declation to fix compiler warning
No functional change
2014-12-11 15:37:56 +09:00
Randy Mackay
ddda0d52ce Baro: reorder declaration to fix compiler warning
No functional change
2014-12-11 13:06:24 +09:00
Andrew Tridgell
ade7f9e1a9 GCS_MAVLink: fixed forwarding of non-targetted messages 2014-12-11 12:32:50 +09:00
Andrew Tridgell
fcf17829cc GCS_MAVLink: fixed addition to routing table 2014-12-11 12:32:48 +09:00
Andrew Tridgell
079158d4b8 GCS_MAVLink: strip out the old GCS_Class class
this is not longer needed as we don't support multiple protocol
classes
2014-12-11 12:32:45 +09:00
Andrew Tridgell
f198cdcf20 GCS_MAVLink: added support for a MAVLink snoop function
this can be used to watch messages for different targets
2014-12-11 12:32:32 +09:00
Andrew Tridgell
34be7f808e GCS_MAVLink: only try to fwd packets to active channels 2014-12-11 12:32:30 +09:00
Andrew Tridgell
411766f45a AP_Mount: removed use of mavlink_check_target() 2014-12-11 12:32:27 +09:00
Andrew Tridgell
4a9331c505 AP_Camera: removed use of mavlink_check_target() 2014-12-11 12:32:24 +09:00
Andrew Tridgell
f1edd1bafb GCS_MAVLink: removed use of mavlink_check_target()
not needed now we do routing properly, as messages will only be
processed if they are for us
2014-12-11 12:31:06 +09:00
Andrew Tridgell
aa88ba4158 GCS_MAVLink: only call message handler for our own messages 2014-12-11 12:30:59 +09:00
Andrew Tridgell
11f88f0f5d GCS_MAVLink: added routing object to GCS_MAVLink 2014-12-11 12:30:55 +09:00
Andrew Tridgell
b91529622b GCS_MAVLink: initial implementation of MAVLink routing object
will be used to auto-route packets over all available links
2014-12-11 12:30:50 +09:00
Andrew Tridgell
76c710f596 GCS_MAVLink: removed obsolete headers 2014-12-11 12:30:46 +09:00