DEIMOS
Earth Observation Mission CFI Software
Usage Guide for Object Oriented Software
ESA

TARGET CALCULATION

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:

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.


Attitude Computation

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:

Finally, the data flow for the attitude computation is sumarised in Figure 5.

Figure1: Satellite Nominal Attitude frame

img_sat_nom_init.jpg

Figure2: Satellite Attitude frame

img_sat_init.jpg

Figure3: Instrument Attitude frame

img_instr_init.jpg

Figure4: Attitude computation schema

img_attitude_schema.jpg

Figure5: Attitude computation data flow

img_attitude_initialisation.jpg

Targets

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
Target::targetDRS It calculates the most relevant observation parameters of the link between the satellite and a Data Relay Satellite (DRS).
img_point16.jpg
img_point01.jpg
img_point02.jpg
img_point03.jpg
img_point04.jpg
img_point05.jpg
img_point06.jpg
img_point07.jpg
img_point08.jpg
img_point09.jpg
img_point10.jpg
img_point11.jpg
img_point12.jpg
img_point13.jpg
img_point14.jpg
img_point15.jpg


Targets crossing the atmosphere

The atmospheric refraction of a signal travelling from/to the satellite can be taken into account when computing a target:


Targets with a Digital Elevation Model

A target with a DEM can be computed in the following way:


Example

The following example shows how to get compute a target going through the following steps:

  1. Time Correlation initialization
  2. Atmosphere initialization
  3. Satellite Nominal Attitude initialization
  4. Satellite Attitude initialization
  5. Attitude calculations
  6. Target pointing: Intersection target
  7. Get target results for USER target
// ------------------------------------------------------------------------
//
//                           JAVA Example Program.
//                           TARGET COMPUTATION
//
// ------------------------------------------------------------------------

import EECFI.*;
import static EECFI.EnumPointing.*;
import static EECFI.EnumLib.*;

import java.util.Vector;
import java.lang.String;
import java.lang.Long;

