AP_Compass: mention mag field unit in existing documentation
We are now always using milligauss for mag field unit, so let's update documentation accordingly.
This commit is contained in:
parent
9927cf066f
commit
0caaef7394
@ -21,6 +21,8 @@ AP_Compass_Backend::AP_Compass_Backend(Compass &compass) :
|
||||
* 4. publish_unfiltered_field - this (optionally) provides a corrected
|
||||
* point sample for fusion into the EKF
|
||||
* 5. publish_filtered_field - legacy filtered magnetic field
|
||||
*
|
||||
* All those functions expect the mag field to be in milligauss.
|
||||
*/
|
||||
|
||||
void AP_Compass_Backend::rotate_field(Vector3f &mag, uint8_t instance)
|
||||
|
@ -56,6 +56,8 @@ protected:
|
||||
* 4. publish_unfiltered_field - this (optionally) provides a corrected
|
||||
* point sample for fusion into the EKF
|
||||
* 5. publish_filtered_field - legacy filtered magnetic field
|
||||
*
|
||||
* All those functions expect the mag field to be in milligauss.
|
||||
*/
|
||||
|
||||
void rotate_field(Vector3f &mag, uint8_t instance);
|
||||
|
@ -16,19 +16,19 @@ const AP_Param::GroupInfo Compass::var_info[] PROGMEM = {
|
||||
// index 0 was used for the old orientation matrix
|
||||
|
||||
// @Param: OFS_X
|
||||
// @DisplayName: Compass offsets on the X axis
|
||||
// @DisplayName: Compass offsets in milligauss on the X axis
|
||||
// @Description: Offset to be added to the compass x-axis values to compensate for metal in the frame
|
||||
// @Range: -400 400
|
||||
// @Increment: 1
|
||||
|
||||
// @Param: OFS_Y
|
||||
// @DisplayName: Compass offsets on the Y axis
|
||||
// @DisplayName: Compass offsets in milligauss on the Y axis
|
||||
// @Description: Offset to be added to the compass y-axis values to compensate for metal in the frame
|
||||
// @Range: -400 400
|
||||
// @Increment: 1
|
||||
|
||||
// @Param: OFS_Z
|
||||
// @DisplayName: Compass offsets on the Z axis
|
||||
// @DisplayName: Compass offsets in milligauss on the Z axis
|
||||
// @Description: Offset to be added to the compass z-axis values to compensate for metal in the frame
|
||||
// @Range: -400 400
|
||||
// @Increment: 1
|
||||
@ -108,19 +108,19 @@ const AP_Param::GroupInfo Compass::var_info[] PROGMEM = {
|
||||
|
||||
#if COMPASS_MAX_INSTANCES > 1
|
||||
// @Param: OFS2_X
|
||||
// @DisplayName: Compass2 offsets on the X axis
|
||||
// @DisplayName: Compass2 offsets in milligauss on the X axis
|
||||
// @Description: Offset to be added to compass2's x-axis values to compensate for metal in the frame
|
||||
// @Range: -400 400
|
||||
// @Increment: 1
|
||||
|
||||
// @Param: OFS2_Y
|
||||
// @DisplayName: Compass2 offsets on the Y axis
|
||||
// @DisplayName: Compass2 offsets in milligauss on the Y axis
|
||||
// @Description: Offset to be added to compass2's y-axis values to compensate for metal in the frame
|
||||
// @Range: -400 400
|
||||
// @Increment: 1
|
||||
|
||||
// @Param: OFS2_Z
|
||||
// @DisplayName: Compass2 offsets on the Z axis
|
||||
// @DisplayName: Compass2 offsets in milligauss on the Z axis
|
||||
// @Description: Offset to be added to compass2's z-axis values to compensate for metal in the frame
|
||||
// @Range: -400 400
|
||||
// @Increment: 1
|
||||
@ -158,19 +158,19 @@ const AP_Param::GroupInfo Compass::var_info[] PROGMEM = {
|
||||
|
||||
#if COMPASS_MAX_INSTANCES > 2
|
||||
// @Param: OFS3_X
|
||||
// @DisplayName: Compass3 offsets on the X axis
|
||||
// @DisplayName: Compass3 offsets in milligauss on the X axis
|
||||
// @Description: Offset to be added to compass3's x-axis values to compensate for metal in the frame
|
||||
// @Range: -400 400
|
||||
// @Increment: 1
|
||||
|
||||
// @Param: OFS3_Y
|
||||
// @DisplayName: Compass3 offsets on the Y axis
|
||||
// @DisplayName: Compass3 offsets in milligauss on the Y axis
|
||||
// @Description: Offset to be added to compass3's y-axis values to compensate for metal in the frame
|
||||
// @Range: -400 400
|
||||
// @Increment: 1
|
||||
|
||||
// @Param: OFS3_Z
|
||||
// @DisplayName: Compass3 offsets on the Z axis
|
||||
// @DisplayName: Compass3 offsets in milligauss on the Z axis
|
||||
// @Description: Offset to be added to compass3's z-axis values to compensate for metal in the frame
|
||||
// @Range: -400 400
|
||||
// @Increment: 1
|
||||
|
@ -92,14 +92,14 @@ public:
|
||||
/// Sets offset x/y/z values.
|
||||
///
|
||||
/// @param i compass instance
|
||||
/// @param offsets Offsets to the raw mag_ values.
|
||||
/// @param offsets Offsets to the raw mag_ values in milligauss.
|
||||
///
|
||||
void set_offsets(uint8_t i, const Vector3f &offsets);
|
||||
|
||||
/// Sets and saves the compass offset x/y/z values.
|
||||
///
|
||||
/// @param i compass instance
|
||||
/// @param offsets Offsets to the raw mag_ values.
|
||||
/// @param offsets Offsets to the raw mag_ values in milligauss.
|
||||
///
|
||||
void set_and_save_offsets(uint8_t i, const Vector3f &offsets);
|
||||
void set_and_save_diagonals(uint8_t i, const Vector3f &diagonals);
|
||||
@ -118,7 +118,7 @@ public:
|
||||
// return the number of compass instances
|
||||
uint8_t get_count(void) const { return _compass_count; }
|
||||
|
||||
/// Return the current field as a Vector3f
|
||||
/// Return the current field as a Vector3f in milligauss
|
||||
const Vector3f &get_field(uint8_t i) const { return _state[i].field; }
|
||||
const Vector3f &get_field(void) const { return get_field(get_primary()); }
|
||||
|
||||
@ -178,7 +178,7 @@ public:
|
||||
|
||||
/// Returns the current offset values
|
||||
///
|
||||
/// @returns The current compass offsets.
|
||||
/// @returns The current compass offsets in milligauss.
|
||||
///
|
||||
const Vector3f &get_offsets(uint8_t i) const { return _state[i].offset; }
|
||||
const Vector3f &get_offsets(void) const { return get_offsets(get_primary()); }
|
||||
@ -193,9 +193,9 @@ public:
|
||||
/// Program new offset values.
|
||||
///
|
||||
/// @param i compass instance
|
||||
/// @param x Offset to the raw mag_x value.
|
||||
/// @param y Offset to the raw mag_y value.
|
||||
/// @param z Offset to the raw mag_z value.
|
||||
/// @param x Offset to the raw mag_x value in milligauss.
|
||||
/// @param y Offset to the raw mag_y value in milligauss.
|
||||
/// @param z Offset to the raw mag_z value in milligauss.
|
||||
///
|
||||
void set_and_save_offsets(uint8_t i, int x, int y, int z) {
|
||||
set_and_save_offsets(i, Vector3f(x, y, z));
|
||||
@ -255,7 +255,7 @@ public:
|
||||
|
||||
/// Returns the current motor compensation offset values
|
||||
///
|
||||
/// @returns The current compass offsets.
|
||||
/// @returns The current compass offsets in milligauss.
|
||||
///
|
||||
const Vector3f &get_motor_offsets(uint8_t i) const { return _state[i].motor_offset; }
|
||||
const Vector3f &get_motor_offsets(void) const { return get_motor_offsets(get_primary()); }
|
||||
|
Loading…
Reference in New Issue
Block a user