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.
9 years ago
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.
9 years ago
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.
9 years ago
Gustavo Jose de Sousa
88a1a928e9
AP_Compass: remove get_{field,offsets}_milligauss() functions
...
Those functions are not being used anymore.
9 years ago
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().
9 years ago
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.
9 years ago
Randy Mackay
825abdbedc
Compass: example sketch displays in milligauss
9 years ago
mirkix
ddb8e67954
AP_Compass: Add support for more then one AK8963
9 years ago
José Roberto de Souza
1a2b5ff677
AP_Compass: AK8963: Remove unused AP_HAL::Semaphore attributes
9 years ago
José Roberto de Souza
a9d34ac3bd
AP_Compass: AK8963: Rename some SPI/I2C method parameters
...
On read/write operations the argument is the register that will be read or
write not the address, SPI don't even have the concept of device address.
9 years ago
mirkix
eee9522ca5
AP_Compass: Add MPU9250 multiple instance support
10 years ago
raspilot
1b5e6849d9
AP_Compass: fix milligauss code in LSM303D driver
10 years ago
Randy Mackay
fff5ec09eb
AP_Compass: fix consistent check for less than three compasses
...
Also use vector functions where available
Use get_field_milligause instead of just get_field
10 years ago
Jonathan Challinger
87bbf1a487
AP_Compass: add consistent() function
10 years ago
Julien BERAUD
5602e4055b
AP_Compass_AK8963: Fix Rotation on the Bebop
10 years ago
Andrew Tridgell
fa9ff5b604
AP_Compass: added parameter for compass calibration fitness threshold
10 years ago
Lucas De Marchi
309e75f9ac
AP_Compass: LSM303D: use c++11 initializer to avoid Wreorder
10 years ago
Lucas De Marchi
3a017c8702
AP_Compass: LSM303D: rename members to follow convention
...
Make the members have similar names as HMC5843 driver and prepend
underscore on private fields.
10 years ago
raspilot
19b4f5559a
AP_Compass: added LSM303D driver
10 years ago
Andrew Tridgell
c59bdc12df
AP_Compass: fix the milligauss handling
...
the previous approach assumed a 1:1 mapping between compass backends
and compass instances, which isn't true on PX4.
It also only setup milligauss offsets on a set_and_save call, which is
not the only way offsets change
this adds a milligauss_ratio per instance, which is considerably
simpler
10 years ago
Andrew Tridgell
3699932417
AP_Compass: fixed SITL compass
10 years ago
Staroselskii Georgii
bd7c313bee
AP_Compass: fixed Compass::get_raw_field()
...
It seems as if it were a copy-paste error. A statis analyzer would
definetely be angry.
10 years ago
Staroselskii Georgii
e93ff44a97
AP_Compass: make a transition to milligauss in Compass library
10 years ago
Staroselskii Georgii
693613aa0f
AP_Compass: convert AK8963 measurements to uT
...
AK8963 is configured in 16-bit ADC mode which implies sensitivity of 0.15 uT/LSb. Knowing this fact we can convert the measurements to the proper units. The change will make users recalibrate their compasses.
10 years ago
Staroselskii Georgii
c207d8c6a8
AP_Compass: add milligauss counterparts to get_field() and get_offsets()
...
From now on there's a pair get_field_milligauss() and
get_offsets_milligauss() that can make the transition to the common
units across all compasses easier.
10 years ago
Andrew Tridgell
6991a1b9e9
AP_Compass: ensure we have payload space to send MAG_CAL messages
10 years ago
Andrew Tridgell
2baa0ac2f2
AP_Compass: disable COMPASS_LEARN when mag calibration used
10 years ago
Andrew Tridgell
079161ef3a
AP_Compass: fixed raw_field init in AK8963 driver
...
thanks to Peter for spotting this
10 years ago
Andrew Tridgell
e4b2fc711d
AP_Compass: added message for compass cal when armed
10 years ago
Andrew Tridgell
f4cdf57d8f
AP_Compass: added handling of compass calibration mavlink messages
10 years ago
Siddharth Bharat Purohit
75829f5533
AP_Compass: remove extra compass field correction
10 years ago
Siddharth Bharat Purohit
3abdf85796
AP_Compass_Calibrator: remove unrequired variables
10 years ago
Siddharth Bharat Purohit
c126017035
AP_Compass: reduce to if healthy check from if-else
10 years ago
Siddharth Bharat Purohit
2fb002798c
generate.sh
10 years ago
Siddharth Bharat Purohit
63973bff31
AP_Compass_AK8963: move variable declarations before goto
10 years ago
Siddharth Bharat Purohit
6a603eb594
Compass_cal: implement the concept of auto and mandatory user reboot after cal
10 years ago
Gustavo Jose de Sousa
46774136a6
AP_Compass: standardize inclusion of libaries headers
...
This commit changes the way libraries headers are included in source files:
- If the header is in the same directory the source belongs to, so the
notation '#include ""' is used with the path relative to the directory
containing the source.
- If the header is outside the directory containing the source, then we use
the notation '#include <>' with the path relative to libraries folder.
Some of the advantages of such approach:
- Only one search path for libraries headers.
- OSs like Windows may have a better lookup time.
10 years ago
Siddharth Bharat Purohit
cdd8bae6ac
AP_Compass: publish raw and unfiltered field for HMC5843 compass
10 years ago
Siddharth Bharat Purohit
8cdc9748b3
AP_Compass: publish raw and unfiltered field for AK8963 compass
10 years ago
Siddharth Bharat Purohit
f085e274c7
AP_Compass: add explaination for sample acceptance based on angular distance
10 years ago
Jonathan Challinger
f108383c11
AP_Compass: initialize CompassCalibrator _sample_buffer to NULL
10 years ago
Jonathan Challinger
358736a592
AP_Compass: correct calibrator sample acceptance math
10 years ago
Jonathan Challinger
bff9b9065e
AP_Compass: CompassCalibrator comment update
10 years ago
Siddharth Bharat Purohit
137bd25220
AP_Compass: add info about compass calibrator procedure
10 years ago
Siddharth Bharat Purohit
f5fbc2fac1
AP_Compass: use AP_Math inverse library
10 years ago
Jonathan Challinger
0edf1df28e
AP_Compass: loosen calibration acceptance tolerance
10 years ago
Jonathan Challinger
987f55387e
AP_Compass: style cleanup
10 years ago
Jonathan Challinger
5ef713f3db
AP_Compass: set AP_Notify::compass_cal_failed
10 years ago
Jonathan Challinger
5a12991d29
CompassCalibrator: remove dependence on AP_Notify
10 years ago
Jonathan Challinger
de600ca3da
AP_Compass: configured() only checks compasses with _USE set
10 years ago