Learn2Fly is a long-term learning project for building a simple flight simulator, then gradually moving toward autopilot logic, data collection, and eventually hardware.
The goal is not to build a perfect airplane immediately. The goal is to learn step by step:
- Python simulation
- C/C++ control logic
- basic physics
- data logging
- autopilot thinking
- AI/learning systems later
- hardware later
This project should be treated as a learning laboratory.
First we build the airplane in software.
Then we teach it basic stability.
Then we collect data.
Then we experiment with learning.
Only after that do we think about real hardware.
Initial goal:
- Create a simple 2D airplane model
- Simulate altitude, speed, angle, gravity, and throttle
- Print flight state in the terminal
- Log simple flight data to CSV
Example output:
Time: 1s | Altitude: 100 | Speed: 20 | Angle: 5
Time: 2s | Altitude: 98 | Speed: 21 | Angle: 4
Goal:
- Keep the plane level
- Prevent crashing
- Maintain altitude
- Use simple rules before AI
Example:
if altitude < target_altitude:
increase_throttle()
Goal:
- Move the control logic into C or C++
- Keep Python for simulation, data, and experiments
- Learn how Python and C/C++ can communicate
Goal:
- Use Python to analyze flight logs
- Study what caused crashes
- Improve decisions over time
- Experiment with simple machine learning later
Only after the simulator and control logic are stable.
Possible future hardware:
- microcontroller or flight controller
- IMU sensor
- motor
- servos
- battery
- foam airframe
Create a Plane class with:
- altitude
- speed
- angle
Then simulate gravity by reducing altitude over time.
learn2fly/
│
├── main.py
├── plane.py
├── physics.py
├── config.py
├── data/
│ └── flight_log.csv
├── notes/
│ └── dev_journal.md
└── README.md
Project started as a long-term learning journey.