Commit Graph

191 Commits

Author SHA1 Message Date
Andrew Tridgell 1e20f89f90 AP_Compass: use HAL_COMPASS_DEFAULT in example code 2014-07-14 09:44:36 +10:00
Randy Mackay bbf4805b0e Compass: update pixhawk expected device ids 2014-07-11 11:10:18 +09:00
Craig Elder c9f3adcb5c Compass: Updated COMPASS_PRIMARY parameter description 2014-07-10 15:32:06 -07:00
Craig Elder 0ecd12b1c6 AP_Compass: Corrected typo in parameter description
Corrected typo in parameter description
2014-07-10 14:19:19 -07:00
Randy Mackay 4995b9ada8 Compass: default device id to zero 2014-07-10 20:25:36 +09:00
Randy Mackay 16d4af8346 Compass: sanity check instance in set_and_save_offsets 2014-07-10 20:25:32 +09:00
Randy Mackay cf7e1a6339 Compass: example sketch update for set_and_save_offsets 2014-07-10 20:25:13 +09:00
Randy Mackay a778522cef Compass: add learn_offsets_enabled accessor method 2014-07-10 20:25:11 +09:00
Randy Mackay 108c878b04 Compass: set_offsets modified to also save offsets 2014-07-10 20:25:08 +09:00
Randy Mackay 124bd4b489 Compass: save_offsets accepts compass instance 2014-07-10 20:25:05 +09:00
Randy Mackay 070f1c1bbb Compass: add dev_id for VRBrain 2014-07-10 20:24:49 +09:00
Randy Mackay f42c9579d7 Compass: add dev_id for PX4
dev_id is retrieved from PX4Firmware via ioctl call
2014-07-10 20:24:46 +09:00
Randy Mackay b7f33d81ad Compass: add DEV_ID param and configured method
These allow checking the offsets were created with the current compass
device.
2014-07-10 20:24:44 +09:00
Andrew Tridgell c138244155 AP_Compass: support 3 mags on PX4 2014-07-04 12:07:47 +10:00
Emile Castelnuovo 8f3a4bc88b VRBRAIN: correction to AP_Compass_VRBRAIN.cpp 2014-06-19 11:27:45 +02:00
LukeMike 8f552d5758 VRBRAIN: Changed the management of VirtualRobotix's boards. 2014-06-19 11:27:38 +02:00
Andrew Tridgell e9e1799700 AP_Compass: fixed VRBrain build 2014-06-02 10:42:37 +10:00
Andrew Tridgell 2d9e9d9bc3 AP_Compass: added COMPASS_PRIMARY parameter
this allows selection of which compass is the primary. Useful if the
first compass starts giving spurious data (as happened in our plane)
2014-05-25 22:03:44 +10:00
Jonathan Challinger e883b889b6 SITL: Add compassmot interference 2014-05-15 21:14:20 +10:00
Kevin Hester b7bed437c2 Compass: fixup line endings 2014-04-15 15:56:57 +09:00
Emile Castelnuovo 1bc199c5bd AP_Compass: new files and definition for VRBRAIN board 2014-04-08 16:19:19 +10:00
Andrew Tridgell 485ae596fc AP_Compass: fixed last_update for secondary compass with primary failed
this ensures EKF and DCM will use a secondary compass if the primary
fails
2014-03-23 22:05:17 +11:00
Matthew Lloyd 60a4f74de6 AP_Compass: avoid division by zero if we haven't received any mag reports
Otherwise, get_field() will return NaNs after once every few calls to
read() during compassmot on PX4 platforms, which causes compassmot to fail.

This is a quick hack around the deeper issue, which could be something
like the PX4 mag driver experiencing starvation and skipping mag reports,
buffer overrun or something else that causes mag reports to be dropped.
Or perhaps we should never expect in the first place that we will always
receive at least one mag report between calls to read().
2014-03-23 21:22:32 +11:00
Andrew Tridgell db48ed9218 AP_Compass: fixed showing of is_external for 2nd compass 2014-03-13 16:26:43 +11:00
Andrew Tridgell cf148fa76c AP_Compass: improved COMPASS_ORIENT and COMPASS_EXTERNAL for Pixhawk 2014-02-27 12:46:27 +11:00
Andrew Tridgell 189d635493 AP_Compass: constrain compass offsets to +/- 2000
this is prompted by a user log showing NaN compass offsets, resulting
in a crash. The patch ensures we never end up with NaN offsets, and
also constrains the offsets to a reasonable limit
2014-02-16 13:33:41 +11:00
Andrew Tridgell 9bb8f73d56 Compass: split compass learning out to its own C++ file 2014-02-16 13:21:06 +11:00
Andrew Tridgell 54562b0b9a AP_Compass: prevent bad initial values from affecting HMC5883 calibration
the first couple of values after we enter strap mode may be low, but
just above our 0.7 threshold. We now discard the first two values to
prevent these affecting the average.

