FixedwingPositionControl: slightly simplify manual position control (use navigateLine() to be sure no turnaround)

make notes on odd things that are likely still wrong
This commit is contained in:
Thomas Stastny
2023-09-08 16:08:38 +02:00
parent 16bd0a2ba0
commit def4ce6ba8
3 changed files with 11 additions and 19 deletions
+4
View File
@@ -156,6 +156,10 @@ void TECSAltitudeReferenceModel::update(const float dt, const AltitudeReferenceS
_alt_control_traj_generator.setMaxAccel(param.vert_accel_limit);
_alt_control_traj_generator.setMaxVel(fmax(param.max_climb_rate, param.max_sink_rate));
// XXX: this is a bit risky.. .alt_rate here could be NAN (by interface design) - and is only ok to input to the
// setVelSpFeedback() method because it calls the reset in the logic below when it is NAN.
// TODO: stop it with the NAN interfaces, make sure to take care of this when refactoring and separating altitude
// and height rate control loops.
_velocity_control_traj_generator.setVelSpFeedback(setpoint.alt_rate);
bool control_altitude = true;