2016-06-15 23:48:41 +02:00
|
|
|
#ifndef COORDINATETRANSFORMATIONS_H_
|
|
|
|
#define COORDINATETRANSFORMATIONS_H_
|
|
|
|
|
2020-08-13 20:53:35 +02:00
|
|
|
#include "../timemanager/Clock.h"
|
2018-07-13 18:28:26 +02:00
|
|
|
#include <cstring>
|
2016-06-15 23:48:41 +02:00
|
|
|
|
|
|
|
class CoordinateTransformations {
|
|
|
|
public:
|
2018-07-12 16:29:32 +02:00
|
|
|
static void positionEcfToEci(const double* ecfCoordinates, double* eciCoordinates, timeval *timeUTC = NULL);
|
2016-06-15 23:48:41 +02:00
|
|
|
|
2018-07-12 16:29:32 +02:00
|
|
|
static void velocityEcfToEci(const double* ecfVelocity,
|
2016-06-15 23:48:41 +02:00
|
|
|
const double* ecfPosition,
|
2018-07-12 16:29:32 +02:00
|
|
|
double* eciVelocity, timeval *timeUTC = NULL);
|
|
|
|
|
|
|
|
static void positionEciToEcf(const double* eciCoordinates, double* ecfCoordinates,timeval *timeUTC = NULL);
|
|
|
|
static void velocityEciToEcf(const double* eciVelocity,const double* eciPosition, double* ecfVelocity,timeval* timeUTC = NULL);
|
2016-06-15 23:48:41 +02:00
|
|
|
|
2018-07-12 16:29:32 +02:00
|
|
|
static double getEarthRotationAngle(timeval timeUTC);
|
2016-06-15 23:48:41 +02:00
|
|
|
|
2018-07-12 16:29:32 +02:00
|
|
|
static void getEarthRotationMatrix(timeval timeUTC, double matrix[][3]);
|
2016-06-15 23:48:41 +02:00
|
|
|
private:
|
2018-07-12 16:29:32 +02:00
|
|
|
CoordinateTransformations();
|
|
|
|
static void ecfToEci(const double* ecfCoordinates, double* eciCoordinates,
|
|
|
|
const double* ecfPositionIfCoordinatesAreVelocity, timeval *timeUTCin);
|
|
|
|
static void eciToEcf(const double* eciCoordinates,
|
|
|
|
double* ecfCoordinates,
|
|
|
|
const double* eciPositionIfCoordinatesAreVelocity,timeval *timeUTCin);
|
|
|
|
|
|
|
|
static double getJuleanCenturiesTT(timeval timeUTC);
|
|
|
|
static void getTransMatrixECITOECF(timeval time,double Tfi[3][3]);
|
2016-06-15 23:48:41 +02:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* COORDINATETRANSFORMATIONS_H_ */
|