Also added some commented out debug code and a comment on the scaling
of the calibration code
2014-01-22 17:15:34 +11:00
Andrew Tridgell bc2d17e76e AP_Compass: added vector compass setHIL method 2013-12-30 14:35:24 +11:00
Andrew Tridgell c44d8b45ce AP_Compass: auto-select healthy compass 2013-12-09 20:01:42 +11:00
Andrew Tridgell 61f564d7c9 AP_Compass: support motor compensation for multiple compasses
Pair-Programmed-With: Randy Mackay <rmackay9@yahoo.com>
2013-12-09 19:45:31 +11:00
Andrew Tridgell 0a7a935f63 AP_Compass: fixup 2013-12-09 17:54:54 +11:00
Andrew Tridgell c538816825 AP_Compass: support compass health status on multiple compasses 2013-12-09 17:46:41 +11:00
Andrew Tridgell bde89fd4e2 AP_Compass: added compass offsets for 2nd compass 2013-12-09 17:34:07 +11:00
Andrew Tridgell 8a97042fb1 AP_Compass: updates to support multiple compasses 2013-12-09 17:34:07 +11:00
Andrew Tridgell cb16733918 AP_Compass: switched to a vector based interface
this is more consistent with other APIs and makes multi-device support
easier
2013-12-09 17:34:06 +11:00
Randy Mackay 84fdff4cd6 Compass: slightly relax HMC5843 calibration limits
Some users have reported Z axis values as high as 1.33.  Their compasses
seem otherwise health so extending the limits slightly.
2013-11-27 15:36:34 +09:00
Andrew Tridgell 1ccd6bb7ef AP_Compass: don't wait more than 1ms for compass sample
this prevents 5ms delays in compass accumulate
2013-10-08 11:50:54 +11:00
Andrew Tridgell f286369990 AP_Compass: fixed orientation on Linux 2013-10-08 11:50:54 +11:00
Andrew Tridgell 83c942a512 AP_Compass: prevent NULL deref on enable mag while running 2013-10-08 11:50:53 +11:00
Andrew Tridgell da14ad2e2d AP_Compass: neaten up HMC5883 debug 2013-09-28 21:24:02 +10:00
Andrew Tridgell ce7d458855 AP_Compass: added Linux support to the compass test 2013-09-28 21:24:02 +10:00
Andrew Tridgell 6fc5b06043 AP_Compass: fixed some old Serial.print calls 2013-09-28 21:24:02 +10:00
Andrew Tridgell 1243ab9e63 AP_Compass: added HAL_Linux support 2013-09-28 21:24:02 +10:00
Andrew Tridgell 3f0f8dfa62 AP_Compass: removed SMACCM support 2013-09-26 22:38:31 +10:00
Mike McCauley 2fa0c39f3a AP_Compass: added Flymaple orientation 2013-09-24 13:18:35 +10:00
Mike McCauley 4c65c42411 AP_Compass: fixed ARM 32 bit compatibility 2013-09-23 18:10:21 +10:00
Andrew Tridgell 229841052a AP_Compass_PX4: removed MAGIOCSSAMPLERATE call 2013-09-09 18:04:41 +10:00
Andrew Tridgell db14a85fc5 AP_Compass: added more debugging to AP_Compass_PX4 driver
this helps debug compass initialisation issues
2013-09-09 18:04:40 +10:00
Andrew Tridgell b8b72819c1 AP_Compass: ignore COMPASS_ORIENT for internal compass
this means if COMPASS_ORIENT is not 0 and the external compass fails
to start on boot we don't end up with a bad compass orientation
2013-09-07 16:49:51 +10:00