Andrew Tridgell
fcce713399
AP_Compass: support probing RM3100 on all 4 addresses
2020-09-24 11:16:19 +10:00
Siddharth Purohit
fd125fef1f
AP_Compass: fix reordering compass devid by priority at boot
2020-08-27 20:05:31 +09:00
Siddharth Purohit
f31cf7debe
AP_Compass: reset compass ids not present after compass cal
...
also implement replacement mechanism for UAVCAN compasses
2020-07-30 08:44:39 +09:00
Andy Piper
2b717a19ab
AP_Compass: enable LIS3MDL and friends
2020-06-30 15:33:07 +09:00
bugobliterator
46b078a43f
AP_Compass: return id of max empty compass state when prio id is 0
2020-06-13 07:51:04 +09:00
Andrew Tridgell
83c6327873
AP_Compass: revert change to RM3100 scale factor and increase scale limit
...
This reverts the change from #13895 and instead resolves the issue by
increasing the scale factor limit to 1.4
There is an open question as to why some RM3100 compasses show a
different scale factor (by about 1.25 times) to other versions of the
same sensor. As we haven't resolved this properly it seems the correct
thing to do is follow the datasheet but allow for a wider range of
scale factors to cope with the variation between sensors
2020-05-23 15:05:03 +10:00
Andrew Tridgell
cbb1512ebc
AP_Compass: merged in compass device ID changes from master
2020-05-11 19:38:28 +10:00
Paul Riseborough
db90cf5fb0
AP_Compass: Add accessor function for COMPASS_AUTODEC
2020-05-06 15:30:56 +09:00
Andrew Tridgell
481852d608
AP_Compass: change RM3100 device ID
...
changed scale factor means users need to recalibrate
2020-05-06 15:12:11 +09:00
Andrew Tridgell
8787ca868a
AP_Compass: fixed scaling of RM3100
...
scale factor was off by 200/256, resulting in COMPASS_SCALE of about
1.28
thanks to Arace for noticing
2020-05-06 15:12:08 +09:00
Andrew Tridgell
facedb5156
AP_Compass: added mag_cal_fixed_yaw()
...
this is a fast compass calibration that uses a yaw value provided by
the user.
2020-01-09 15:18:53 +11:00
Andrew Tridgell
385d649e69
AP_Compass: limit rotations we try to ROTATION_MAX_AUTO_ROTATION
2020-01-07 15:47:30 +09:00
Pierre Kancir
2d0ae6112e
AP_Compass: add register to checked ones and remove single-use goto
...
Also fix comment on TMRC register setting
2019-12-23 18:02:59 +09:00
Pierre Kancir
453e8b9f32
AP_Compass: probe for RM3100
2019-12-23 18:02:59 +09:00
Peter Barker
76c275756b
AP_Compass: tidy constructor
2019-12-16 18:28:36 +11:00
Peter Barker
fcc490b68f
AP_Compass: make compass_cal_status_t enum class Status within CompassCalibrator
2019-12-16 18:28:31 +11:00
Andrew Tridgell
d3226e1f94
AP_Compass: narrow range of allowed scale factor
2019-12-16 18:28:28 +11:00
Andrew Tridgell
3e2d7aa1e2
AP_Compass: added COMPASS_OPTIONS
...
this allows user to set that calibration requires GPS lock
2019-12-16 18:28:26 +11:00
Andrew Tridgell
fad20439a1
AP_Compass: added estimation of compass scale factor
...
this adds new COMPASS_SCALE, COMPASS_SCALE2 and COMPASS_SCALE3
parameters, which give the sensor scaling factor. It is used to
compensate for an incorrect scaling in a compass.
The 3D compass calibration process will set the correct value
automatically, otherwise users can set the value to a known value for
an existing compass
2019-12-16 18:28:24 +11:00
Randy Mackay
d005e68a9d
AP_Compass: minor comment fix
...
Co-Authored-By: Peter Barker <pb-gh@barker.dropbear.id.au>
2019-12-16 18:28:21 +11:00
lukezhqin
82e9797984
AP_Compass: fix thin_samples to avoid comparing sample to itself
2019-12-16 18:28:18 +11:00
Randy Mackay
537d91e7e1
AP_Compass: fix calibrator update when step one fails
2019-12-16 18:28:16 +11:00
Randy Mackay
80b4eaa87a
AP_Compass: rename CompassCalibrator::clear to stop
2019-12-16 18:28:13 +11:00
Randy Mackay
b862cc0333
AP_Compass: remove unused calc_mean_squared_residuals
2019-12-16 18:28:11 +11:00
Randy Mackay
233e3bae61
AP_Compass: add comments to calibrator
2019-12-16 18:28:09 +11:00
Randy Mackay
015eed7159
AP_Compass: formatting fixes
...
this should be a non-functional change
2019-12-16 18:28:06 +11:00
Randy Mackay
e26be17c91
AP_Compass: constify get_completion_mask and remove use of auto
2019-12-16 18:28:04 +11:00
Randy Mackay
1e932ce0f7
AP_Compass: constify get_orientation
2019-12-16 18:28:02 +11:00
Andrew Tridgell
3b376e5af0
AP_Compass: remove expected error
...
this happens with AK09916 probing on invensense sensor
2019-10-31 20:07:04 +09:00
Andrew Tridgell
513e483821
AP_Compass: disable HIL for AP_Periph
...
this saves several k of flash
2019-10-24 22:03:43 +11:00
Randy Mackay
01c36fa6aa
AP_Compass: LEARN param default to 0 for all vehicles
2019-10-23 17:15:57 +11:00
Vlad-Andrei Dorobantu
83c641c76f
AP_Compass: corrected the cause of SIGSEGV signal when running AP_Compass_test
2019-10-19 09:58:42 +11:00
Andrew Tridgell
7ad91fa1c9
AP_Compass: don't show too many params when max compasses 1
2019-10-16 08:58:52 +11:00
Peter Barker
8e412d0885
AP_Compass: adjust for new vehicle base class
2019-10-08 11:26:04 +11:00
murata
ec0c49315f
AP_Compass: Change direct value to define name
2019-09-24 13:23:24 +10:00
Peter Barker
6193d6cf69
AP_Compass: fix example by instantiating Baro
...
Baro is required to get location, and Compass tries to get the declination based on current location
2019-09-13 08:54:21 +09:00
Andrew Tridgell
71ad90819e
AP_Compass: don't reset SITL compass offsets if set by user
...
makes for easier EKF compass bias learning testing
2019-09-11 14:22:18 +10:00
Andrew Tridgell
df387dc396
AP_Compass: allow rotation of BMM150 compass
2019-09-07 09:53:21 +10:00
Andrew Tridgell
1cb775e2c2
AP_Compass: probe more addresses for IST8310
...
IST8310 can be on 4 possible i2c addresses
2019-09-07 07:35:54 +10:00
Andrew Tridgell
bd0760f9d4
AP_Compass: removed unusued compass probes
...
now only use probe lists
2019-09-04 16:27:47 +10:00
Andrew Tridgell
3bc8522b54
AP_Compass: added ROTATION_NONE to probes
...
we no longer use defaults in the headers
2019-09-04 16:27:47 +10:00
Andrew Tridgell
f877def909
AP_Compass: removed default rotations for compass probe
...
this prevents bugs where the force_external and rotation are mixed up
in hwdef.dat causing incorrect rotations
2019-09-04 16:27:47 +10:00
Andrew Tridgell
2a48241ebb
AP_Compass: fixed naming of QMC5883L driver
...
needed for probe using COMPASS macro in hwdef.dat
2019-09-04 16:27:47 +10:00
Andrew Tridgell
bcb139f02f
AP_Compass: fixed uninitialised CAN device ID bits
2019-08-29 18:37:03 +10:00
Andrew Tridgell
f4576ec8f3
AP_Compass: reduce firmware size for AP_Periph
2019-08-27 10:29:56 +10:00
Andrew Tridgell
0ec3f80bbe
AP_Compass: enable LIS3MDL on I2C and RM3100 on SPI
2019-08-27 10:29:56 +10:00
Peter Barker
1adda1ccf0
AP_Compass: move automatic declination setting into AP_Compass itself
2019-08-13 10:02:13 +10:00
Peter Barker
df01bed14f
AP_Compass: take GCS link in place of channel to calibration routines
2019-08-05 09:23:10 +10:00
Michael du Breuil
58dbbd6d0e
AP_Compass: Refactor battery current backend
2019-07-14 00:28:00 -07:00
Peter Barker
7b52c41287
AP_Compass: fix example by instantiating serial_manager
2019-07-01 19:11:03 +10:00