/*************************************************************************** * (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: Satellite * * Filename: Satellite.h * * Description: Satellite 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 SATELLITE_H #define SATELLITE_H #include "Ephemeris.h" #include "Event.h" #include "EventVar.h" #include "HInterpolate.h" #include "GeoCal.h" #include "DVector.h" #include "DMatrix.h" /* #include "SCsabertime.h" // */ #include #define CURVATUREHT 0.0 using namespace std; /** @author C.W.Brown */ class Satellite: public Ephemeris{ private: //public: double *elevation; //!< Elevation Angle Array for Each Time Step (in degrees) double *tpLat; //!< Geodetic Tangent Point Latitude for Each Time Step (in degrees) double *tpLon; //!< Geodetic Tangent Point Longitude for Each Time Step (in degrees) double *tpAlt; //!< Geodetic Tangent Point Altitude for Each Time Step (in km) double *scLat; //!< Geodetic Spacecraft Latitude for Each Time Step (in degrees) double *scLon; //!< Geodetic Spacecraft Longitude for Each Time Step (in degrees) double *scAlt; //!< Geodetic Spacecraft Altitude for Each Time Step (in km) double *scRad; //!< Spacecraft Radius from Center of Curvature for Each Time Step (in km) double *doppler; //!< Doppler Shift for Each Time Step (km /sec) double *sinkRate; //!< Sink Rate of Elevation Angle (deg/sec) double *objectDistance; //!< Distance From Satellite to Access Object (km) double *earthSunDistance; //!< Distance From Satellite to Access Object (km) //double *radCurvature; //!< Instantenous Radius of Curvature (in km) double radCurvature; //!< Instantenous Radius of Curvature (in km) double losBearing; //!< Bearing at Cloud Height double solarRadius; //!< Instantenous Radius of Curvature (in km) //typedef struct { // DVector *los; //} LOSVector; //LOSVector *losVector; double solarExtent; DVector **losVectors; DVector **losSunVectors; //double *tangentXYZ[6]; public: Satellite(); //!< default constructor - Constructs an empty SatelliteClass object Satellite(ifstream& file); //!< Constructs an empty EphemerisClass object //!< Loads Initial Ephemeris from file Satellite(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 ~Satellite(); //!< default destructor void getEphemeris(Ephemeris& ephem, EventVar ); //!< Function initializes Satellite stateVector based on an Ephemeris void getViewingAngle(); //!< Gets the Viewing Angle for each time from the its ephemeris to another ephemeris //!< Requires an Ephemeris void getTPLocation(Ephemeris& t); //!< Gets the XYZ Tangent Point Location for each time from the its ephemeris to another ephemeris //!< Requires an Ephemeris void calcLLA(); //!< Calculates the Geodetic Lat, Lon, and Altitude for Each //!< Requires No Parameters at this Time //!< IS NOT IMPLEMENTED void calcCurvatureRadius(); //!< Calculates the Radius of Curvature by using TP Lat, Lon, Alt at 0 km //!< Requires TP Lat, Lon, and Alt to be populated //!< Preferably the event will pass through a desired TP Altitude and give //!< the Radius of Curvature for that position. Otherwise, it will give the //!< Radius of Curvature for a point halfway along the array and log a warning. void calcSCRadius(); //!< Calculates the Spacecraft Radius from the Center of the Radius of Curvature //!< Radius of Curvature must be populated //!< Requires No Parameters at this Time void getIndex(double, int&); void calcCurvatureValues(int, double&, double&); void calcBearing(int, double&); void calcDopplerShift(); //!< Calculates Doppler Shift and stores in doppler variable void calcSinkRate(); //!< Calculates Rate of Elevation Angle void writeOutput(Event&, Event&); //!< Writes the Output of All Member Variables to Event Object Tmp or Level1 //!< Requires No Parameters ... Uses Config for Output Parameters and Locations }; #endif