/*******************************************************************************
*$ Component_name:
*	Kep_TrueAnom
*$ Abstract:
*	Calculates the true anomaly of a satellite based on its given
*	eccentricity and mean anomaly.
*$ Keywords:
*	KEPLER, ORBITAL_MOTION
*	C, PUBLIC
*$ Declarations:
*	double		Kep_TrueAnom( e, meanAnom )
*	double		e, meanAnom;
*$ Inputs:
*	e		orbital eccentricity.
*	meanAnom	mean anomaly in radians.
*$ Outputs:
*	none
*$ Returns:
*	true anomaly in radians, between -pi and pi.
*$ Detailed_description:
*	This function returns the true anomaly of a satellite based on its
*	given eccentricity and mean anomaly.  It is the inverse of function
*	Kep_MeanAnom().  Note that the accuracy of the result can be controlled
*	by Kep_SetError().
*$ External_references:
*	XKep_TrueAnom(), kep_error
*$ Examples:
*	none
*$ Error_handling:
*	none
*$ Limitations:
*	Accuracy will be reduced when eccentricity is close to unity.
*$ Author_and_institution:
*	Mark R. Showalter
*	NASA/Ames Research Center
*$ Version_and_date:
*	1991 June 18
*$ Change_history:
*	none
*******************************************************************************/
#include <math.h>
#include "kepler.h"

double	Kep_TrueAnom( e, meanAnom )
double	e, meanAnom;
{
double	eccRatio, eccAnom;

	eccRatio = sqrt( (1.+e) / (1.-e) );
	return XKep_TrueAnom( e, eccRatio, meanAnom, &eccAnom );
}

/******************************************************************************/
