mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 05:03:34 +08:00
Enable arbitrary euler angle for Mag rotation CAL_MAGx_{ROLL,PITCH,YAW}
- Enable arbitrary euler angle for Mag rotation - new CUSTOM rotation enum out of the normal enum range - mag_rot: automatically change to custom if euler rot is set - sensor_calibration: Magnetometer save custom rotation parameters - mag_cal: cross mention rotation parameters - This allows the user to see the RPY options when searching for the rotation parameter --------- Co-authored-by: Junwoo Hwang <junwoo@auterion.com> Co-authored-by: bresch <[brescianimathieu@gmail.com](mailto:brescianimathieu@gmail.com)> Co-authored-by: Daniel Agar <daniel@agar.ca>
This commit is contained in:
co-authored by
Junwoo Hwang
bresch
Daniel Agar
parent
9551c1b614
commit
6a58f6c7dc
@@ -771,6 +771,10 @@ calibrate_return mag_calibrate_all(orb_advert_t *mavlink_log_pub, int32_t cal_ma
|
||||
|
||||
// FALLTHROUGH
|
||||
case ROTATION_PITCH_180_YAW_270: // skip 27, same as 10 ROTATION_ROLL_180_YAW_90
|
||||
|
||||
// FALLTHROUGH
|
||||
case ROTATION_CUSTOM: // Skip, as we currently don't support detecting arbitrary euler angle orientation
|
||||
|
||||
MSE[r] = FLT_MAX;
|
||||
break;
|
||||
|
||||
@@ -831,6 +835,11 @@ calibrate_return mag_calibrate_all(orb_advert_t *mavlink_log_pub, int32_t cal_ma
|
||||
worker_data.calibration[cur_mag].device_id(), worker_data.calibration[cur_mag].rotation_enum());
|
||||
continue;
|
||||
|
||||
case ROTATION_CUSTOM:
|
||||
PX4_INFO("[cal] External Mag: %d (%" PRIu32 "), not setting rotation enum since it's specified by Euler Angle",
|
||||
cur_mag, worker_data.calibration[cur_mag].device_id());
|
||||
continue; // Continue to the next mag loop
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user