Consume speedweight from FW longitudinal config (#25709)

* Consume speedweight from longitudinal config

* Constrain speed weight
This commit is contained in:
Jaeyoung Lim
2025-10-10 10:00:43 -07:00
committed by GitHub
parent 2f48cb4ef2
commit b95784e804
2 changed files with 7 additions and 0 deletions
@@ -827,6 +827,12 @@ void FwLateralLongitudinalControl::updateLongitudinalControlConfiguration(const
} else {
_long_configuration.sink_rate_target = _param_sinkrate_target.get();
}
if (PX4_ISFINITE(configuration_in.speed_weight)) {
_long_configuration.speed_weight = math::constrain(configuration_in.speed_weight, 0.f, 2.f);
} else {
_long_configuration.speed_weight = _param_t_spdweight.get();
}
}
float FwLateralLongitudinalControl::getLoadFactor() const