License | CC0 |
---|---|

Maintainer | frosch03@frosch03.de |

Stability | experimental |

Safe Haskell | Safe-Inferred |

Language | Haskell2010 |

- type Radius = Double
- type Speed = Double
- var_G :: GravConst
- semiMajor :: Orbit Body -> Double
- v :: Orbit Body -> Radius -> Speed
- v_e :: Body -> Speed
- burnFromCircOrb :: Orbit Body -> Speed -> Orbit Body
- updateOrbit :: Orbit Body -> Double -> Double -> Orbit Body
- burnAt :: (Orbit Body -> Double) -> Orbit Body -> Speed -> Orbit Body
- burnAtPeriapsis :: Orbit Body -> Speed -> Orbit Body
- burnAtApoapsis :: Orbit Body -> Speed -> Orbit Body
- hohmann :: Orbit Body -> Orbit Body -> (Double, Double)

# Documentation

`var_G`

[Nm^2/kg^2] is the Gravitation constant in newton meter
squared over kilo gramms squared

v :: Orbit Body -> Radius -> Speed Source

`v`

takes an orbit and a radius (from the center of the
centerBody) and calculates the orbital speed at that position.

updateOrbit :: Orbit Body -> Double -> Double -> Orbit Body Source

`updateOrbit`

is a function that takes an orbit and two
heights. It updates the apoapsis with the bigger height and the
periapsis with the smaller.

burnAt :: (Orbit Body -> Double) -> Orbit Body -> Speed -> Orbit Body Source

burnAtPeriapsis :: Orbit Body -> Speed -> Orbit Body Source

`burnAtPeriapsis`

calculates the new orbit after a burn of
`Speed`

delta V is applied to the given orbit at the periapsis.