chris-ali / j6dof-flight-sim

A high fidelity 6DOF flight simulation that the user can fly themselves or run to analyze an aircraft's flight dynamics
GNU General Public License v3.0
49 stars 13 forks source link

Aerodynamics and AccelAndMoments classes do not refer to specific instance of Aircraft #20

Closed chris-ali closed 8 years ago

chris-ali commented 8 years ago

Need to rework Aerodynamics and AccelAndMoments classes to use the generated Aircraft object in the simulation. If a custom aircraft model is specified, only the default aircraft's values are used in the Aerodynamics and AccelAndMoments classes.

Create an Aerodynamics object, give it a constructor argument of Aircraft, and perhaps merge Aerodynamics and AccelAndMoments or make AccelAndMoments static, taking the Aerodynamics object as an argument

chris-ali commented 8 years ago

e2a43c62d8056494edc7e9b9c1966f8fe97d8293 solves this. Aerodynamics is now given a constructor with an Aircraft argument, and AccelAndMoments gets a constructor with an Aerodynamics argument; this ensures that a specific Aircraft object will be used in calculating forces and moments.

In addition, other serious errors in the Aircraft constructor and Aero text files were discovered and corrected. These custom aircraft now respond as expected in simulation tests