// Main program
public class Example
{
  public static void main(String[] args)
  {
    // 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; 
    long   choice;
    TargetExtra extraResults;
    
    
    //-------------------------------------------------
    // 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 = new SatId(XPCFI_SAT_ENVISAT);
      
      ModelId          modelId = new ModelId(); //Do nothing: using default models.
      
      double[] initTime = new double[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 = new TimeCorrelation( initTime );

      // ------------------------------------------------------------------------ 
      // Atmosphere initialization                                                
      // ------------------------------------------------------------------------ 
      
      // input values 
      long   atmosMode   =  XPCFI_NO_REF_INIT;
      long   atmosModel  =  0;             //dummy
      String atmosFile   = new String(); // dummy in this case
      
      AtmosId atmosId = new 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 = new Vector<Double>();
      long modelEnum = XPCFI_MODEL_ENVISAT;
      
      modelParam.addElement( -0.1671 );
      modelParam.addElement(  0.0501 );
      modelParam.addElement(  3.9130 );
      
      // Initialiasation
      SatNomTransId satNomTransId = new SatNomTransId();
      
      satNomTransId.init( modelEnum, modelParam );

      // ------------------------------------------------------------------------ 
      // Satellite Attitude
      // ------------------------------------------------------------------------ 
      
      // input values
      double[] ang = new double[3];
      ang[0] =  0.1;
      ang[1] =  0.2;
      ang[2] = -0.3;
      
      // Initialiasation
      SatTransId satTransId = new SatTransId();
      satTransId.init( ang );
          
      // ------------------------------------------------------------------------
      // Instrument Attitude                                              
      // ------------------------------------------------------------------------
      
      InstrTransId instrTransId = new InstrTransId();
      // This frame is not to be initialised. The target frame for the attitude
      // will be the Satellite Attitude.

      // ------------------------------------------------------------------------
      // Attitude calculations                                              
      // ------------------------------------------------------------------------ 
      
      // Initialisation
      Attitude attId = new Attitude();
      
      attId.setTransformations( timeId, satNomTransId, satTransId, instrTransId );
      
      // Satellite Vector for input
      StateVector stVec = new StateVector();
      
      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 = new DemId(); // 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 = new Target( 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
      extraResults = targetId.extraVector( choice, 
                            targetType,
                            targetNumber);
      
      System.out.println( "  INPUT" );
      System.out.println( "- Time Reference   : " + stVec.time.ref );
      System.out.println( "- Time             : " + stVec.time.time );
      System.out.println( "- Sat Position     : [" + stVec.coord.pos[0] + "," + stVec.coord.pos[1] + "," + stVec.coord.pos[2] + "]" );
      System.out.println( "- Sat Velocity     : [" + stVec.coord.vel[0] + "," + stVec.coord.vel[1] + "," + stVec.coord.vel[2] + "]" );
      System.out.println( "- Sat Acceleration : [" + stVec.coord.acc[0] + "," + stVec.coord.acc[1] + "," + stVec.coord.acc[2] + "]" );
      System.out.println( "- Derivative Flag  : "  + deriv );
      System.out.println( "- Intersection Flag: " + interFlag );
      System.out.println( "- LOS Azimuth      : " + losAz );
      System.out.println( "- LOS Elevation    : " + losEl );
      System.out.println( "- Geodetic Altitude: " + geodAlt );
      System.out.println( "- LOS Azimuth Rate : " + losAzRate );
      System.out.println( "- LOS Elev. Rate   : " + losElRate );
      System.out.println( "- Ray Tracing Model: " + iray );
      System.out.println( "- Frequency        : " + freq );
    
      System.out.println( "  OUTPUT" );
      System.out.println( "- Target Position  : [" + extraResults.result[0] + "," + extraResults.result[1] + "," + extraResults.result[2] + "]" );
      System.out.println( "- Range            : " + extraResults.result[6] );
      System.out.println( "- Sat-Target LOS   : [" + extraResults.result[3] + "," + extraResults.result[4] + "," + extraResults.result[5] + "]" );
      
      
      // Target Extra Main results
    
      choice       = XPCFI_TARG_EXTRA_AUX_ALL;
      targetType   = XPCFI_USER_TARGET_TYPE;
      targetNumber = 0;
      
      extraResults = targetId.extraMain( choice,
                          targetType,
                          targetNumber );
    
      System.out.println( "  INPUT" );
      System.out.println( "- Choice Flag                : " + choice );
      System.out.println( "  OUTPUT" );
      System.out.println( "- Geocentric Long.           : " + extraResults.result[0] );
      System.out.println( "- Geocentric Lat.            : " + extraResults.result[1] );
      System.out.println( "- Geodetic Latitude          : " + extraResults.result[2] );
      System.out.println( "- Geodetic Altitude          : " + extraResults.result[3] );
      System.out.println( "- Sat. to target Top. Azimuth: " + extraResults.result[4] );
      System.out.println( "- Sat. to target Top. Elev.  : " + extraResults.result[5] );
      System.out.println( "- Target Azimuth             : " + extraResults.result[6] );
      System.out.println( "- Target Elevation           : " + extraResults.result[7] );
      System.out.println( "- Topoc. Azimuth             : " + extraResults.result[8] );
      System.out.println( "- Topoc. Elevation           : " + extraResults.result[9] );
      System.out.println( "- Geocentric Long. rate      : " + extraResults.resultRate[0] );
      System.out.println( "- Geocentric Lat. rate       : " + extraResults.resultRate[1] );
      System.out.println( "- Geodetic Latitude rate     : " + extraResults.resultRate[2] );
      System.out.println( "- Geodetic Altitude rate     : " + extraResults.resultRate[3] );
      System.out.println( "- Sat2tar Top. Azimuth rate  : " + extraResults.resultRate[4] );
      System.out.println( "- Sat2tar Top. Elev.rate     : " + extraResults.resultRate[5] );
      System.out.println( "- Target Azimuth rate        : " + extraResults.resultRate[6] );
      System.out.println( "- Target Elevation rate      : " + extraResults.resultRate[7] );
      System.out.println( "- Topoc. Azimuth rate        : " + extraResults.resultRate[8] );
      System.out.println( "- Topoc. Elevation rate      : " + extraResults.resultRate[9] );
      System.out.println( "- Geocentric Long. rate rate : " + extraResults.resultRateRate[0] );
      System.out.println( "- Geocentric Lat. rate rate  : " + extraResults.resultRateRate[1] );
      System.out.println( "- Geodetic Latitude rate rate: " + extraResults.resultRateRate[2] );
      System.out.println( "- Geodetic Altitude rate rate: " + extraResults.resultRateRate[3] );
      System.out.println( "- Sat2tar Top. Azimuth rate r: " + extraResults.resultRateRate[4] );
      System.out.println( "- Sat2tar Top. Elev.rate rate: " + extraResults.resultRateRate[5] );
      System.out.println( "- Target Azimuth rate rate   : " + extraResults.resultRateRate[6] );
      System.out.println( "- Target Elevation rate rate : " + extraResults.resultRateRate[7] );
      System.out.println( "- Topoc. Azimuth rate rate   : " + extraResults.resultRateRate[8] );
      System.out.println( "- Topoc. Elevation rate rate : " + extraResults.resultRateRate[9] );
      
      
      // Target Auxiliary results
      choice       = XPCFI_TARG_EXTRA_AUX_ALL; 
      targetType   = XPCFI_USER_TARGET_TYPE;
      targetNumber = 0;
      
      extraResults = targetId.extraAux( choice,
                         targetType,
                         targetNumber );
    
      System.out.println( "  INPUT" );
      System.out.println( "- Choice Flag          : " + choice );
    
      System.out.println( "  OUTPUT" );
      System.out.println( "- Curvature Radius at target's nadir                                     = " +  extraResults.result[0] );
      System.out.println( "- Distance: target's nadir to satellites's nadir                         = " +  extraResults.result[1] );
      System.out.println( "- Distance target's nadir to ground track                                = " +  extraResults.result[2] );
      System.out.println( "- Distance SSP to point in the ground track nearest to the target's nadir= " +  extraResults.result[3] );
      System.out.println( "- MLST at target                                                         = " +  extraResults.result[4] );
      System.out.println( "- TLST at target                                                         = " +  extraResults.result[5] );
      System.out.println( "- RA throught the atmosphere                                             = " +  extraResults.result[6] );
      System.out.println( "- Dec. throught the atmosphere                                           = " +  extraResults.result[7] );
      System.out.println( "- Curvature Radius rate at target's nadir                                = " +  extraResults.resultRate[0] );
      System.out.println( "- Distance rate: target's nadir to satellites's nadir                    = " +  extraResults.resultRate[1] );
      System.out.println( "- Distance rate target's nadir to ground track                           = " +  extraResults.resultRate[2] );
      System.out.println( "- Distance rate SSP to point in the ground track nearest to the target's nadir= " +  extraResults.resultRate[3] );
      System.out.println( "- Target's nadir velocity (relative to the Earth). North                 = " +  extraResults.resultRate[8] );
      System.out.println( "- Target's nadir velocity (relative to the Earth). East                  = " +  extraResults.resultRate[9] );
      System.out.println( "- Target's nadir velocity (relative to the Earth). Azimuth               = " +  extraResults.resultRate[10] );
      System.out.println( "- Target's nadir velocity (relative to the Earth). Magnitude             = " +  extraResults.resultRate[11] );
      System.out.println( "- Curvature Radius rate rate at target's nadir                           = " +  extraResults.resultRateRate[0] );
      System.out.println( "- Distance rate rate: target's nadir to satellites's nadir               = " +  extraResults.resultRateRate[1] );
      System.out.println( "- Distance rate rate target's nadir to ground track                      = " +  extraResults.resultRateRate[2] );
      System.out.println( "- Distance rate rate SSP to point in the ground track nearest to the target's nadir= " +  extraResults.resultRateRate[3] );
      
      // Target: extraTargetToSun                               
      
      choice        = XPCFI_DER_2ND;
      targetType    = XPCFI_USER_TARGET_TYPE;
      targetNumber  = 0;
      iray          = XPCFI_NO_REF_INIT;
      freq          =        1.e10;
      
      extraResults = targetId.extraTargetToSun( choice, 
                                 targetType,
                                 targetNumber,
                                 iray,
                                 freq );
      
      System.out.println( "  INPUT" );
      System.out.println( "- Choice Flag          : " + choice );
      System.out.println( "- Ray Tracing Model    : " + iray );
      System.out.println( "- Frequency            : " + freq );
    
      System.out.println( "  OUTPUT" );
      System.out.println( "- Topocentric Azimuth.       : " + extraResults.result[0] );
      System.out.println( "- Topocentric Elevation.     : " + extraResults.result[1] );
      System.out.println( "- Topocentric Azimuth rate.  : " + extraResults.resultRate[0] );
      System.out.println( "- Topocentric Elevation rate : " + extraResults.resultRate[1] );
      System.out.println( "- Topocentric Az. rate rate  : " + extraResults.resultRateRate[0] );
      System.out.println( "- Topocentric Elev. rate rate: " + extraResults.resultRateRate[1] );
      System.out.println( "- Tangent Altitude           : " + extraResults.result[2] );
      System.out.println( "- Target to sun visibility.  : " + extraResults.result[3] );
      
    
      // Target: extraTargetToMoon                               
      
      choice       = XPCFI_DER_2ND;
      targetType   = XPCFI_USER_TARGET_TYPE;
      targetNumber = 0;
      iray         = XPCFI_NO_REF_INIT;
      freq         =        1.e10;
      
      extraResults = targetId.extraTargetToMoon( choice,
                                  targetType,
                                  targetNumber,
                                  iray,
                                  freq);
      
      System.out.println( "  INPUT" );
      System.out.println( "- Choice Flag          : " + choice );
      System.out.println( "- Ray Tracing Model    : " + iray );
      System.out.println( "- Frequency            : " + freq );
    
      System.out.println( "  OUTPUT" );
      System.out.println( "- Topocentric Azimuth.       : " + extraResults.result[0] );
      System.out.println( "- Topocentric Elevation.     : " + extraResults.result[1] );
      System.out.println( "- Topocentric Azimuth rate.  : " + extraResults.resultRate[0] );
      System.out.println( "- Topocentric Elevation rate : " + extraResults.resultRate[1] );
      System.out.println( "- Topocentric Az. rate rate  : " + extraResults.resultRateRate[0] );
      System.out.println( "- Topocentric Elev. rate rate: " + extraResults.resultRateRate[1] );
      System.out.println( "- Tangent Altitude           : " + extraResults.result[2] );
      System.out.println( "- Target to moon visibility. : " + extraResults.result[3] );
      
      // Target::extraEfTarget                                          
      
      choice       = XPCFI_DER_2ND;
      targetType   = XPCFI_USER_TARGET_TYPE;
      targetNumber = 0;
      freq         = 1.e10;
      
      extraResults = targetId.extraEfTarget( choice,
                              targetType,
                              targetNumber,
                              freq);
      
      System.out.println( "  INPUT" );
      System.out.println( "- Choice flag              : " + choice );
      System.out.println( "  OUTPUT" );
    
      System.out.println( "- EF target to satellite range rate             : " +  extraResults.resultRate[1] );
      System.out.println( "- EF target to satellite azimuth rate (TOP)     : " +  extraResults.resultRate[2] );
      System.out.println( "- EF target to satellite elevation rate (TOP)   : " +  extraResults.resultRate[3] );
      System.out.println( "- Satellite to EF target azimuth rate (TOP)     : " +  extraResults.resultRate[4] );
      System.out.println( "- Satellite to EF target elevation rate (TOP)   : " +  extraResults.resultRate[5] );
      System.out.println( "- Satellite to EF target azimuth rate (attitude): " +  extraResults.resultRate[6] );
      System.out.println( "- Satellite to EF target elev. rate (attitude)  : " +  extraResults.resultRate[7] );
      System.out.println( "- 2 way doppler shift of signal                 : " +  extraResults.resultRate[0] );
      System.out.println( "- EF target to satellite range rate rate        : " +  extraResults.resultRateRate[1] );
      System.out.println( "- EF target to satellite az. rate rate (TOP)    : " +  extraResults.resultRateRate[2] );
      System.out.println( "- EF target to satellite elev. rate rate (TOP)  : " +  extraResults.resultRateRate[3] );
      System.out.println( "- Satellite to EF target az. rate rate (TOP)    : " +  extraResults.resultRateRate[4] );
      System.out.println( "- Satellite to EF target elev. rate rate (TOP)  : " +  extraResults.resultRateRate[5] );
      System.out.println( "- Satellite to EF target az. rate rate (att)    : " +  extraResults.resultRateRate[6] );
      System.out.println( "- Satellite to EF target elev. rate rate (att)  : " +  extraResults.resultRateRate[7] );
    
      // Release resources
      targetId.close();
      
    }//end try
    catch (CfiError cfiError)
    {
      //If an exception is thrown, there have been errors during execution
      Vector<String> errorMessages = new Vector<String>();
      
      // Get error messages
      errorMessages = cfiError.getMsg(errorMessages);
      
      // Pring Error messages
      for (int i = 0; i < errorMessages.size(); i++)
      {
        System.out.println( errorMessages.elementAt(i) );
      }
    }

  }

}


Generated on Mon Dec 11 2023 14:48:38 for by  doxygen 1.7.1