Paul Riseborough
71c399674a
AP_NavEKF2: Delay use of magnetic field states until off-ground
...
Magnetic interference whilst on the ground can adversely affect filter states. This patch ensures that the simpler and more robust magnetic heading observation method is used until the vehicle has cleared the ground.
2015-10-20 15:21:37 +11:00
Paul Riseborough
99c2dc41e0
AP_NavEKF2: Miscellaneous tuning changes
2015-10-20 15:21:37 +11:00
Paul Riseborough
2d44441d6b
DataFlash: Make EKF2 PosDownDerivative interface follow coding conventions
...
Updates arising from peer review.
2015-10-20 15:21:37 +11:00
Paul Riseborough
ae830b44c4
AP_AHRS: Make EKF2 PosDownDerivative interface follow coding conventions
...
Updates arising from peer review.
2015-10-20 15:21:37 +11:00
Paul Riseborough
840f307d58
AP_NavEKF: Make EKF2 PosDownDerivative interface follow coding conventions
...
Updates arising from peer review.
2015-10-20 15:21:37 +11:00
Paul Riseborough
1323db10e8
DataFlash: Make EKF2 PosDownDerivative interface follow coding conventions
...
Updates arising from peer review.
2015-10-20 15:21:37 +11:00
Paul Riseborough
e8037f94ad
AP_AHRS: Make EKF2 PosDownDerivative interface follow coding conventions
...
Updates arising from peer review
2015-10-20 15:21:37 +11:00
Paul Riseborough
47ae0f35f6
AP_NavEKF2: Make EKF2 PosDownDerivative interface follow coding conventions
...
Updates arising from peer review.
2015-10-20 15:21:37 +11:00
Paul Riseborough
f63c32531c
AP_InertialNav: Address peer review comments
...
The decision to set the origin to zero has been moved out of the AHRS library and into the inertial nav library as this is consumer specific.
2015-10-20 15:21:36 +11:00
Paul Riseborough
58d57994f4
AP_AHRS: Rectify coding errors found during peer review
...
Fixes code that didn't take into account fall-through behaviour of C++ switch statements
Makes get_rigin furnction more generic allowing the consumer to decide what to do with an invalid origin
2015-10-20 15:21:36 +11:00
Paul Riseborough
27393855f1
AP_NavEKF2: Change assumed gyro calibration accuracy
...
If an external gyro calibration has been performed, we should assume that it has been done under static conditions
Otherwise it is pointless and we should allow the EKF to find its own gyro bias offsets.
2015-10-20 15:21:36 +11:00
Paul Riseborough
67a669fcdc
AP_NavEKF2: Correct comments for height measurement
2015-10-20 15:21:36 +11:00
Paul Riseborough
0dc570b5a5
AP_NavEKF2: Improve optical flow takeoff detection logic
...
Ensure takeoff detect status goes to false when on ground
2015-10-20 15:21:36 +11:00
Paul Riseborough
d3a6690e4f
AP_NavEKF2: Fix bugs preventing use of optical flow navigation
2015-10-20 15:21:36 +11:00
Paul Riseborough
24c0309e85
AP_InertialNav: Enable flight using EKF2
...
All EKF functions are accessed via the AHRS library enabling AHRS_EKF_TYPE to determine which EKF is being used by the control loops
2015-10-20 15:21:36 +11:00
Paul Riseborough
e65ae51564
AP_AHRS: Enable AP_InertialNav to access all EKF functions via AP_AHRS
...
This patch adds additional methods to the the AHRS library so that the AP_InertialNav library dow nto have to access the EKF directly. This enables Copter to fly using the EKF nominated by AHRS_EKF_TYPE.
It will also pave the way to elimination of the AP_InertialNav library.
2015-10-20 15:21:36 +11:00
Paul Riseborough
f062ed4180
AP_InertialNav: Add output method for rate of change of vertical position
2015-10-20 15:21:36 +11:00
Paul Riseborough
dab658f6ed
AP_NavEKF: Add methods to output and calculate vertical position derivative
2015-10-20 15:21:36 +11:00
Paul Riseborough
9e3d9d15fc
DataFlash: Log vertical position derivative output
2015-10-20 15:21:35 +11:00
Paul Riseborough
52fd369b2f
AP_NavEKF2: Add methods to output and calculate vertical position derivative
...
This patch calculates a derivative of the vertical position (positive down).
The derivative is exposed via a public function.
2015-10-20 15:21:35 +11:00
Andrew Tridgell
f5b5a3b0f8
AP_NavEKF: added EKF_DISABLE_INTERRUPTS
...
this helps with performance tuning
2015-10-20 14:37:41 +11:00
Andrew Tridgell
10fddf4c7e
AP_NavEKF: enable optimisation level 3 for the EKF
2015-10-20 14:36:56 +11:00
Andrew Tridgell
c9ec8b3f67
AP_Math: added O3 optimisation to core math libraries
...
this costs some flash space but speeds things up considerably
2015-10-20 14:36:53 +11:00
Andrew Tridgell
2ae0811458
AP_NavEK2: fixed perf counter names for EKF2
2015-10-20 14:36:49 +11:00
Randy Mackay
756d564b7c
Mission: sanity check command altitudes
2015-10-19 16:15:08 +09:00
Randy Mackay
acd8252e4b
Common: add location alt max definition
2015-10-19 16:15:05 +09:00
Randy Mackay
b751d2bb18
InertialSensor: remove gyro cal on first arming
2015-10-19 12:00:38 +09:00
Randy Mackay
09aef3a3b8
AP_Arming: remove ahrs check from ins
2015-10-16 13:50:58 +09:00
Randy Mackay
53b39b201b
AP_Arming: make ins check virtual
2015-10-16 13:50:57 +09:00
Randy Mackay
304a23923a
AP_Arming: add Bitmask parameter description
...
Also moved ARMING_CHECK to standard category
2015-10-16 13:50:56 +09:00
Randy Mackay
0cc4b6977e
AP_Arming: add compass consistency check
...
Also moved the offsets and mag field limits into definitions at top of
.cpp file
2015-10-16 13:50:55 +09:00
Randy Mackay
342651cc9b
AP_Arming: add board voltage checks
2015-10-16 13:50:54 +09:00
Randy Mackay
f5f31e4b31
AP_Arming: move ahrs health check after Accel/Gyro checks
...
If the AHRS is unhealthy because of accel or gyro problems we want those underlying problem reported first
2015-10-16 13:50:53 +09:00
Randy Mackay
0a21fe65e9
AP_Arming: do not report prearm_failure_reason when ahrs unhealthy
...
The EKF's prearm failiure message is more related to the position estimate rather than the ahrs's health
2015-10-16 13:50:52 +09:00
Randy Mackay
78c6287f95
AP_Arming: check health of all barometers
2015-10-16 13:50:50 +09:00
Randy Mackay
c716bfce88
AP_Arming: remove most exclamation marks
2015-10-16 13:50:49 +09:00
Randy Mackay
6b91beb3ff
AP_Arming: formatting changes
2015-10-16 13:50:48 +09:00
Andrew Tridgell
6f36267a66
AP_NavEKF: fixed EKF error message during 10 second warmup
2015-10-16 14:58:46 +11:00
José Roberto de Souza
9889f826b3
AP_HAL_Linux: RCInput_UDP: Fix compiling warning
...
This warning happens because of the difference of datatypes between
32 and 64 bits processors.
%% libraries/AP_HAL_Linux/RCInput_UDP.o
/home/zehortigoza/dev/ardupilot/libraries/AP_HAL_Linux/RCInput_UDP.cpp: In member function 'virtual void Linux::LinuxRCInput_UDP::_timer_tick()':
/home/zehortigoza/dev/ardupilot/libraries/AP_HAL_Linux/RCInput_UDP.cpp:42:72: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 3 has type 'uint64_t {aka long unsigned int}' [-Wformat=]
hal.console->printf("no rc cmds received for %llu\n", delay);
2015-10-16 10:28:07 +11:00
José Roberto de Souza
e6f0ba6c8b
AP_HAL_Linux: Compile RCInput_UDP in all Linux boards
...
This RCInput is generic enough to be used on every Linux board.
2015-10-16 10:28:06 +11:00
teddytrowbridge
a4690a7b0a
SITL_State: fixed _set_param_default
...
Fixed _set_param_default() so that it finds the parameter using it's
NAME rather than the entire NAME=VALUE string
2015-10-16 10:20:31 +11:00
José Roberto de Souza
30610fb17d
AP_InertialSensor: Remove misspelled and unused method
2015-10-16 10:16:24 +11:00
José Roberto de Souza
3888579c07
AP_Compass: HMC5843: Use the correctly spelled method
2015-10-16 10:16:24 +11:00
José Roberto de Souza
daa32725ac
AP_InertialSensor: Fix typo: auxiliar to auxiliary
2015-10-16 10:16:24 +11:00
José Roberto de Souza
c53e9d1ff0
AP_Baro: Fix typo
2015-10-16 10:05:03 +11:00
José Roberto de Souza
9a98eb35fc
AP_Baro: Add MS5637 over I2C to init()
2015-10-16 10:05:03 +11:00
José Roberto de Souza
6215a3d224
AP_HAL: Add MS5637 over I2C to the supported barometers list
2015-10-16 10:05:03 +11:00
José Roberto de Souza
c373ce34d1
AP_Baro: MS56XX: Some minor fixes
2015-10-16 10:05:03 +11:00
José Roberto de Souza
d9931b5f34
AP_Baro: Add support to MS5637
...
As AVR2560 is not supported anymore and do integer operations is
usually faster than float-point the _calculate() implementation was
done using only integer operations and as more close to what
datasheet says.
2015-10-16 10:05:03 +11:00
Randy Mackay
6bdeae97b6
Compass: update param descriptions
...
offset parameter units are milligauss
User settable parameters should have a User category defined. Those that should never be set by a user should not have this.
2015-10-15 20:52:38 +09:00
Randy Mackay
131536a3a7
Compass: resolve compiler warning
2015-10-15 20:33:25 +09:00
Randy Mackay
35769035d4
AP_NavEKF2: resolve compiler warning related to init order
2015-10-15 20:03:05 +09:00
Gustavo Jose de Sousa
0caaef7394
AP_Compass: mention mag field unit in existing documentation
...
We are now always using milligauss for mag field unit, so let's update
documentation accordingly.
2015-10-15 19:56:15 +09:00
Gustavo Jose de Sousa
9927cf066f
AP_Compass: remove use of milligauss_ratio
...
Now, we have all current compasses publishing their values already in
milligauss, so there's no need for that variable anymore.
2015-10-15 19:56:14 +09:00
Gustavo Jose de Sousa
b603641d7c
AP_Compass: AK8963: fix where to apply sensitivity adjustments
...
The function rotate_field() can change the values axes and the function
correct_field() applies offsets (which are already in milligauss). Thus any
sensitivity adjustment must be done for two reasons:
(1) The offsets must be applied to the values already in milligauss;
(2) The factory sensitivity adjustment values are per axis, if any rotation
that switches axes is applied, that'll mess with the adjustment.
Experiments showed that before this patch the length of the mag field reported
quite different from the expected. After this patch, the same experiments
showed reasonable values.
2015-10-15 19:56:13 +09:00
Gustavo Jose de Sousa
6198e81bb3
AP_Compass: AK8963: scale mag field internally
...
This is part of the transition to make all mag field values be used in
milligauss.
2015-10-15 19:56:12 +09:00
Gustavo Jose de Sousa
256c9c06c9
AP_Compass: HMC5843: scale mag field internally
...
This is part of the transition to make all mag field values be used in
milligauss. Additionally the value of _gain_multiple is adapted to the new way
we're using it and corrected accordingly to the datasheets.
2015-10-15 19:56:11 +09:00
Gustavo Jose de Sousa
814442563e
AP_Compass: HMC5843: fix _calibrate()
...
The use of _gain_multiple is not necessary because the values of
expected_{x,yz} and _mag_{x,y,z} are both in sensor raw unit (i.e., lsbs).
That wasn't fixed before in order not to make APM users to recalibrate their
compasses.
2015-10-15 19:56:10 +09:00
Gustavo Jose de Sousa
88a1a928e9
AP_Compass: remove get_{field,offsets}_milligauss() functions
...
Those functions are not being used anymore.
2015-10-15 19:56:09 +09:00
Gustavo Jose de Sousa
f0dee75ab3
GCS_MAVLink: use compass get_{field,offsets}() functions
...
Both functions are equivalent, so we're going to simply use
get_{field,offsets}() instead of get_{field,offsets}_milligauss().
2015-10-15 19:56:08 +09:00
Gustavo Jose de Sousa
363f9cf82a
DataFlash: use compass get_{field,offsets}() functions
...
Both functions are equivalent, so we're going to simply use
get_{field,offsets}() instead of get_{field,offsets}_milligauss().
2015-10-15 19:56:07 +09:00
Gustavo Jose de Sousa
afccf615d5
AP_NavEKF: use compass get_{field,offsets}() functions
...
Both functions are equivalent, so we're going to simply use
get_{field,offsets}() instead of get_{field,offsets}_milligauss().
2015-10-15 19:56:03 +09:00
Gustavo Jose de Sousa
99a55f9379
AP_Compass: use compass get_{field,offsets}() functions
...
Both functions are equivalent, so we're going to simply use
get_{field,offsets}() instead of get_{field,offsets}_milligauss().
2015-10-15 19:56:02 +09:00
Gustavo Jose de Sousa
9a2808a593
AP_Arming: use compass get_{field,offsets}() functions
...
Both functions are equivalent, so we're going to simply use
get_{field,offsets}() instead of get_{field,offsets}_milligauss().
2015-10-15 19:56:01 +09:00
Gustavo Jose de Sousa
84f811fe76
AP_AHRS: use compass get_{field,offsets}() functions
...
Both functions are equivalent, so we're going to simply use
get_{field,offsets}() instead of get_{field,offsets}_milligauss().
2015-10-15 19:56:00 +09:00
Gustavo Jose de Sousa
4375606eeb
AP_Compass: make get_field() and get_offsets() return milligauss
...
This is part of a transition to make AP_Compass always use a single unit for
magnetic field values, namely milligauss.
2015-10-15 19:55:59 +09:00
Paul Riseborough
0c61e09b70
AP_NavEKF2: Critical big fix - states not initialised
...
The failure to initialise the magnetometer bias states to zero can result in a large jump in yaw gyro bias and heading when a heading reset is performed.
2015-10-15 09:52:55 +11:00
Paul Riseborough
e3013b493b
AP_NavEKF2: Critical bug fix - perf counter not initialised
2015-10-15 09:48:13 +11:00
Grant Morphett
4f01aaf5e3
AP_Arming: fixing up some ARMING_CHECK param doco
2015-10-13 19:53:55 +09:00
Paul Riseborough
3479a0e209
AP_NavEKF: Prevent blocking of synthetic position fusion
...
Fixes a potential error where changes to timing and arrival rate of magnetometer and baro data could block the fusion of synthetic position and velocity measurements, allowing unrestrained tilt errors during operation without GPS or optical flow.
Fusion of synthetic position or velocity measurements is now timed to coincide with fusion of barometer observations.
If a new barometer observation has not arrived after 200 msec then the synthetic position or velocity is fused anyway so that fusion of synthetic position or velocity observations cannot occur any slower than 5 Hz
2015-10-13 14:05:36 +09:00
Paul Riseborough
a895b16fa6
AP_NavEKF: Prevent GPS glitch activating EKF failsafe
2015-10-12 16:29:21 +09:00
Paul Riseborough
a82c8b241f
DataFlash: Update NKF4 data logging
...
Add roll/pitch error metric
Reduce normalised magnetometer vector with a vector length
2015-10-10 21:22:57 +09:00
Paul Riseborough
20a3f9782e
AP_NavEKF2: Add full set of selectable pre-flight GPS checks
2015-10-10 21:22:53 +09:00
Paul Riseborough
f451a81ef9
AP_NavEKF: Add missing GPs check report
2015-10-10 21:22:49 +09:00
Paul Riseborough
a3a1dabb94
AP_NavEKF: Update GPS check description and default setting
...
Previous check default only checked the number of satellites and horizontal position accuracy.
Updated default value also checks HDoP and speed accuracy.
2015-10-10 21:21:25 +09:00
Paul Riseborough
db4dfce7b1
AP_NavEKF2: Add fix status to GPS check report message
2015-10-10 14:49:07 +09:00
Paul Riseborough
ef5049862a
AP_NavEKF: Add fix status to GPS check report message
2015-10-10 14:49:05 +09:00
Paul Riseborough
ba6387f206
DataFlash: Add logging of EKF GPS check status
2015-10-10 14:49:03 +09:00
Paul Riseborough
5177746c00
AP_NavEKF: Add reporting of GPS check status
2015-10-10 14:49:01 +09:00
Paul Riseborough
22920aafad
AP_NavEKF2: Improve GPS status reporting
2015-10-10 14:48:59 +09:00
Paul Riseborough
d0080b66cd
AP_NavEKF: Define a structure for reporting of GPS checks
2015-10-10 14:48:56 +09:00
Paul Riseborough
1cb2220107
AP_NavEKF2: Critical Bugfix
2015-10-10 14:48:54 +09:00
Paul Riseborough
f467a89fa3
AP_NavEKF2: Update comments for filter status output function
2015-10-10 14:48:52 +09:00
Paul Riseborough
b142cc7fd2
AP_NavEKF2: Rename files and re-distribute content
2015-10-10 14:48:50 +09:00
Siddharth Bharat Purohit
1ce3276d74
AP_NavEKF2: split EKF control and output get functions from state specific libs
2015-10-10 14:48:48 +09:00
Siddharth Bharat Purohit
2e388fb2f9
AP_NavEKF2: split otp flow from PosVelNED
2015-10-10 14:48:46 +09:00
Siddharth Bharat Purohit
290ea0e1e8
AP_NavEKF2: split up EKF_core into different files
2015-10-10 14:48:44 +09:00
Caio Marcelo de Oliveira Filho
b5abab9d37
AP_GPS_GSOF: minor tweak to avoid warning
...
Fixes the issue of three unused variables, two of which were used in a
commented Debug() call.
To keep the convenient debug message (and the variable names for the
data bytes), this patch uncomment the debug call but wrap the variables
and the debug call around an ifdef for the local symbol
gsof_DEBUGGING. So by turning it on, the debug will already be in place.
The Debug() call was modified to actually compile and include the third
variable in the output.
2015-10-10 14:34:54 +09:00
Paul Riseborough
2b0434f089
AP_NavEKF: Improved detection of GPS glitch behaviour
2015-10-08 15:09:45 +09:00
Paul Riseborough
d48d4ac950
AP_NavEKF: Add GPS glitching monitor to EKF status report
2015-10-08 15:09:43 +09:00
Paul Riseborough
8a9d9c04c5
AP_NavEKF: Add public function to declare GPS glitch
2015-10-08 15:09:40 +09:00
Paul Riseborough
21e4910149
AP_NavEKF: Allow user to select preflight GPS checks
2015-10-08 15:09:37 +09:00
Paul Riseborough
cdae84aec1
AP_NavEKF: Additional pre-arm GPS quality checks
2015-10-08 15:09:34 +09:00
Paul Riseborough
8a66c9c2ed
AP_NavEKF: Critical Bugfix
2015-10-08 10:54:34 +09:00
Randy Mackay
825abdbedc
Compass: example sketch displays in milligauss
2015-10-07 21:35:24 +09:00
Randy Mackay
d3066fcdad
GCS_MAVLink: send compass vector to GCS in milligauss
2015-10-07 21:35:21 +09:00
Randy Mackay
e9254ca1a9
DataFlash: log compass as milligauss
2015-10-07 21:35:19 +09:00
Randy Mackay
2deaf5280e
RangeFinder: add User to param descriptions
...
First sensor appears in standard list, second in advanced
2015-10-07 14:10:24 +09:00
Julien BERAUD
b37c52f7a3
AP_InertialSensor_MPU6000: Add heat support
...
Send current tempertaure to the Heater so the control loop sets the correct
temperature to the imu
2015-10-06 15:21:39 +11:00
Julien BERAUD
f231182cd9
AP_HAL: Add support for a Heater
...
Add heater class and non-pure virtual method to Util class in order to do
nothing in case the function is not implemented
2015-10-06 15:21:39 +11:00