/** @file  psEarthOrientation.h
*
*  @brief Function prototypes for earth orientation calculations
*  transformation
*
*  @ingroup EarthOrientation
*
*  @author Robert Daniel DeSonia, MHPCC
*
*  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
*  @date $Date: 2005-09-13 00:50:04 $
*
*  Copyright 2005 Maui High Performance Computing Center, University of Hawaii
*/

#ifndef PS_EARTH_ORIENTATION
#define PS_EARTH_ORIENTATION

#include "psCoord.h"
#include "psTime.h"
#include "psSphereOps.h"

typedef struct
{
    double x;
    double y;
    double s;
}
psEarthPole;

typedef enum {
    PS_PRECESS_ROUGH,
    PS_PRECESS_COMPLETE,
    PS_PRECESS_IAU2000A,
} psPrecessMethod;

psSphere *psAberration(
    psSphere *apparent,
    const psSphere *actual,
    const psSphere *direction,
    double speed
);

psSphere *psGravityDeflection(
    psSphere *apparent,
    psSphere *actual,
    psSphere *sun
);

double psEOC_ParallaxFactor(
    const psSphere *coords,
    const psTime *time
);

psEarthPole *psEOC_PrecessionModel(
    const psTime *time
);

psEarthPole *psEOC_PrecessionCorr(
    const psTime *time,
    psTimeBulletin bulletin
);

psSphereRot *psSphereRot_CEOtoGCRS(
    const psEarthPole *pole
);

psSphereRot *psSphereRot_TEOtoCEO(
    const psTime *time
);

psEarthPole *psEOC_GetPolarMotion(
    const psTime *time,
    psTimeBulletin bulletin
);

psEarthPole *psEOC_PolarTideCorr(
    const psTime *time
);

psEarthPole *psEOC_NutationCorr(
    psTime *time
);

psSphereRot *psSphereRot_ITRStoTEO(
    const psEarthPole *motion
);

#endif // #ifndef PS_EARTH_ORIENTATION
