Blimp: rename AHRS get_roll etc accessors to include _rad

This commit is contained in:
Peter Barker
2025-06-05 17:28:41 +10:00
committed by Peter Barker
parent 6861848613
commit 1188fe2d38
3 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -244,7 +244,7 @@ void Blimp::read_AHRS(void)
pos_ned.x,
pos_ned.y,
pos_ned.z,
blimp.ahrs.get_yaw());
blimp.ahrs.get_yaw_rad());
#endif
}
+2 -2
View File
@@ -34,7 +34,7 @@ void Loiter::run(Vector3f& target_pos, float& target_yaw, Vector4b axes_disabled
scaler_xz, scaler_yyaw, scaler_xz_n, scaler_yyaw_n);
#endif
float yaw_ef = blimp.ahrs.get_yaw();
float yaw_ef = blimp.ahrs.get_yaw_rad();
Vector3f err_xyz = target_pos - blimp.pos_ned;
float err_yaw = wrap_PI(target_yaw - yaw_ef);
@@ -96,7 +96,7 @@ void Loiter::run(Vector3f& target_pos, float& target_yaw, Vector4b axes_disabled
blimp.pid_vel_z.set_integrator(0);
blimp.pid_vel_yaw.set_integrator(0);
target_pos = blimp.pos_ned;
target_yaw = blimp.ahrs.get_yaw();
target_yaw = blimp.ahrs.get_yaw_rad();
}
if (zero.x) {
+2 -2
View File
@@ -9,7 +9,7 @@
bool ModeLoiter::init(bool ignore_checks)
{
target_pos = blimp.pos_ned;
target_yaw = blimp.ahrs.get_yaw();
target_yaw = blimp.ahrs.get_yaw_rad();
return true;
}
@@ -41,7 +41,7 @@ void ModeLoiter::run()
if (fabsf(target_pos.z-blimp.pos_ned.z) < (g.max_pos_z*POS_LAG)) {
target_pos.z += pilot.z;
}
if (fabsf(wrap_PI(target_yaw-ahrs.get_yaw())) < (g.max_pos_yaw*POS_LAG)) {
if (fabsf(wrap_PI(target_yaw-ahrs.get_yaw_rad())) < (g.max_pos_yaw*POS_LAG)) {
target_yaw = wrap_PI(target_yaw + pilot_yaw);
}