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

Declarations for the utilities related to the Kepler problem. More...

Declarations for the utilities related to the Kepler problem.

Author
Jared R. Males

Definition in file kepler.hpp.

#include <iostream>
#include <cmath>
#include <cstdlib>
#include "units.hpp"

Go to the source code of this file.

Namespaces

namespace  mx
 The mxlib c++ namespace.
 

Macros

#define KEPLER_TOL   ( 1e-8 )
 The default tolerance for solutions to the Kepler problem.
 
#define KEPLER_ITMAX   ( 1000 )
 The default maximum number of iterations for solutions to the Kepler problem.
 

Functions

template<typename realT >
long mx::astro::hyperbolic_kepler (realT &E, realT &err, realT e, realT M, realT tol, long itmax)
 Solve the hyperbolic kepler equation (for e> 1).
 
template<typename realT >
realT mx::astro::kepler_danby_1 (realT e, realT M, realT Ei)
 Calculate the next iteration of Danby's quartic Newton-Raphson method.
 
template<typename realT >
long mx::astro::solve_kepler_danby (realT &E, realT &D, realT e, realT M, realT tol, long itmax)
 Solve Kepler's equation using Danby's quartic Newton-Raphson method.
 
template<typename realT >
long mx::astro::solve_kepler (realT &E, realT &D, realT e, realT M, realT tol=KEPLER_TOL, long itmax=KEPLER_ITMAX)
 Solve Kepler's equation for any e. Uses solve_kepler_danby if e < 1.0, hyperbolic_kepler otherwise.
 

Macro Definition Documentation

◆ KEPLER_ITMAX

#define KEPLER_ITMAX   ( 1000 )

The default maximum number of iterations for solutions to the Kepler problem.

Definition at line 30 of file kepler.hpp.

◆ KEPLER_TOL

#define KEPLER_TOL   ( 1e-8 )

The default tolerance for solutions to the Kepler problem.

Definition at line 25 of file kepler.hpp.