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
e14ae0c0b1
Compass: param descriptions for OFS2, MOT2
2014-09-27 17:59:26 +09:00
Randy Mackay
c2c5807ec7
Compass: always default devid to zero
2014-09-23 20:35:18 +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
47801a6c4d
Compass: bug fix to init of device id
...
Also init members to reduce compiler warnings
2014-07-16 14:29:10 +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
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
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
Andrew Tridgell
cf148fa76c
AP_Compass: improved COMPASS_ORIENT and COMPASS_EXTERNAL for Pixhawk
2014-02-27 12:46:27 +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
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
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
9320e82ac2
AP_Compass: added in new orientations
2013-08-30 14:19:03 +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
Andrew Tridgell
feac9d1306
AP_Compass: fixed a bug in the tilt compass calculation
...
The simplification applied a few months ago was incorrect
2013-08-18 21:08:52 +10:00
Andrew Tridgell
a6c7bd3612
AP_Compass: fixed rotations for COMPASS_ORIENT
...
this matches AHRS_ORIENTATION again
2013-07-08 12:17:59 +10:00
Craig@3DR
1a3ed2d80b
AP_Compass: Corrected COMPASS_ORIENT Parameter Description
2013-06-26 19:14:24 -07:00
Randy Mackay
80bd458f29
Compass: update parameter description
...
We do not want people modifying the COMPASS_MOTCT manually
2013-05-11 14:50:36 +09: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
f78de63a09
AP_Compass: more efficient calculate_heading() implementation
...
Thanks to piersh for this improvement. See
b5f0635455 (commitcomment-3171806)
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
ba83950fc4
libraries: replace constrain() with constrain_float()
...
this makes the type much more obvious. Thanks to Tobias for the
suggestion.
2013-05-02 10:25:40 +10:00
Andrew Tridgell
26fa5c40f1
Compass: use const references for some functions
2013-04-22 13:26:49 +10: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
886725291c
Compass: enable motor compensation for 1280
...
Expand motor compenstion vector's range limit
2013-03-02 00:03:29 +09:00
Randy Mackay
d8515ff85e
Compass: basic compensation for motor interference
2013-03-02 00:03:16 +09:00
James Bielman
5631f865b2
Update floating point calculations to use floats instead of doubles.
...
- Allows use of hardware floating point on the Cortex-M4.
- Added "f" suffix to floating point literals.
- Call floating point versions of stdlib math functions.
2013-01-16 13:52:01 +11:00
rmackay9
bf77a0f2e4
AP_Compass: added parameter descriptions
2013-01-02 16:08:44 +09:00
Andrew Tridgell
a180437028
AP_Compass: disable auto-declination on 1280
...
this saves a few k of flash space
2012-12-20 14:53:23 +11:00
Andrew Tridgell
c181498e36
Compass: updates for new AP_Param API
2012-12-20 14:51:38 +11:00
Pat Hickey
53432a1101
AP_Compass: ported to AP_HAL
2012-12-20 14:51:26 +11:00
uncrustify
7840eebaef
uncrustify libraries/AP_Compass/Compass.cpp
2012-08-21 19:01:20 -07:00
rmackay9
9b3ced93ee
AP_Compass: fix for mismatching set_initial_location parameters (forgot to change long to int32_t in .cpp file)
2012-08-18 20:41:38 +09:00
Andrew Tridgell
518d6365ff
AP_Param: update remaining libraries for new constructor syntax
2012-08-08 12:11:57 +10: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
rmackay9
ef43da9b92
AP_Compass - changed parameter initialisation order to remove compiler warning
2012-04-09 17:37:02 +09: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
17290836ef
Compass: added some more comments
...
explain the algorithm a bit more
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
Andrew Tridgell
a72d4b46b3
Compass: implement Bills new offset nulling algorithm
...
this seems to work much better than the old algorithm, converging
faster and more accurately. Even better, it has no linkage to DCM, so
no possibility of nasty feedback effects
2012-03-27 15:37:24 +11:00