mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-02 03:49:12 +08:00
FW Position controller: transform RWTO_PSP to rad when used (#24312)
Signed-off-by: Silvan <silvan@auterion.com>
This commit is contained in:
@@ -1858,8 +1858,10 @@ FixedwingPositionControl::control_auto_landing_straight(const hrt_abstime &now,
|
|||||||
POST_TOUCHDOWN_CLAMP_TIME, 0.0f,
|
POST_TOUCHDOWN_CLAMP_TIME, 0.0f,
|
||||||
1.0f);
|
1.0f);
|
||||||
|
|
||||||
pitch_max_rad = touchdown_interpolator * _param_rwto_psp.get() + (1.0f - touchdown_interpolator) * pitch_max_rad;
|
pitch_max_rad = touchdown_interpolator * math::radians(_param_rwto_psp.get()) + (1.0f - touchdown_interpolator) *
|
||||||
pitch_min_rad = touchdown_interpolator * _param_rwto_psp.get() + (1.0f - touchdown_interpolator) * pitch_min_rad;
|
pitch_max_rad;
|
||||||
|
pitch_min_rad = touchdown_interpolator * math::radians(_param_rwto_psp.get()) + (1.0f - touchdown_interpolator) *
|
||||||
|
pitch_min_rad;
|
||||||
}
|
}
|
||||||
|
|
||||||
// idle throttle may be >0 for internal combustion engines
|
// idle throttle may be >0 for internal combustion engines
|
||||||
@@ -2078,8 +2080,10 @@ FixedwingPositionControl::control_auto_landing_circular(const hrt_abstime &now,
|
|||||||
const float touchdown_interpolator = math::constrain((seconds_since_flare_start - touchdown_time) /
|
const float touchdown_interpolator = math::constrain((seconds_since_flare_start - touchdown_time) /
|
||||||
POST_TOUCHDOWN_CLAMP_TIME, 0.0f, 1.0f);
|
POST_TOUCHDOWN_CLAMP_TIME, 0.0f, 1.0f);
|
||||||
|
|
||||||
pitch_max_rad = touchdown_interpolator * _param_rwto_psp.get() + (1.0f - touchdown_interpolator) * pitch_max_rad;
|
pitch_max_rad = touchdown_interpolator * math::radians(_param_rwto_psp.get()) + (1.0f - touchdown_interpolator) *
|
||||||
pitch_min_rad = touchdown_interpolator * _param_rwto_psp.get() + (1.0f - touchdown_interpolator) * pitch_min_rad;
|
pitch_max_rad;
|
||||||
|
pitch_min_rad = touchdown_interpolator * math::radians(_param_rwto_psp.get()) + (1.0f - touchdown_interpolator) *
|
||||||
|
pitch_min_rad;
|
||||||
}
|
}
|
||||||
|
|
||||||
// idle throttle may be >0 for internal combustion engines
|
// idle throttle may be >0 for internal combustion engines
|
||||||
|
|||||||
Reference in New Issue
Block a user