AeroPython / PyFME

Python Flight Mechanics Engine
http://pyfme.readthedocs.org/
MIT License
198 stars 70 forks source link

Missing abstract/virtual methods #88

Open sanguinariojoe opened 8 years ago

sanguinariojoe commented 8 years ago

That's maybe because my C++ deformation...

It seems that calculate_forces_and_moments is a common method of all the aircrafts (called in fact from simulator.py). However such virtual/abstract method is missing at base class Aircraft.

In Python that's not much relevant in practice, but is veeeeery convenient to can document such function in general. Or should I read the Cessna172 code to know how the parent Aircraft actually works?

AlexS12 commented 8 years ago

Well I have to say that, that part of code needs serious review. This class structure is just a first attempt, and in fact, many things from Aircraft should be placed somewhere outside, for example, an Aerodynamics class (or maybe named tuple...) where alpha, beta and that kind of attributes could be stored.

Maybe you, who are more familiar with oop could help us designing the structure :wink:

sanguinariojoe commented 8 years ago

Sure

But how do you want to do that... Because making a fork, and editing the code while you are intensively working on that, sounds like we are having hard conflicts

AlexS12 commented 8 years ago

Yes, we should meet and talk about it first!

sanguinariojoe commented 8 years ago

OK, I suggest something like that:

pyfme_aircraft

Where everything in the aircraft, including the aircraft itself, is a component. In this way you still have the possibility of setting up simple aircrafts by a class inherited from Aircraft and Wing at the same time, as well as more complex aircraft structures (in case you have data enough).