Class SolarSystem provides the functionality of SolarSytemEphemeris in the Earth-centered Earth-fixed (ECEF) frame, and makes use of this to implement models for solid Earth tides (SETs) as well as geometry-related functions involving satellite, Sun, Moon and Earth, e.g. satellite attitude.
The class publicly inherits two large classes: class SolarSystemEphemeris (the JPL solar system ephemeris) and class EOPStore (storage and retrieval of Earth orientiation parameters). The motivation for this design is that the fundamental routine of the ephemeris, SolarSystem::ECEFPositionVelocity(planet,time), always requires simultaneous EarthOrientiation data, and this class enforces that requirement. This design allows the class to retrieve EOPs and with them implement the transformation from the inertial (celestial) frame of the solar system ephemeris to the ECEF (terrestrial) frame (using class EarthOrientation).
The class must first be initialized by initializing both SolarSystemEphemeris and EOPStore. SolarSystemEphemeris is initialized by calling initializeWithBinaryFile(filename), passing the name of a SolarSystem binary file (cf. the convertSSEph app that read JPL ASCII files and creates a binary file). EOPStore is initialized by calling addIERSFile(filename), passing it the finals2000A.data or similar file obtained, e.g. from USNO; see EOPStore. The IERS convention (1996, 2003 or 2010) may be set at this time; is also included in the class, it is required by EarthOrientation but must be consistent with the SolarSystemEphemeris.
Class design:
SolarSystem
- calls with EphTime (limits to UTC,TT,TDB only)
- member IERSconvention - keeps SSEph and EO consistent
- has all the functionality of the inherited classes,
plus, for convenience, SolidEarthTides, poleTides,
/ Sun-Earth-Sat (SunEarthSat.hpp) geometry functions
/ (all using the high-accuracy SolarSystemEphemeris)
/ \
/ (inherits) \
/ \
SolarSystemEphemeris: EOPStore:
from JPL data (-> binary file) - load 'IERS' files e.g. USNO finals.data
- times: MJD(TDB) only - times: MJD(UTC) only
- Planets+Sun+Moon position(t) - simple store of <MJD, EarthOrientation>
o o
o o
o (uses) o
o o
o o
EarthOrientation:
- EOP = (polar motion x,y + UT1-UTC)
- calls with EphTime (using UTC,TT only)
- many static functions implementing IERS
conventions
(1996, 2003, 2010); e.g. Precession, Nutation,
GMST, Terrestrial <=> Inertial frame
transformations.
Definition at line 162 of file SolarSystem.hpp.
|
Triple | computePolarTides (const Position site, const EphTime &tt) |
|
Triple | computeSolidEarthTides (const Position site, const EphTime &tt) |
|
Position | ECEFPosition (const SolarSystemEphemeris::Planet body, const EphTime &tt) |
|
void | ECEFPositionVelocity (const SolarSystemEphemeris::Planet body, const EphTime &tt, Position &Pos, Position &Vel) |
|
CommonTime | endTime () const |
|
IERSConvention | getConvention () const |
| get the IERS Convention More...
|
|
EarthOrientation | getEOP (double mjdutc) |
|
int | initializeWithBinaryFile (std::string filename) |
|
Position | lunarPosition (const EphTime &tt) |
|
void | lunarPositionVelocity (const EphTime &tt, Position &Pos, Position &Vel) |
|
Matrix< double > | satelliteAttitude (const EphTime &tt, const Position &SV) |
|
void | setConvention (const IERSConvention &conv) |
|
Position | solarPosition (const EphTime &tt) |
|
void | solarPositionVelocity (const EphTime &tt, Position &Pos, Position &Vel) |
|
| SolarSystem (IERSConvention inputiers=IERSConvention::Unknown) |
|
CommonTime | startTime () const |
|
void | sunOrbitAngles (const EphTime &tt, const Position &Pos, const Position &Vel, double &beta, double &phi) |
|
double | AU () |
|
void | clearStorage () |
|
double | endTimeMJD () const |
| Return the MJD of end time of the data (system TDB) More...
|
|
int | EphNumber () const |
|
double | getConstant (const std::string &name) |
|
int | initializeWithBinaryFile (const std::string &filename) |
|
double | ratioEarthToMoonMass () |
| Return the Earth-to-Moon mass ratio. More...
|
|
double | ratioSunToEarthMass () |
| Return the Sun-to-Earth mass ratio. More...
|
|
int | readASCIIdata (const std::string &filename) |
|
int | readASCIIdata (std::vector< std::string > &filenames) |
|
void | readASCIIheader (const std::string &filename) |
|
int | readBinaryFile (const std::string &filename) |
|
void | relativeInertialPositionVelocity (double MJD, Planet target, Planet center, double PV[6], bool kilometers=true) |
|
| SolarSystemEphemeris () |
|
double | startTimeMJD () const |
| Return the MJD of start time of the data (system TDB) More...
|
|
int | writeASCIIdata (std::ostream &os) |
|
int | writeASCIIheader (std::ostream &os) |
|
int | writeBinaryFile (const std::string &filename) |
|
void | addEOP (int MJD, EarthOrientation &eop) |
| Add to the store directly. More...
|
|
int | addEOP (int MJD, EOPPrediction &eopp) |
|
void | addEOPPFile (const std::string &filename) |
|
void | addFile (const std::string &filename) |
|
void | addIERSFile (const std::string &filename) |
|
void | clear () |
| clear the store More...
|
|
void | dump (short detail=0, std::ostream &s=std::cout) const |
|
void | edit (int mjdmin, int mjdmax) |
|
| EOPStore () |
| Constructor. More...
|
|
EarthOrientation | getEOP (double mjd, const IERSConvention &conv) |
|
int | getFirstTimeMJD () |
| Return first time (MJD) in the store. More...
|
|
int | getLastTimeMJD () |
| Return last time (MJD) in the store. More...
|
|
int | size () |
| return the number of entries in the store More...
|
|
Compute the satellite attitude, given the time and the satellite position SV Return a 3x3 Matrix which contains, as rows, the unit (ECEF) vectors X,Y,Z in the body frame of the satellite, namely Z = along the boresight (i.e. towards Earth center), Y = perpendicular to both Z and the satellite-sun direction, and X = completing the orthonormal triad. X will generally point toward the sun. Thus this rotation matrix R transforms an ECEF XYZ vector into the body frame of the satellite, so R * [ECEF XYZ Vector] = components in body frame. Also, R.transpose() * [satellite body frame Vector] = ECEF XYZ components. Also return the shadow factor, which is the fraction of the sun's area not visible to satellite; thus sf > 0 means the satellite is in eclipse.
- Parameters
-
- Returns
- Matrix<double>(3,3) Rotation matrix from XYZ to Satellite body frame.
- Exceptions
-
Definition at line 373 of file SolarSystem.hpp.