| Earth Observation Mission CFI Software Usage Guide for Object Oriented Software |

# 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:

- 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.

## 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:

- Satellite and instrument attitude frames initialisation. There are four different levels of attitude frames:

  - Orbital Frame
  - Satellite Nominal Attitude Frame (SNAF)
  - Satellite Attitude Frame (SAF)
  - Instrument Attitude Frame (IRF)

  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.

- Attitude initialisation: An object of the class Attitude has to be created with the previous attitude frame objects. There are two possibilities:
  1. Create the Attitude with the empty constructor and then call the method setTransformations
  2. Create the Attitude using the constructor with the attitude frames
- Attitude computation: Using a satellite state vector at a given time the final attitude rotation matrix is computed by calling the method compute. The way in which the attitude matrix is computed depends on how the attitude frames where defined. Figure 4 shows the way in which this final attitude matrix is computed: The vertical arrows represent the transformation between the attitude frames, so that the attitude matrix is the combination of the transformations between the target frame and the inertial frame.

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

#### Figure1: Satellite Nominal Attitude frame

#### Figure2: Satellite Attitude frame

#### Figure3: Instrument Attitude frame

#### Figure4: Attitude computation schema

#### Figure5: Attitude computation data flow

## 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:

- User target: it is the target requested by the user.
- LOS target (line of sight target): it is the computed raypath to reach the user target.
- DEM target: it is a target computed taking into account the DEM model. It is only used for geolocated targets targets.

A target can be constructed with the following steps:

- Construct the Target object with the Attitude and optionally with the DemId and the AtmosId.
- Call one of the target methods: targetXXX/targetListXXX with the required parameters.
- The previous methods do not return directly the computed target parameters. The results have to be retrieved for one of thet target types (user, LOS or DEM) with one of the following methods:
  - extraVector/extraListVector
  - extraMain/extraListMain
  - extraAux/extraListAux
  - extraTargetToSun/extraListTargetToSun
  - extraTargetToMoon/extraListTargetToMoon
  - extraEfTarget/extraListEfTarget
  - extraEspecularReflection/extraListEspecularReflection

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).

## Targets crossing the atmosphere

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

- Compute the Attitude
- Create an object of AtmosId class
- Initialise the AtmosId object with the method init
- Construct the Target using the AtmosId as defined in the previous section
- Compute the Target with one of the target methods defined above

## Targets with a Digital Elevation Model

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

- Create an DemId object
- Initialise the DemId with the method init
- Construct the Target using the DemId as defined in the previous section
- Compute the Target with one of the target methods defined above.
- Retrieve the results corresponding to the DEM target type

## 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 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_LUT_INIT;
          long   atmosModel  =  0;             //dummy
          String atmosFile   = new String("./xp_atmo_converter_coefs.out");

          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.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_NO_DER;
          losAz     =       50.0;
          losEl     =       85.0;
          geodAlt   =      100.0;
          losAzRate =        1.0;
          losElRate =        1.0;
          iray      = XPCFI_NO_REF;
          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;
          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;
          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) );
          }
        }

      }

    }