QuadcopterFlightSimulator

Quadcopter Flight Simulator in C and Three.js

🌐 Run on your browser

This is a basic quadcopter simulator built using Three.js as a fun weekend project. The simulator solves the nonlinear dynamics of a quadcopter, taking into account the equations of motion of the body, the dynamics of the four rotors and the battery charge. The included controller uses a simple proportional control in ACRO mode, controlling angular rates based on linearized dynamics, without any thrust compensation.

Screenshot

πŸš€ Getting started

The easiest way to run the simulator is from your web browser The simulator will render a 3D quadcopter model, and you can control it using a keyboard (WASD for roll/pitch, arrows for thrust/yaw).

πŸ€” Assumptions and Limitations

As this is a weekend project, several assumptions were made to simplify the model:

These assumptions have a strong influence on the accuracy of the simulation. Note that this simulator is a basic implementation and may not be entirely accurate or realistic. It is intended for experimental purposes only.

πŸ“‘ References

[1] A. Gibiansky, β€œQuadcopter dynamics, simulation and control”, Blog, 2012

[2] E. Gopalakrishnan, β€œQuadcopter flight mechanics model and control algorithms”, Master Thesis, Czech Technical University, Prague, 2016

[3] L.F.M. Mendoza et al., β€œTrajectories generation for unmanned aerial vehicles based on obstacle avoidance located by a visual sensing system”, Mathematics 2023, 11(6), 1413

Other useful resources: