/*************************************************************************** * (C) Copyright 2006 by GATS, Inc. * 11864 Canon Blvd., STE 101 * Newport News, VA 23606 * * All Rights Reserved. No part of this software or publication may be * reproduced, stored in a retrieval system, or transmitted, in any form * or by any means, electronic, mechanical, photocopying, recording, or * otherwise without the prior written permission of GATS, Inc. * *************************************************************************** * * Class: Ephemeris * * Filename: Ephemeris.h * * Description: EphemerisClass has member functions to manipulate date events * and process SOFIE Level1 Time Registration for a single event * * Author: C.W.Brown * (757)952-1048 * (757)873-5920 * * ***************************************************************************/ #ifndef EPHEMERIS_H #define EPHEMERIS_H #include #include #include "EventVar.h" #include "GeneralFunctions.h" using namespace std; /** @author C.W.Brown */ class Ephemeris{ private: public: // double *time; //!< Level 0 Detector Time Array // double * //double *stateVector[6]; //!< Double array to hold ephemeris double ephStart; double ephEnd; double timeStep; int coordSys; int numPts; typedef struct { double time; int year; int doy; double sec; double position[3]; double velocity[3]; } StateVector; StateVector *stateVector; //public: Ephemeris(); //!< default constructor - Constructs an empty EphemerisClass object Ephemeris(ifstream&); //!< Constructs an empty EphemerisClass object //!< Loads Initial Ephemeris from file //!< This constructor will be used with the Solar Ephem Object Ephemeris(int size); //!< Constructs an empty EphemerisClass object //!< Allocates memory for 'size' data points in the stateVector //!< This constructor will be used with the Satellite Ephemeris ~Ephemeris(); //!< default destructor void getEphemeris(ifstream&); //!< Populates Ephemeris object with data from file void getEphemeris(Ephemeris&); //!< Function initializes stateVector by interpolating an Ephemeris onto EventVar time grid //!< EventVar must be a time variable void getFileHeader(ifstream&); //!< Reads Ephemeris File Header Information //!< Stores Values in Ephemeris Class Object //!< Returns Size of Ephemeris //void interpolate(Ephemeris&); //!< Interpolates stateVector void calculateTime(int); //!< Fills Time Values from double time parameter void writeOutput(); //!< Writes the Output of All Member Variables to Event Object Tmp or Level1 //!< Requires No Parameters ... Uses Config for Output Parameters and Locations //!< IS NOT IMPLEMENTED }; #endif