MechJeb2

MechJeb2

4M Downloads

ReentrySimulation / FuelFlowSimluation rewrite EPIC

lamont-granquist opened this issue ยท 0 comments

commented

The ReentrySimulation does a ton of work, but its very dense and has some curious implementation choices in it. Both the ReentrySimulation and the FuelFlowSimulation can use a better engineered layer of SimulatedObjects.

Steps:

The ODE integrator needs an update:

  • Dormand Prince
  • Event support for Parachute deployment / Hitting Ground / etc
  • Extract trajectory results as an interpolating function instead of Xlist/Ylist

Bits of the ReentrySimulation:

  • Replace AbsoluteVector/ReferenceFrame with new BCI vector object
  • Remove unused RK4
  • Extract SimCurves out of ReentrySimulation.cs file
  • Extract SimulatedBody and many functions (AirDensity/StaticPressure as functions of pos+vel over the body)
  • Replace BS34 with DP54 ODE integrator / events and interpolating function rather than the trajectory object
  • See what can be cleaned up in the interface after it has been refactored and the trajectory, SimCurves, SimulatedBody, AbsoluteVector and ODE concerns have been removed from it.

Bits of the FuelFlowSimulation:

  • Cleanup interface of existing FlyingSim SimluatedStuff (e.g. Simulate() returns a bool of parachutes deploying which is tied too closely to its use in the ReentrySimulation)
  • Implement SimulatedEngine and other SimulatedThingies neccessary for the FuelFlowSimulation