mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-30 00:44:07 +08:00
WIP on controllers
This commit is contained in:
parent
b6dd579e0e
commit
8398de7515
@ -51,6 +51,12 @@ ECL_PitchController::ECL_PitchController() :
|
||||
float ECL_PitchController::control(float pitch_setpoint, float pitch, float pitch_rate, float roll, float scaler,
|
||||
bool lock_integrator, float airspeed_min, float airspeed_max, float aspeed)
|
||||
{
|
||||
/* get the usual dt estimate */
|
||||
uint64_t dt_micros = ecl_elapsed_time(&_last_run);
|
||||
_last_run = ecl_absolute_time();
|
||||
|
||||
float dt = (dt_micros > 500000) ? 0.0f : dt_micros / 1000000;
|
||||
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
|
||||
@ -61,7 +61,7 @@ float ECL_RollController::control(float roll_setpoint, float roll, float roll_ra
|
||||
float dt = (dt_micros > 500000) ? 0.0f : dt_micros / 1000000;
|
||||
|
||||
|
||||
|
||||
float integrator_limit_scaled = 0.0f;
|
||||
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
@ -54,6 +54,12 @@ ECL_YawController::ECL_YawController() :
|
||||
float ECL_YawController::control(float roll, float yaw_rate, float accel_y, float scaler, bool lock_integrator,
|
||||
float airspeed_min, float airspeed_max, float aspeed)
|
||||
{
|
||||
/* get the usual dt estimate */
|
||||
uint64_t dt_micros = ecl_elapsed_time(&_last_run);
|
||||
_last_run = ecl_absolute_time();
|
||||
|
||||
float dt = (dt_micros > 500000) ? 0.0f : dt_micros / 1000000;
|
||||
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user