mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
Loading...
Searching...
No Matches
orbitUtils.hpp File Reference

Utilities related to orbits. More...

Utilities related to orbits.

Author
Jared R. Males

Definition in file orbitUtils.hpp.

#include "../math/constants.hpp"
#include "kepler.hpp"

Go to the source code of this file.

Namespaces

namespace  mx
 The mxlib c++ namespace.
 

Functions

template<typename units >
units::realT mx::astro::orbitPeriod (typename units::realT m1, typename units::realT m2, typename units::realT a)
 Calculate the period of an orbit, given the masses and semi-major axis.
 
template<typename units >
units::realT mx::astro::orbitSemiMaj (typename units::realT m1, typename units::realT m2, typename units::realT P)
 Calculate the semi-major axis of an orbit, given the masses and Period, using SI units.
 
template<typename realT >
realT mx::astro::orbitMeanAnol (realT t, realT t0, realT P)
 Calculate the mean anomaly at time t, given the time of pericenter passage t0 and period P.
 
template<typename realT >
long mx::astro::orbitElements (realT &r, realT &f, realT E, realT D, realT e, realT M, realT a, realT tol=KEPLER_TOL, long itmax=KEPLER_ITMAX)
 Calculate the separation and true anomaly for an orbit at the specified mean anomaly.
 
template<typename realT >
realT mx::astro::orbitPhaseCosine (realT f, realT w, realT inc)
 Get the orbital phase at true anomaly f. Calculates the cos(alfa) where alfa is the orbital phase.
 
template<typename realT >
realT mx::astro::orbitLambertPhase (realT cos_alf)
 Get the lambertian phase function at orbital phase specified as cos(alfa), where alfa is the phase angle.
 
template<typename units >
units::realT mx::astro::orbitRV (typename units::realT m1, typename units::realT m2, typename units::realT inc, typename units::realT a, typename units::realT e, typename units::realT w, typename units::realT f)
 Calculate the radial velocity of an orbiting body inclined relative to an observer.
 
template<typename vectorT , typename realT >
int mx::astro::orbitCartesianWork (vectorT *x, vectorT *y, vectorT *z, vectorT *r, vectorT *rProj, vectorT *f, vectorT *cos_alf, vectorT *phi, const vectorT &t, const size_t N, realT a, realT P, realT e, realT t0, realT i, realT w, realT W)
 Calculate various quantities of an orbit given the keplerian elements and a vector of times.
 
template<typename vectorT , typename arithT >
int mx::astro::orbitCartesian2DPhi (vectorT &x, vectorT &y, vectorT &r, vectorT &rProj, vectorT &phi, const vectorT &t, const size_t N, arithT a, arithT P, arithT e, arithT t0, arithT i, arithT w, arithT W)