I just completed my first assignment in the Udacity Flying Car Nanodegree program.
The task was to fly the drone in a square, and although there was no modeling of the physics of flight or sensors in the assignment, there was the challenge of programming the flight computer in such a way that competing goals (like collision avoidance) could flexibly assume control under appropriate conditions.
My solution is in GitHub, but here’s a sample of my writeup:
Autonomous flight is goverend by two sets of interacting control loops. The autopilot loop is responsible for low-level maintenance of flight goals. Its responsibilities are analogous to the “aviate” in “aviate, navigate, communicate”. Specifically, the autopilot has direct access to the flight sensors and GPS and can maintain station, or be programmed with and achieve a particular heading or destination.
The autopilot loop consists of:
- control inputs made by the autopilot upon the craft’s flight surfaces or motors
- the motion of the craft as effected by those flight surfaces or motors
- the readings of the craft’s sensors, as effected by the motion of the craft
- the new control inputs made by the autopilot as effected by its readings of its sensors