Open WillieMaddox opened 5 years ago
I think the solution provided in the final Estimator project QuadControl::AltitudeControl() is incorrect.
QuadControl::AltitudeControl()
Specifically,
velZCmd += kpPosZ * (posZCmd - posZ); Adding the position term to the velocity is non-physical. Also,
velZCmd += kpPosZ * (posZCmd - posZ);
float desAccel = kpVelZ * (velZCmd - velZ) + KiPosZ * integratedAltitudeError + accelZCmd - 9.81f; The position term should actually be added HERE.
float desAccel = kpVelZ * (velZCmd - velZ) + KiPosZ * integratedAltitudeError + accelZCmd - 9.81f;
I think the solution provided in the final Estimator project
QuadControl::AltitudeControl()
is incorrect.Specifically,
velZCmd += kpPosZ * (posZCmd - posZ);
Adding the position term to the velocity is non-physical. Also,float desAccel = kpVelZ * (velZCmd - velZ) + KiPosZ * integratedAltitudeError + accelZCmd - 9.81f;
The position term should actually be added HERE.