udacity / fcnd-issue-reports

You can use this repository to file issue reports with the Flying Car Nanodegree content.
1 stars 4 forks source link

Math error in Estimator altitude control #384

Open WillieMaddox opened 5 years ago

WillieMaddox commented 5 years ago

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.