orbits-0.4.0.1: Types and functions for Kepler orbits.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Physics.Orbit.StateVectors

Synopsis

Types

data StateVectors a Source #

Constructors

StateVectors 

Fields

Instances

Instances details
Show a => Show (StateVectors a) Source # 
Instance details

Defined in Physics.Orbit.StateVectors

Eq a => Eq (StateVectors a) Source # 
Instance details

Defined in Physics.Orbit.StateVectors

type Position a = V3 (Distance a) Source #

type Velocity a = V3 (Speed a) Source #

Conversion to state vectors

positionAtTrueAnomaly :: (Conjugate a, RealFloat a) => Orbit a -> Angle a -> Position a Source #

Get the position in space of a body after rotating it according to the inclination and periapsis specifier.

positionInPlaneAtTrueAnomaly :: (Ord a, Floating a) => Orbit a -> Angle a -> Position a Source #

Get the position of a body relative to the orbital plane

velocityAtTrueAnomaly :: (Conjugate a, RealFloat a) => Orbit a -> Angle a -> Velocity a Source #

Get the velocity in space of a body after rotating it according to the inclination and periapsis specifier.

velocityInPlaneAtTrueAnomaly :: (Ord a, Floating a) => Orbit a -> Angle a -> Velocity a Source #

The in-plane velocity of a body

Conversion from state vectors

eccentricityVector :: Floating a => Quantity ((:*) ((:^) Meter (Succ (Succ (Succ 'Zero)))) ((:^) Second (Pred (Pred 'Zero)))) a -> StateVectors a -> V3 (Unitless a) Source #

Calculate the eccentricity vector, e, given state vectors

trueAnomalyAtPosition :: (Conjugate a, RealFloat a) => Orbit a -> Position a -> Angle a Source #

Calculate the true anomaly, ν, of a body at position, r, given its orbital elements.

Rotations to and from orbital plane

orbitalPlaneQuaternion :: RealFloat a => Orbit a -> Quaternion a Source #

A quaternion representing the rotation of the orbital plane

rotateToPlane :: (Conjugate a, RealFloat a) => Orbit a -> V3 (Qu u l a) -> V3 (Qu u l a) Source #

Rotate a position such that is is relative to the orbital plane according to the inclination specifier and periapsis specifier.

The orbital plane is perpendicular to the z axis

rotateFromPlane :: (Conjugate a, RealFloat a) => Orbit a -> V3 (Qu u l a) -> V3 (Qu u l a) Source #

Rotate a position relative to the orbital plane according to the inclination specifier and periapsis specifier.

The orbital plane is perpendicular to the z axis

other utilities

flightPathAngleAtTrueAnomaly :: (Real a, Floating a) => Orbit a -> Angle a -> Angle a Source #

Get the flight path angle, φ, of a body a a specific true anomaly. This is the angle of the body's motion relative to a vector perpendicular to the radius.

specificAngularMomentumVector :: Num a => StateVectors a -> V3 (Quantity ((:/) ((:^) Meter (Succ (Succ 'Zero))) Second) a) Source #

Calculate the momentum vector, h, given state vectors