Inspiration

Mitchell Sisk and Salim Al Kharsa modelled an RV plane with only sensors for time and acceleration. The problem statement was to build a program that monitors the plane's velocity in each direction and its height. Furthermore, we wanted to create a visual simulation using Unity's physics engine to create an autopilot program that can maintain a given altitude within a certain error.

What it does

AutopilotFlightSimulator reads an altitude in meters from user input and maintains that altitude within a parameter of error.

How I built it

Salim Al Kharsa prototyped methods for calculating velocity and height based on plane acceleration and time data. Mitchell Sisk provided the RV plane model and physics calculations. I implemented Salim's code in C# using the UnityEngine and designed a function that uses proportional control to maintain target altitude for autopilot.

Challenges I ran into

One challenge was deriving physics equations to simulate the plane flying. That challenge was tackled by Mitchell. Another challenge was selecting proportional control constants to minimize error for altitude maintenance. There was some major oscillation occurring initially.

Accomplishments that I'm proud of

I'm proud of implementing a proportional control system that can maintain any altitude within a reasonable threshold of error and working successfully in Unity's 3D environment.

What I learned

We gained a higher understanding of Unity's physics engine and the physics involved in aerodynamics. We also gained a higher understanding of the debugging process and how to tune variables in PID controllers.

What's next for Autopilot Flight Simulator

The next large improvement for Autopilot Flight Simulator would be creating a more advanced system for accounting for external forces that would affect the pitch and roll of the RV plane. Another addition would be adding integral and derivative control to the autopilot controller.

Built With

Share this project:

Updates