Commit Graph

74 Commits

Author SHA1 Message Date
Jonathan Challinger 9054dd3f9a AP_Compass: use apply_correction_function to eliminate duplication 2014-10-19 17:02:45 +11:00
Andrew Tridgell b437977547 AP_Compass: added set_offsets() interface
this will be used by Replay to prevent the need for saving parameters
2014-10-15 09:16:31 +11:00
Randy Mackay 023b6afe8b Compass: add ORIENT2 and EXTERNAL2 params 2014-10-01 13:02:03 +10:00
Randy Mackay 798cc36e64 Compass: use_for_yaw for each compass 2014-10-01 13:02:02 +10:00
Randy Mackay 84d792216e Compass: use_for_yaw to use primary compass health
This allows the internal compass to be used if the external compass
fails.
2014-10-01 13:02:02 +10:00
Randy Mackay c2c5807ec7 Compass: always default devid to zero 2014-09-23 20:35:18 +09:00
Andrew Tridgell 41e65c2415 AP_Compass: fixed default orientation for PXF 2014-08-19 10:08:17 +10:00
Randy Mackay d291594d7c Compass: get_primary method made public 2014-07-22 22:01:09 +09:00
Randy Mackay 1f579563e6 Compass: set_motor_compensation takes instance as first parameter
Also get_motor_compensation uses primary compass
2014-07-22 21:59:04 +09:00
Randy Mackay bbf4805b0e Compass: update pixhawk expected device ids 2014-07-11 11:10:18 +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 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
LukeMike 8f552d5758 VRBRAIN: Changed the management of VirtualRobotix's boards. 2014-06-19 11:27:38 +02: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
Emile Castelnuovo 1bc199c5bd AP_Compass: new files and definition for VRBRAIN board 2014-04-08 16:19:19 +10:00
Andrew Tridgell 9bb8f73d56 Compass: split compass learning out to its own C++ file 2014-02-16 13:21:06 +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 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
Andrew Tridgell f286369990 AP_Compass: fixed orientation on Linux 2013-10-08 11:50:54 +11: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
Andrew Tridgell fbf79c07f0 AP_Compass: added COMPASS_EXTERNAL option
this allows configuring of a compass as being externally attached
2013-08-30 14:02:09 +10:00
Tobias ab311d1dd4 AP_Compass: removed comparison out of range compiler warning
uint_ >= 0 (-Wtype-limits)
2013-07-08 14:57:25 +10:00
Andrew Tridgell 9a87b3f3c1 AP_Compass: use const on more functions and remove old calculate_heading()
the calculate_heading() based on roll/pitch is not needed anywhere
2013-05-09 09:24:06 +10:00
Andrew Tridgell 217f34e155 AP_Compass: added COMPASS_ORIENT parameter, to support external compasses
this allows the user to configure the compass for any orientation
supported by our rotation library
2013-05-02 12:48:14 +10:00
Andrew Tridgell 26fa5c40f1 Compass: use const references for some functions 2013-04-22 13:26:49 +10:00
Randy Mackay b8974dec99 Copter: compass learn off by default 2013-04-16 18:47:39 +09:00
Randy Mackay b48864e1ad Copter: allow CH6 tuning of compass declination 2013-04-15 21:50:44 +09:00
Randy Mackay b8d492b504 Compass: current based compensation added 2013-03-03 23:02:12 +09:00
Randy Mackay e113eb526b Compass: add get_motor_compensation
Remove redundant set_motor_compensation call
2013-03-02 17:53:03 +09:00
Randy Mackay bfb29ce22b Compass: remove virtual functions to save RAM 2013-03-02 00:07:32 +09:00
Randy Mackay d8515ff85e Compass: basic compensation for motor interference 2013-03-02 00:03:16 +09:00
Andrew Tridgell 60a4447a86 AP_Compass: added set_board_orientation() method 2013-01-13 17:32:48 +11:00
Andrew Tridgell 741174f5d5 AP_Compass: first cut at a PX4 compass driver 2013-01-04 16:21:24 +11:00
Pat Hickey 3f1d9d7f69 AP_Param: #include <AP_Param.h> fixups for libraries & sketches
* I mostly went through with grep and added an #include <AP_Param.h> below
  every #include <AP_Common.h>. Not all of these example sketches might
  strictly need AP_Param.
2012-12-20 14:51:19 +11:00
Andrew Tridgell 6922dcdea2 Compass: added compass.accumulate() API
this allows us to accumulate mag readings using spare CPU cycles
2012-09-08 10:05:54 +10:00
uncrustify 04e48ef878 uncrustify libraries/AP_Compass/Compass.h 2012-08-21 19:19:51 -07:00
rmackay9 71f12fbc9b AP_Compass: replace "long" with "int32_t" 2012-08-18 16:58:16 +09:00
Andrew Tridgell e4d28b12e5 Compass: remove the need to call calculate() on the compass object
the new AHRS code doesn't use calculate() and the compass.heading
attribute. Instead it works on the raw magnetometer vector. This
change removes the internal calculate state from the compass object
and instead adds calculate_heading() for use by older code that
doesn't go via AHRS.

This significantly reduces the calculation involved in compass updates

The null offsets enable/disable code is also removed, as it is not
needed now that compass offsets are not linked to the AHRS state.
2012-06-27 16:01:50 +10:00
Andrew Tridgell 504c53f746 Compass: added COMPASS_AUTODEC option
when this is 1 (which is the default), we will get the declination
automatically via the AP_Declination library

when it is 0 we will use the value configured by the user
2012-03-30 14:25:27 +11:00
Andrew Tridgell 16deefce31 Compass: fixed a comment 2012-03-29 12:39:53 +11:00
Andrew Tridgell b2d6db9479 Compass: implement noise resistant varient of offset learning
This adds a large amount of noise robustness to the compass offset
learning algorithm, at a cost of 120 bytes of memory. The changes are
based on a long discussion with Bill Premerlani.
2012-03-28 20:55:27 +11:00