mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-23 00:05:28 +03:00
Merge pull request #7082 from JulioCesarMatias/STM32FastProcessingOperations
Change to STM32 faster processing operations
This commit is contained in:
commit
7c96829445
2 changed files with 6 additions and 6 deletions
|
@ -134,10 +134,10 @@ static void updateAltitudeVelocityAndPitchController_FW(timeDelta_t deltaMicros)
|
|||
// velocity error. We use PID controller on altitude error and calculate desired pitch angle
|
||||
|
||||
// Update energies
|
||||
const float demSPE = (posControl.desiredState.pos.z / 100.0f) * GRAVITY_MSS;
|
||||
const float demSPE = (posControl.desiredState.pos.z * 0.01f) * GRAVITY_MSS;
|
||||
const float demSKE = 0.0f;
|
||||
|
||||
const float estSPE = (navGetCurrentActualPositionAndVelocity()->pos.z / 100.0f) * GRAVITY_MSS;
|
||||
const float estSPE = (navGetCurrentActualPositionAndVelocity()->pos.z * 0.01f) * GRAVITY_MSS;
|
||||
const float estSKE = 0.0f;
|
||||
|
||||
// speedWeight controls balance between potential and kinetic energy used for pitch controller
|
||||
|
@ -318,7 +318,7 @@ float processHeadingYawController(timeDelta_t deltaMicros, int32_t navHeadingErr
|
|||
-limit,
|
||||
limit,
|
||||
yawPidFlags
|
||||
) / 100.0f;
|
||||
) * 0.01f;
|
||||
|
||||
DEBUG_SET(DEBUG_NAV_YAW, 0, posControl.pids.fw_heading.proportional);
|
||||
DEBUG_SET(DEBUG_NAV_YAW, 1, posControl.pids.fw_heading.integral);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue