Commit Graph

6565 Commits

Author SHA1 Message Date
priseborough
76d1378962 AP_NavEKF: Fix compiler warning messages 2015-01-01 23:39:48 +11:00
priseborough
3e3dd9d695 AP_NavEKF: Fix parenthesis error in EKF status reporting and clean up logic
This fixes a bug which could have caused the realative position status to be incorrectly reported under some conditions and also caused a compiler warning message. the logic used to report the filter solution status has been broken down into smaller, easier to understand statements.
2015-01-01 23:39:48 +11:00
priseborough
c06f6e105e AP_NavEKF: Consistent initialisation of tuning parameters and variables
Non user adjustable parameters are now declared as 'const' in the header.
The _ prefix has been removed from non user adjustable tuning parameters.
We use a function call rather than a constructor to initialise variables because it enables the filter to be re-started in flight if necessary.
For consistency some signed integer type declarations have been changed to unsigned where appropriate.
2015-01-01 23:39:31 +11:00
priseborough
f1dfa282dc AP_NavEKF: Consolidate constant velocity mode decision logic
The decision to switch to constant velocity mode during optical flow operation and te decision to switch back were previously being made in two different places in code. Both decisions are now made in the one place which makes the code easier to follow and maintain.
2015-01-01 19:53:21 +11:00
priseborough
9caf2ac895 AP_NavEKF: Make reversion to no GPS mode unambiguous 2015-01-01 19:53:21 +11:00
priseborough
58e9dd5dcd AP_NavEKF: Enumerate Position and Velocity aiding status 2015-01-01 19:53:21 +11:00
Andrew Tridgell
fb5e53e1e4 AP_Param: cope with older gcc versions
Travis-CI uses 4.6.3
2015-01-01 18:55:11 +11:00
Andrew Tridgell
9ae0dd05f8 AP_Param: avoid build warning due to %S format 2015-01-01 18:25:05 +11:00
Andrew Tridgell
f38f86ab8c AP_Math: added location_path_proportion()
this can be used for glide slope calculations
2015-01-01 15:17:10 +11:00
Andrew Tridgell
4e5510c99e AP_TECS: fixed warning 2015-01-01 15:14:48 +11:00
Andrew Tridgell
f8bce994b5 AP_OpticalFlow: don't write an error message if no flow sensor
most users have no flow sensor
2015-01-01 11:02:43 +11:00
Andrew Tridgell
06a72839ed AP_InertialSensor: fixed error detection on secondary IMUs
the break; was preventing error detection on lsm303d/l3gd20
2015-01-01 08:55:57 +11:00
Randy Mackay
022c549339 BattMon_SMBus_I2C: use get_PEC to check reads 2014-12-31 15:23:00 +09:00
Randy Mackay
bf0e5a350c BattMon_SMBus_I2C: add get_PEC method 2014-12-31 15:22:59 +09:00
Randy Mackay
3951e4d99b BattMon: example sketch reads from SMBus 2014-12-31 15:22:58 +09:00
Randy Mackay
aecc8aac1f BattMon: correct typo in monitor type enum 2014-12-31 15:22:57 +09:00
Randy Mackay
909d525206 BattMon: fix example sketch compile error 2014-12-31 15:22:51 +09:00
Randy Mackay
cf36fd55bd GCS_MAVlink: correct sending of 2nd battery's voltage 2014-12-31 15:22:49 +09:00
Randy Mackay
76a28a962c BattMon: remove #defines for monitor type 2014-12-31 15:22:47 +09:00
Randy Mackay
f077ecd338 BattMon_PX4: class to read from PX4Firmware via orb 2014-12-31 15:22:46 +09:00
Randy Mackay
3f35dc54fe BattMon_I2C: smart battery class for APM 2014-12-31 15:22:45 +09:00
Randy Mackay
314db1403d BattMon_SMBus: smart battery monitor driver 2014-12-31 15:22:45 +09:00
Randy Mackay
4d7df9ed26 BattMon_Analog: move analog features to new class 2014-12-31 15:22:44 +09:00
Randy Mackay
39dbf05c8f BattMon_Backend: create backend class 2014-12-31 15:22:43 +09:00
Randy Mackay
eec66d8451 BattMon: parent class becomes frontend class 2014-12-31 15:22:42 +09:00
Randy Mackay
c36253b9b2 AC_PosControl: add comments
No functional change
2014-12-31 14:03:22 +09:00
Jonathan Challinger
6eab698e85 AC_WPNav: remove various timing hacks 2014-12-31 14:03:20 +09:00
Jonathan Challinger
557d339cf1 AC_PosControl: remove various unnecessary timing hacks 2014-12-31 14:03:18 +09:00
Jonathan Challinger
5438d38df5 AC_WPNav: provide reset_I to init_xy_controller 2014-12-31 14:03:16 +09:00
Jonathan Challinger
d6e455417f AC_PosControl: change keep_xy_I_terms to a parameter of init_xy_controller 2014-12-31 14:03:13 +09:00
priseborough
b016bae445 AP_NavEKF: Clean up reset of constant velocity mode
Move velocity store out of optical flow to velocity and position fusion control as it is a velocity fusion function.
Always clear the previous mode status
2014-12-31 13:16:16 +09:00
priseborough
3d207c316a AP_NavEKF: Change names for position and velocity hold modes
Name change done to avoid confusion with flight modes. modes are now referred to as constant position and constant velocity mode.
2014-12-31 13:16:15 +09:00
priseborough
b650ee51a9 AP_NavEKF: Consolidate arming checks 2014-12-31 13:16:15 +09:00
priseborough
48cae0df15 AP_NavEKF: Fall back to attitude and hgt estimation for copter if GPS lost 2014-12-31 13:16:14 +09:00
priseborough
b21f9daa90 AP_NavEKF: Update solution status reporting
This patch makes the reporting of an absolute position solution less abbiguaous and ensures that relative position is always true if absolute position is true
2014-12-31 13:16:13 +09:00
priseborough
b99b3c7b9d DataFlash: Don't log EKF optical flow data if not required 2014-12-31 13:16:09 +09:00
priseborough
b6d300db19 AP_NavEKF: clean up determination of GPS availability 2014-12-31 13:14:22 +09:00
priseborough
40b02fc19a AP_NavEKF: Ensure filter doesn't try to use GPS after initialisation 2014-12-31 13:14:20 +09:00
priseborough
bab1a69f1c AP_NavEKF: make position and velocity resets consistent with GPS usage 2014-12-31 13:14:18 +09:00
priseborough
0dc2356175 AP_NavEKF: Ensure initialisation methods read required sensor data 2014-12-31 13:14:16 +09:00
priseborough
5d1de79f08 AP_NavEKF: Modify initial values to make startup behaviour more consistent 2014-12-31 13:14:14 +09:00
priseborough
a63af34d8f AP_NavEKF: Allow 10 seconds for the filter to settle after initialisation
Filter is declared unhealthy and will not arm for first 10 seconds after initialisation
2014-12-31 13:14:12 +09:00
priseborough
0a5de21dc7 AP_NavEKF: Fix bug in reporting of solution status
Because synthetic  position measurements at 0,0 are fused during position hold mode, a position timeout cannot be used as the only means of detecting position solution status.
2014-12-31 13:14:09 +09:00
priseborough
92c3026072 AP_NavEKF: Link process noise to arm status, not pos hold mode 2014-12-31 13:14:07 +09:00
priseborough
a535b73a6d AP_NavEKF: Initialise timeout status to true
This status will be cleared when data arrives and is fused successfully
2014-12-31 13:14:04 +09:00
priseborough
363c1e393d AP_NavEKF: Latch use of position hold mode for duration of flight
Required to prevent acquisition of GPS mid flight causing unwanted change in position and velocity
A distinction has been mad between the arm and disarm transition and the decision to use position hold mode (formerly static mode)
2014-12-31 13:14:02 +09:00
priseborough
a0a6c0362f AP_NavEKF: Relax timeout check applied to optical flow data
200 msec was too short and could lead to false positives. 5000 msec is the largest time we can go free inertial.
2014-12-31 13:14:00 +09:00
priseborough
5bd4ee9715 AP_NavEKF: Use compensation for baro delay in position hold mode 2014-12-31 13:13:58 +09:00
priseborough
4dc1ee2d66 AP_NavEKF: Rename static mode to avoid confusion with other non-GPS modes
This renames static mode as posHoldMode to make it clearer what this and the other non-GPS modes do
2014-12-31 13:13:54 +09:00
priseborough
b160f4c03b AP_NavEKF: Compensate optical flow fusion for GPS glitch recovery offset 2014-12-31 13:13:52 +09:00