Earth Observation Mission CFI Software Usage Guide for Object Oriented Software |
This functionality performs accurate computation of pointing parameters from and to a satellite for various types of targets. Classes and methods for this functionality can be found in the Pointing CFI Library.
Before the user could call targets function, some parameters has to be initialised:
Attitude: The attitude defines the relation between satellite coordinate frames and a general reference frame. The Earth Observation CFI provides a flexible way for the attitude computation, so that it could covers almost any satellite attitude system. Please refer to the [MCD] for further details about the satellite coordinate frames used for the attitude computation. (See Attitude Computation)
For some targets calculation, it could be needed to take into account the atmospheric refraction of a signal travelling to/from the satellite. In these cases the user could choose the atmospheric model to use. For using an atmospheric model in the target calculation, the atmosphere configuration data has to be stored in an object of the AtmosId class. Afterwards this object is introduced in the target computation methods.(See Targets crossing the atmosphere)
For geolocation routines it could be needed a digital elevation model (DEM) in order to get a more accurate target. The DEM is introduced in the target calculation methods using the CFI class DemId. (See Targets with a Digital Elevation Model)
Note that only the attitude initialisation is mandatory before doing any target computation. Go to the Targets sub-section to know more about the targets that can be computed.
The attitude computation consists on the calculation of a rotation matrix (attitude matrix) from an inertial frame to a satellite/instrument reference frame (target frame). The Earth Observation CFI software requires the definition of a set of satellite frames, so that the attitude is computed as a sequence of rotations from the inertial frame to the requested target frame (see [MCD]). We can summarise the attitude computation in the following steps:
Satellite and instrument attitude frames initialisation. There are four different levels of attitude frames:
The Orbital frame is defined by the satellite state vector, so the user does not need to define it. However the satellite and instrument frames have to be defined by the user. The definition data (initialisation) are stored in objects of the clases: SatNomTransId, SatTransId and InstrTransId respectively. These classes have a set of initialisation methods where the attitude frame is defined (for example, the SAF can be definde as a rotation with respect to the SNAF or as a rotation with respect to an inertial frame...). See Figure 1, Figure 2 and Figure 3
Note that not all attitude frames have to be defined. That depends on the target frame and the initialisation model as it is explained below.
The attitudes can also be initialized at the same time with a configuration file using the method PointingFunc::attitudeDefine.
Finally, the data flow for the attitude computation is sumarised in Figure 5.
Once that the attitide has been computed, it is possible to compute a target. The list of targets is described below, but in general for every problem, there are three different target types:
A target can be constructed with the following steps:
The list of targets that can be computed is the following:
Target::targetXXX method | Description | |
---|---|---|
Target::targetInter / Target::multiTargetInter / Target::targetListInter | It calculates the intersection point(s) of the line of sight defined by an elevation and an azimuth angle expressed in the input Attitude frame, with a surface(s) located at a certain geodetic altitude(s) over the Earth. | |
Target::targetTravelTime / Target::multiTargetTravelTime | It calculates the point of the line or sight from the satellite (defined by an elevation and an azimuth angle expressed in the selected Attitude Frame) at a given travel time(s) along the (curved) line of sight. | |
Target::targetGroundRange | It calculates the location of a point that is placed on a surface at a certain geodetic altitude over the Earth, that lays on the plane defined by theS/C position, the nadir and a reference point, and that is at a certain distance or ground range measured along that surface from that reference point. This reference point is calculated being the intersection of the previous surface with the line of sight defined by an elevation and azimuth angle in the input Attitude coordinate system. | |
Target::targetIncidenceAngle | It calculates the location of a point that is placed on a surface at a certain geodetic altitude over the Earth and that is seen from the S/C on a line of sight that forms a certain azimuth angle in the input Attitude frame and that intersects that surface with a certain incidence angle. | |
Target::targetRange | It calculates the location of a point that is placed on a surface at a certain geodetic altitude over the Earth, that is seen from the S/C on a line of sight that forms a certain azimuth angle in the input Attitude frame, and that is at a certain range or slant-range from the S/C. | |
Target::targetRangeRate | It calculates the location of a point that is placed on a surface at a certain geodetic altitude over the Earth, that is at a certain range from S/C, and whose associated Earth-fixed target has a certain range-rate value. | |
Target::targetTangent | It calculates the location of the tangent point over the Earth that is located on the line of sight defined by an elevation and azimuth angles expressed in the input Attitude frame. | |
Target::targetAltitude | It calculates the location of the tangent point over the Earth that is located on a surface at a certain geodetic altitude over the Earth and that is on a line of sight that forms a certain azimuth angle in the input Attitude frame. | |
Target::targetStar | It calculates the location of the tangent point over the Earth that is located on the line of sight that points to a star defined by its right ascension and declination coordinates. | |
Target::targetGeneric | The cartesian state vector of the target is taken as an input. | |
Target::targetTangentSun | It calculates the location of the tangent point over the Earth that is located on the line of sight that points to the Sun | |
Target::targetTangentMoon | It calculates the location of the tangent point over the Earth that is located on the line of sight that points to the Moon | |
Target::targetStation | It calculates the most relevant observation parameters of the link between the satellite and a ground station |
The atmospheric refraction of a signal travelling from/to the satellite can be taken into account when computing a target:
A target with a DEM can be computed in the following way:
The following example shows how to get compute a target going through the following steps:
// ------------------------------------------------------------------------ // // C++ Example Program. // TARGET COMPUTATION // // ------------------------------------------------------------------------ // Non-EOCFI include files #include <string> #include <vector> #include <iostream> // EOCFI includes #include "TimeCorrelation.h" #include "ModelId.h" #include "DataHandlingData.h" #include "PointingData.h" #include "LibData.h" #include "SatNomTransId.h" #include "SatTransId.h" #include "InstrTransId.h" #include "Attitude.h" #include "Target.h" #include "AtmosId.h" #include "DemId.h" #include "StateVector.h" #include "Coord.h" // Namespaces using namespace EECFI; using namespace std; // Main program int main (int argc, char *argv[]) { // Local variables declaration // --------------------------- // Accessors ParamModel paramModel; AttFileModel satNomFileModel; AngleModel angleModel; HarmonicModel harmoModel; AttitudeData attitudeData; TargetIdData targetData; // Sat nominal init file vector<string> attitudeFile; // Instrument init harmonic vector<long> harmonicTypePitch; vector<long> harmonicTypeRoll; vector<long> harmonicTypeYaw; vector<double> harmonicCoeffPitch; vector<double> harmonicCoeffRoll; vector<double> harmonicCoeffYaw; // Target inter long deriv, interFlag, iray; double losAz, losEl, geodAlt, losAzRate, losElRate, freq; // Target extravector long targetType; long targetNumber; vector<double> vectorResults; vector<double> vectorResultsRate; vector<double> vectorResultsRateRate; // Target extra main long choice; vector<double> mainResults; vector<double> mainResultsRate; vector<double> mainResultsRateRate; // Target extra aux vector<double> auxResults; vector<double> auxResultsRate; vector<double> auxResultsRateRate; // Target extra to sun vector<double> sunResults; vector<double> sunResultsRate; vector<double> sunResultsRateRate; // Target extra to moon vector<double> moonResults; vector<double> moonResultsRate; vector<double> moonResultsRateRate; // Target extra EF target vector<double> efTargetResultsRate; vector<double> efTargetResultsRateRate; //------------------------------------------------- // Put all the code inside try-catch statements // so, if something fails, an exception is thrown //------------------------------------------------- try {
// ------------------------------------------------------------------------ // Satellite Id, ModelId and TimeCorrelatins initialization // ------------------------------------------------------------------------ SatId satId(XPCFI_SAT_ENVISAT); ModelId modelId; //Do nothing: using default models. double initTime[4]; initTime[0] = -245.1000000000000000; // TAI time [days] initTime[1] = -245.0995949074074074; // UTC time [days] (= TAI - 35.0 s) initTime[2] = -245.0995879629629630; // UT1 time [days] (= TAI - 35.6 s) initTime[3] = -245.0997800925925926; // GPS time [days] (= TAI - 19.0 s) TimeCorrelation timeId( initTime );
// ------------------------------------------------------------------------ // Atmosphere initialization // ------------------------------------------------------------------------ // input values long atmosMode = XPCFI_NO_REF_INIT; long atmosModel = 0; //dummy string atmosFile = ""; // dummy in this case AtmosId atmosId; atmosId.init( atmosMode, atmosModel, atmosFile ); // ------------------------------------------------------------------------ // // Attitude initialization functions // - Satellite Nominal Attitude // - Satellite Attitude // - Instrument Attitude // // ------------------------------------------------------------------------
// ------------------------------------------------------------------------ // Satellite Nominal Attitude // ------------------------------------------------------------------------ // Set input values vector<double> modelParam; long modelEnum = XPCFI_MODEL_ENVISAT; modelParam.push_back( -0.1671 ); modelParam.push_back( 0.0501 ); modelParam.push_back( 3.9130 ); // Initialiasation SatNomTransId satNomTransId; satNomTransId.init( modelEnum, modelParam );
// ------------------------------------------------------------------------ // Satellite Attitude // ------------------------------------------------------------------------ // input values double ang[3]; ang[0] = 0.1; ang[1] = 0.2; ang[2] = -0.3; // Initialiasation SatTransId satTransId; satTransId.init( ang ); // ------------------------------------------------------------------------ // Instrument Attitude // ------------------------------------------------------------------------ InstrTransId instrTransId; // This frame is not to be initialised. The target frame for the attitude // will be the Satellite Attitude.
// ------------------------------------------------------------------------ // Attitude calculations // ------------------------------------------------------------------------ // Initialisation Attitude attId; attId.setTransformations( timeId, satNomTransId, satTransId, instrTransId ); // Satellite vector for input StateVector stVec; stVec.time.ref = XPCFI_TIME_UTC; stVec.time.time = 255.3456; stVec.coord.cs = XLCFI_CS_EF; stVec.coord.pos[0] = 6997887.57; stVec.coord.pos[1] = -1536046.83; stVec.coord.pos[2] = 99534.18; stVec.coord.vel[0] = -240.99; stVec.coord.vel[1] = -1616.85; stVec.coord.vel[2] = -7376.65; stVec.coord.acc[0] = -7.79104; stVec.coord.acc[1] = 1.69353; stVec.coord.acc[2] = -0.10826; // Attitude calculation attId.compute( modelId, stVec, XPCFI_SAT_ATT );
// ------------------------------------------------------------------------ // Target pointing: Intersection target // ------------------------------------------------------------------------ DemId dem; // DEM is not to be used interFlag = XPCFI_INTER_1ST; deriv = XPCFI_DER_1ST; losAz = 50.0; losEl = 85.0; geodAlt = 100.0; losAzRate = 1.0; losElRate = 1.0; iray = XPCFI_NO_REF_INIT; freq = 1.e10; Target targetId( attId, dem, atmosId ); targetId.targetInter( satId, deriv, interFlag, losAz, losEl, geodAlt, losAzRate, losElRate, iray, freq );
// ------------------------------------------------------------------------ // Get target results for USER target // - extraVector // - extraMain // - extraAux // - extraTargetToSun // - extraTargetToMoon // - extraEfTarget // ------------------------------------------------------------------------ // input values choice = XPCFI_NO_DER; targetType = XPCFI_USER_TARGET_TYPE; targetNumber = 0; // Target Extra Vector targetId.extraVector( choice, targetType, targetNumber, vectorResults, vectorResultsRate, vectorResultsRateRate ); cout << " INPUT" << endl; cout << "- Time Reference : " << stVec.time.ref << endl; cout << "- Time : " << stVec.time.time << endl; cout << "- Sat Position : [" << stVec.coord.pos[0] << "," << stVec.coord.pos[1] << "," << stVec.coord.pos[2] << "]" << endl; cout << "- Sat Velocity : [" << stVec.coord.vel[0] << "," << stVec.coord.vel[1] << "," << stVec.coord.vel[2] << "]" << endl; cout << "- Sat Acceleration : [" << stVec.coord.acc[0] << "," << stVec.coord.acc[1] << "," << stVec.coord.acc[2] << "]" << endl; cout << "- Derivative Flag : " << deriv << endl; cout << "- Intersection Flag: " << interFlag << endl; cout << "- LOS Azimuth : " << losAz << endl; cout << "- LOS Elevation : " << losEl << endl; cout << "- Geodetic Altitude: " << geodAlt << endl; cout << "- LOS Azimuth Rate : " << losAzRate << endl; cout << "- LOS Elev. Rate : " << losElRate << endl; cout << "- Ray Tracing Model: " << iray << endl; cout << "- Frequency : " << freq << endl; cout << " OUTPUT" << endl; cout << "- Target Position : [" << vectorResults[0] << "," << vectorResults[1] << "," << vectorResults[2] << "]" << endl; cout << "- Range : " << vectorResults[6] << endl; cout << "- Sat-Target LOS : [" << vectorResults[3] << "," << vectorResults[4] << "," << vectorResults[5] << "]" << endl; // Target Extra Main results choice = XPCFI_TARG_EXTRA_AUX_ALL; targetType = XPCFI_USER_TARGET_TYPE; targetNumber = 0; targetId.extraMain( choice, targetType, targetNumber, mainResults, mainResultsRate, mainResultsRateRate ); cout << " INPUT" << endl; cout << "- Choice Flag : " << choice << endl; cout << " OUTPUT" << endl; cout << "- Geocentric Long. : " << mainResults[0] << endl; cout << "- Geocentric Lat. : " << mainResults[1] << endl; cout << "- Geodetic Latitude : " << mainResults[2] << endl; cout << "- Geodetic Altitude : " << mainResults[3] << endl; cout << "- Sat. to target Top. Azimuth: " << mainResults[4] << endl; cout << "- Sat. to target Top. Elev. : " << mainResults[5] << endl; cout << "- Target Azimuth : " << mainResults[6] << endl; cout << "- Target Elevation : " << mainResults[7] << endl; cout << "- Topoc. Azimuth : " << mainResults[8] << endl; cout << "- Topoc. Elevation : " << mainResults[9] << endl; cout << "- Geocentric Long. rate : " << mainResultsRate[0] << endl; cout << "- Geocentric Lat. rate : " << mainResultsRate[1] << endl; cout << "- Geodetic Latitude rate : " << mainResultsRate[2] << endl; cout << "- Geodetic Altitude rate : " << mainResultsRate[3] << endl; cout << "- Sat2tar Top. Azimuth rate : " << mainResultsRate[4] << endl; cout << "- Sat2tar Top. Elev.rate : " << mainResultsRate[5] << endl; cout << "- Target Azimuth rate : " << mainResultsRate[6] << endl; cout << "- Target Elevation rate : " << mainResultsRate[7] << endl; cout << "- Topoc. Azimuth rate : " << mainResultsRate[8] << endl; cout << "- Topoc. Elevation rate : " << mainResultsRate[9] << endl; cout << "- Geocentric Long. rate rate : " << mainResultsRateRate[0] << endl; cout << "- Geocentric Lat. rate rate : " << mainResultsRateRate[1] << endl; cout << "- Geodetic Latitude rate rate: " << mainResultsRateRate[2] << endl; cout << "- Geodetic Altitude rate rate: " << mainResultsRateRate[3] << endl; cout << "- Sat2tar Top. Azimuth rate r: " << mainResultsRateRate[4] << endl; cout << "- Sat2tar Top. Elev.rate rate: " << mainResultsRateRate[5] << endl; cout << "- Target Azimuth rate rate : " << mainResultsRateRate[6] << endl; cout << "- Target Elevation rate rate : " << mainResultsRateRate[7] << endl; cout << "- Topoc. Azimuth rate rate : " << mainResultsRateRate[8] << endl; cout << "- Topoc. Elevation rate rate : " << mainResultsRateRate[9] << endl; // Target Auxiliary results choice = XPCFI_TARG_EXTRA_AUX_ALL; targetType = XPCFI_USER_TARGET_TYPE; targetNumber = 0; targetId.extraAux( choice, targetType, targetNumber, auxResults, auxResultsRate, auxResultsRateRate ); cout << " INPUT" << endl; cout << "- Choice Flag : " << choice << endl; cout << " OUTPUT" << endl; cout << "- Curvature Radius at target's nadir = " << auxResults[0] << endl; cout << "- Distance: target's nadir to satellites's nadir = " << auxResults[1] << endl; cout << "- Distance target's nadir to ground track = " << auxResults[2] << endl; cout << "- Distance SSP to point in the ground track nearest to the target's nadir= " << auxResults[3] << endl; cout << "- MLST at target = " << auxResults[4] << endl; cout << "- TLST at target = " << auxResults[5] << endl; cout << "- RA throught the atmosphere = " << auxResults[6] << endl; cout << "- Dec. throught the atmosphere = " << auxResults[7] << endl; cout << "- Curvature Radius rate at target's nadir = " << auxResultsRate[0] << endl; cout << "- Distance rate: target's nadir to satellites's nadir = " << auxResultsRate[1] << endl; cout << "- Distance rate target's nadir to ground track = " << auxResultsRate[2] << endl; cout << "- Distance rate SSP to point in the ground track nearest to the target's nadir= " << auxResultsRate[3] << endl; cout << "- Target's nadir velocity (relative to the Earth). North = " << auxResultsRate[8] << endl; cout << "- Target's nadir velocity (relative to the Earth). East = " << auxResultsRate[9] << endl; cout << "- Target's nadir velocity (relative to the Earth). Azimuth = " << auxResultsRate[10] << endl; cout << "- Target's nadir velocity (relative to the Earth). Magnitude = " << auxResultsRate[11] << endl; cout << "- Curvature Radius rate rate at target's nadir = " << auxResultsRateRate[0] << endl; cout << "- Distance rate rate: target's nadir to satellites's nadir = " << auxResultsRateRate[1] << endl; cout << "- Distance rate rate target's nadir to ground track = " << auxResultsRateRate[2] << endl; cout << "- Distance rate rate SSP to point in the ground track nearest to the target's nadir= " << auxResultsRateRate[3] << endl; // Target: extraTargetToSun choice = XPCFI_DER_2ND; targetType = XPCFI_USER_TARGET_TYPE; targetNumber = 0; iray = XPCFI_NO_REF_INIT; freq = 1.e10; targetId.extraTargetToSun( choice, targetType, targetNumber, iray, freq, sunResults, sunResultsRate, sunResultsRateRate ); cout << " INPUT" << endl; cout << "- Choice Flag : " << choice << endl; cout << "- Ray Tracing Model : " << iray << endl; cout << "- Frequency : " << freq << endl; cout << " OUTPUT" << endl; cout << "- Topocentric Azimuth. : " << sunResults[0] << endl; cout << "- Topocentric Elevation. : " << sunResults[1] << endl; cout << "- Topocentric Azimuth rate. : " << sunResultsRate[0] << endl; cout << "- Topocentric Elevation rate : " << sunResultsRate[1] << endl; cout << "- Topocentric Az. rate rate : " << sunResultsRateRate[0] << endl; cout << "- Topocentric Elev. rate rate: " << sunResultsRateRate[1] << endl; cout << "- Tangent Altitude : " << sunResults[2] << endl; cout << "- Target to sun visibility. : " << sunResults[3] << endl; // Target: extraTargetToMoon choice = XPCFI_DER_2ND; targetType = XPCFI_USER_TARGET_TYPE; targetNumber = 0; iray = XPCFI_NO_REF_INIT; freq = 1.e10; targetId.extraTargetToMoon( choice, targetType, targetNumber, iray, freq, moonResults, moonResultsRate, moonResultsRateRate); cout << " INPUT" << endl; cout << "- Choice Flag : " << choice << endl; cout << "- Ray Tracing Model : " << iray << endl; cout << "- Frequency : " << freq << endl; cout << " OUTPUT" << endl; cout << "- Topocentric Azimuth. : " << moonResults[0] << endl; cout << "- Topocentric Elevation. : " << moonResults[1] << endl; cout << "- Topocentric Azimuth rate. : " << moonResultsRate[0] << endl; cout << "- Topocentric Elevation rate : " << moonResultsRate[1] << endl; cout << "- Topocentric Az. rate rate : " << moonResultsRateRate[0] << endl; cout << "- Topocentric Elev. rate rate: " << moonResultsRateRate[1] << endl; cout << "- Tangent Altitude : " << moonResults[2] << endl; cout << "- Target to moon visibility. : " << moonResults[3] << endl; // Target::extraEfTarget choice = XPCFI_DER_2ND; targetType = XPCFI_USER_TARGET_TYPE; targetNumber = 0; freq = 1.e10; targetId.extraEfTarget( choice, targetType, targetNumber, freq, efTargetResultsRate, efTargetResultsRateRate ); cout << " INPUT" << endl; cout << "- Choice flag : " << choice << endl; cout << " OUTPUT" << endl; cout << "- EF target to satellite range rate : " << efTargetResultsRate[1] << endl; cout << "- EF target to satellite azimuth rate (TOP) : " << efTargetResultsRate[2] << endl; cout << "- EF target to satellite elevation rate (TOP) : " << efTargetResultsRate[3] << endl; cout << "- Satellite to EF target azimuth rate (TOP) : " << efTargetResultsRate[4] << endl; cout << "- Satellite to EF target elevation rate (TOP) : " << efTargetResultsRate[5] << endl; cout << "- Satellite to EF target azimuth rate (attitude): " << efTargetResultsRate[6] << endl; cout << "- Satellite to EF target elev. rate (attitude) : " << efTargetResultsRate[7] << endl; cout << "- 2 way doppler shift of signal : " << efTargetResultsRate[0] << endl; cout << "- EF target to satellite range rate rate : " << efTargetResultsRateRate[1] << endl; cout << "- EF target to satellite az. rate rate (TOP) : " << efTargetResultsRateRate[2] << endl; cout << "- EF target to satellite elev. rate rate (TOP) : " << efTargetResultsRateRate[3] << endl; cout << "- Satellite to EF target az. rate rate (TOP) : " << efTargetResultsRateRate[4] << endl; cout << "- Satellite to EF target elev. rate rate (TOP) : " << efTargetResultsRateRate[5] << endl; cout << "- Satellite to EF target az. rate rate (att) : " << efTargetResultsRateRate[6] << endl; cout << "- Satellite to EF target elev. rate rate (att) : " << efTargetResultsRateRate[7] << endl; }//end try
catch (CfiError cfiError) { //If an exception is thrown, there have been errors during execution vector<string> errorMessages; // Get error messages cfiError.getMsg(errorMessages); // Pring Error messages for (long i = 0; i < errorMessages.size(); i++) { cout << errorMessages[i] << endl; } } return 0; }