|
Tags: aerospace
First things first: link to the repo.
I have always thought that it is a pity that all the work I made my last year at college working on my master's thesis had been lost. I decided to write an helicopter simulator. The reason is that I have always loved programming and writing a simulator seemed very fitting for me. I chose helicopters because it seemed quite cool. Long story short: I did write it, made a demo during my presentation, graduated and happily started to work (in an aircraft simulator!).
Anyway, I have thought for a long time (a long long time) to open source it but continuously postponed it. The main reason is that I'm very much aware of where I did cut corners and I have always been thinking of rewriting it but I realized this is not going to happen because I don't really have a use case for it. Would it be a (hard) real time simulator? A videogame? An engineering tool? Depending on the answer the architecture would be quite different. I would choose C (Rust?) for the first one, Python (Julia?) for the last one and who knows what for the videogame. And so I just decided to dump everything on GitHub. At the very least it may prove useful for someone needing an starting point to write another helicopter simulator.
So let's start with the bad:
It's written in Python 2, using old libraries. First thing should be converting from Numarray to Numpy.
It was my first significant SW project and it shows.
The ground collision model sucks completely. Just throw it away. Who would have know after fighting with aerodynamics that rigid bodies still had surprises?
Documentation is written in Spanish.
Uses FlightGear for the graphical interface. I doubt it still works.
It's just a flight dynamics model: no instrumentation, no fuel consumption, just the bare physics.
The good:
Blade flapping.
Finite state wake model plus blade element model for rotor aerodynamics.
Wake effect on tail rotor.
Ground effect model.
Motor control model.
There are also two models of two example helicopters, the ones that I managed to gather enough info about: Westland Lynx and the Black Hawk.