Skip to end of banner
Go to start of banner

# ODforWMAP

This tutorial is for review and inspection purposes only. Most of the features described below do not exist yet and are intended to illustrate our proposed interface design.

Download the script file: Script

# Objective and Overview

In this tutorial, you will learn how to configure GMAT to perform orbit determination for the Wilkinson Microwave Anisotropy Prope (WMAP). WMAP is in orbit about the Earth-Sun L2 libration point. Orbit determination for WMAP is performed operationally using GTDS by processing two-way range and Doppler data from two DSN stations.

Below we show how to configure objects such as spacecraft and sensors to model WMAP and the DSN stations. We configure a batch estimator to process the data and generate a state estimate, covariance, and measurement error properties.
When you are done configuring the resources for this tutorial you will have created the following objects:

• 1 Spacecraft
• 1 Propagator
• 2 Sensors: A transponder for WMAP and the DSN stations
• 2 DSN Ground Stations
• 1 Tracking System
• 1 Batch Estimator:

# A-priori Information and Assumptions

Below we provide spacecraft properties and a-priori estimates for the spacecraft state and other quantities. Assume from previous analysis that we have the following a-priori state estimate in the Earth-centered MJ2000 equator system:

Epoch: 18 Nov 2009 00:00:00.000 UTC
X = 767579.4188228522 km
Y = 1118848.079418501 km
Z = 593541.9087407679 km
VX = -0.2451132495834106 km
VY = 0.1083307708826794 km
VZ = 0.1427860128980402 km

Assume the total spacecraft mass, solar radiation coefficient, and area are given by 821.188 kg, 1.448, and 20.438 m squared respectively. Assume the standard deviation in Cd and Cr are .02.

Assume the diagonal a-priori orbit state covariance, in EarthMJ200Eq, is given by the table below using distance units of km and time units of s.

 2 1 1 1 1 1 1 2 1 1 1 1 1 1 2 1 1 1 1 1 1 0.1 1 1 1 1 1 1 0.1 1 1 1 1 1 1 0.1

Assume the locations of DSN14 and DSN43 in the Earth-fixed system are respectively.

X = -2353.62142 km
Y = -4641.34147 km
Z = 3677.05232 km

X = -4460.89492 km
Y = 2682.36151 km
Z = -3674.74815 km

Assume both ground stations have a constant frequency of 2090.659968 MHz.

## Step 1: Configuring the Spacecraft Orbit State, Covariance, and Physical Properties

In this section, you will learn how to set the spacecraft orbit state vector, the a-priori orbit covariance, and selected spacecraft physical properties. Values for those properties are provided in the list of assumptions above.

Begin by opening GMAT. The default mission loads automatically.

1. Right-click on the spacecraft named DefaultSC in the Spacecraft folder on the Resource tree and select “Rename”.
2. Type “WMAP” in the text box that appears and hit ok.
3. Open the dialog box for WMAP and you’ll see the orbit panel for the spacecraft. This is where you define the initial epoch and state for the WMAP spacecraft.
4. Switch the Epoch Format field to UTCGregorian and change the value in the epoch field to 18 Nov 2009 00:00:00.000.
5. Enter the values for the Cartesian state found in the assumptions section in the appropriate locations in the Elements group box.

When you are finished click the Apply button at the bottom of the dialog box. The orbit tab for the WMAP spacecraft should look like this:

Figure: WMAP Orbit Tab

Next, we will set the orbit state covariance.

1. Left-click on the Error tab on the dialog box for spacecraft WMAP.
2. Enter the a-priori covariance provided in the assumptions list in the appropriate locations in the Orbit Covariance group box. You can only enter the lower diagonal elements because the Covariance matrix is symmetric.
3. Enter the standard deviations for Cr and Cd.

When you are finished, the Orbit Covariance should appear as below.

Figure: WMAP Errors Tab

Finally, we will set the mass properties of the WMAP spacecraft.

1. Left-click on the Ballistic/Mass tab.
2. Enter the DryMass, Coefficient of Reflectivity, and SRP area as defined in the assumptions section above.

When you are finished, the Ballistic/Mass tab should appear as below.

Figure: WMAP Physical Properties Tab

Hit Apply on the WMAP dialog box to save your changes. If you left-click on the Show Script button, you can see the script snippet for the WMAP spacecraft. Below we show the fields relevant to this tutorial:

```Create Spacecraft WMAP;
GMAT WMAP.DateFormat = UTCGregorian;
GMAT WMAP.Epoch = '18 Nov 2009 00:00:00.000';
GMAT WMAP.CoordinateSystem = EarthMJ2000Eq;
GMAT WMAP.DisplayStateType = Cartesian;
GMAT WMAP.X = 767579.4188228522;
GMAT WMAP.Y = 1118848.079418501;
GMAT WMAP.Z = 593541.9087407679;
GMAT WMAP.VX = -0.2451132495834106;
GMAT WMAP.VY = 0.1083307708826794;
GMAT WMAP.VZ = 0.1427860128980402;
GMAT WMAP.DryMass = 821.1888;
GMAT WMAP.Cd = 2.2;
GMAT WMAP.Cr = 1.448009157951282;
GMAT WMAP.DragArea = 15;
GMAT WMAP.SRPArea = 20.438
GMAT WMAP.DryMass = 821.1888;
GMAT WMAP.Cd = 2.2;
GMAT WMAP.OrbitCovarianceAxisSystem = MJ2000Eq;
GMAT WMAP.OrbitCovarianceRepresentation = Variance-Covariance;
GMAT WMAP.DragSolveForType = DragCoefficient;
GMAT WMAP.CdVariance       = .02;
GMAT WMAP.CrVariance       = .02;
GMAT WMAP.OrbitCovXX       = 2;
GMAT WMAP.OrbitCovYY       = 2;
GMAT WMAP.OrbitCovZZ       = 2;
GMAT WMAP.OrbitCovVXVX     = .1;
GMAT WMAP.OrbitCovVYVY     = .1;
GMAT WMAP.OrbitCovVZVZ     = .1;
GMAT WMAP.OrbitCovXY       = 1;
GMAT WMAP.OrbitCovXZ       = 1;
GMAT WMAP.OrbitCovYZ       = 1;
GMAT WMAP.OrbitCovVXVY     = 1;
GMAT WMAP.OrbitCovVXVZ     = 1;
GMAT WMAP.OrbitCovVYVZ     = 1;
GMAT WMAP.OrbitCovXVY     = 1;
GMAT WMAP.OrbitCovXVZ     = 1;
GMAT WMAP.OrbitCovYVZ     = 1;
```

## Step 2: Configuring the Orbit Propagator

Follow the instructions here to create a propagator with properties shown below.

Figure: Configuring Propagator Named SunEarthL2Prop
```Create ForceModel SunEarthL2ForceModel;
Create Propagator SunEarthL2Prop;
GMAT SunEarthL2ForceModel.CentralBody = Earth;
GMAT SunEarthL2ForceModel.PrimaryBodies = {Earth};
GMAT SunEarthL2ForceModel.PointMasses = {Sun, Luna, Jupiter};
GMAT SunEarthL2ForceModel.Drag = None;
GMAT SunEarthL2ForceModel.SRP = On;
GMAT SunEarthL2ForceModel.ErrorControl = RSSStep;
GMAT SunEarthL2ForceModel.GravityField.Earth.Degree = 50;
GMAT SunEarthL2ForceModel.GravityField.Earth.Order = 50;
GMAT SunEarthL2ForceModel.GravityField.Earth.PotentialFile = 'JGM2.cof';
GMAT SunEarthL2ForceModel.SRP.Flux = 1370.052;
GMAT SunEarthL2ForceModel.SRP.Nominal_Sun = 149597870.691;
GMAT SunEarthL2Prop.FM              = SunEarthL2ForceModel;
GMAT SunEarthL2Prop.Type            = PrinceDormand78;
GMAT SunEarthL2Prop.InitialStepSize = 60;
GMAT SunEarthL2Prop.Accuracy        = 1e-10;
GMAT SunEarthL2Prop.MinStep         = 0.001;
GMAT SunEarthL2Prop.MaxStep         = 86400;
GMAT SunEarthL2Prop.MaxStepAttempts = 50;```

## Step 3: Configuring the Sensors and Ground Stations

Two-way range and Doppler data from two DSN stations is processed to generate state estimates for WMAP. In this section, we will configure a transponder for the WMAP spacecraft and a Transponder for each DSN station. We'll also configure the DSN ground stations. For WMAP OD we will not create an antenna model for the spacecraft or ground station models. The result is that we neglect the offset between the spacecraft center of mass and the antenna phase center.

First, we create a transponder model for the WMAP spacecraft.

1. Under the resource tree, find the hardware folder, right-click on it, and add a transponder.
2. Left click on the new transponder model, select rename, and rename it WMAPXPND.
3. Open the dialog box for WMAPXPND and set the delay to 0.00000167 seconds and set the error model to ConstantBias.
4. Set the Frequency model to constant and set the frequency to 2090.659968 MHz.
5. Finally, leave the primary antenna set to none. (GMAT will assume the spacecraft center of mass is the antenna phase center.)

When you are done, the dialog box for WMAPXPND should appear as below.

Figure: Transponder Configuration for WMAP

as

```Create Transponder WMAPXPND
WMAPXPND.Id = 'WMAPXPND';
WMAPXPND.Delay      = .00000167;
WMAPXPND.DelayModel = 'ConstantBias';
WMAPXPND.DelayBias  = .0000001;
WMAPXPND.FrequencyModel = 'ConstantFrequency';
WMAPXPND.Frequency  = 2090.659968;
```

Now we'll attach the transponder to the WMAP spacecraft.

1. Double left click on the WMAP spacecraft and then select the Sensors tab.
2. Left click on WMAPXPND in the available sensors list and then click on the right arrow to add it to the spacecraft.

When complete, the sensors panel for WMAP should look like this:

Figure: Adding a Transponder to the WMAP Spacecraft

Now we will create a transponder object that can be "attached" to both DSN Ground stations.

1. Under the resource tree, find the hardware folder, right-click on it, and add a transponder.
2. Left click on the new transponder model, select rename, and rename it DSNXPND.
3. Open the dialog box for DSNXPND and set the delay to 0.00000167 seconds and set the error model to None.
4. Set the Frequency model to constant and set the frequency to 2090.659968 MHz. Finally, leave the primary antenna set to none.

When you are done, the dialog box for DSNXPND should appear as below.

Figure: DSN13 Transponder Configuration

Perform the following steps to create and configure the first DSN ground station.

1. Locate the GroundSations folder on the Resource Tree, select the folder, and add a new station.
2. Right-click on the new object and rename it DSN14.
3. Define the sensor Id as DSN14.
4. Set the location of the ground station according to the values in the assumptions section above.
5. Click on the "Add" button next to the Sensors text box. You will see the Sensor Select dialog box. Select the DNSXPND sensor and add it to the list of selected sensors by clicking on the right arrow.
6. Repeat these steps for DSN43, using the appropriate location data provided in the assumptions section above.

Follow the same procedures to create a second ground station named DSN43 using the location values in the assumptions.
Below is a screen capture of the Sensor Select dialog box and the panel for DSN14 and DSN13.

Figure: Selecting a Sensor for DSN Ground Station

Figure: DSN13 Ground Station Configuration

Figure: DSN43 Ground Station Configuration

## Step 4: Configuring the Tracking System

In GMAT, a Tracking System is an object that models a measurement system or network, and specifically, the interactions of participants and the space environment that affect the observed value or are required to compute an expected measurement value. In this section we'll create a tracking system that models the tracking process for the Deep Space Network and WMAP. This involves specifying which DSN stations are involved and the types of measurements generated by each station, the media corrections for each leg of the measurement processes, defining error models and editing criteria on a measurement-by-measurement basis, and providing the tracking data files.

To create a new TrackingSystem object:

1. Locate the Tracking Systems folder on the resource tree
2. Left-click, on the Tracking Systems folder and select Add -> DSNTrackingSystem.
3. Right-click on the new object, select rename, and call it DSN_WMAP

The first step in configuring the DSN_WMAP Tracking System model is to identify the tracking data files to associate with the DSN_WMAP object. To associate tracking data files with DSN_WMAP:

1. Click on the Data Files tab.
2. Click on the Add button
3. Use the file browser to locate the file named WMAPDSN14-2009-134.trk-2-34, select and add the file.
4. Follow the above steps to add the remaining data file objects: WMAPDSN14-2009-135.trk-2-34, WMAPDSN43-2009-134.trk-2-34, and

WMAPDSN43-2009-135.trk-2-34.

When you are finished, the Data Files tab should appear as below (except the path will appear different based on where you placed the tracking data files).

Figure: Adding Data Files to the DSN_WMAP Tracking System Object

Next, we'll configure the error model and editing criteria for each unique data type contained on the files. First, go to the Measurements tab on the DSN_WMAP object. Click on "Populate From Files" button in the lower right corner to populate the GUI with data on each unique data type contained on the files. The measurement tab should now appear like this:

Let's rename each data type to something more meaningful. Double click in the first row of the Name column, and change Meas1 to DSN14Range. Similarly change Meas2, Meas3, and Meas4 to DSN43Range, DSN14Doppler, and DSN43Doppler respectively. After completing the above steps, the Measurements tab should appear as below.

Figure: The DSN_WMAP Measurements Tab After Configuring All Measurements

Now we will configure the error model and editing criteria for the DSN14Range measurement:

1. Left-click on the "Configure" button in the DSN14Range measurement row.
2. Locate the Error Model menu and select ConstantBias
3. Set the bias to be 0.0134 km. ( This configures the a-priori estimate for the bias)
4. Set the noise sigma to be 0.003.
5. Set the Sigma Editing Threshold to 3.
6. Set the ThinningSkipInterval to 0. ( We wish to process all data records)

When you are complete, the Measurement Data Settings dialog box should appear as below.

Figure: Configuring the DSN14 Two Way Range Model, Part II

You have now specified the model for two-way range between DSN14 and WMAP (with the exception of the Media Corrections which we will address below.) Follow steps similar to those above to configure the following additional measurements

• Two-way Range between DSN43 and WMAP. ErrorModel = ConstantBias, Bias = 0.0256 km, NoiseSigma = 0.0015 km, SigmaEditingThreshold = 3, ThinningSkipInterval = 0
• Two-way Doppler between DSN14 and WMAP. ErrorModel = ConstantBias, Bias = 25.2 Mhz, NoiseSigma = 2.13 Mhz, SigmaEditingThreshold = 2, ThinningSkipInterval = 0
• Two-way Doppler between DSN43 and WMAP. ErrorModel = ConstantBias, Bias = 12.5 Mhz, NoiseSigma = 1.05 Mhz, SigmaEditingThreshold = 2, ThinningSkipInterval = 0

Now we will configure the media corrections for all measurements performed using this tracking system model.

1. Click on the Media Corrections tab on the dialog box for the DSN_WMAP Tracking System object.
2. Locate the Media Corrections model menu and select Hopfield-IRI. This configures the uplink and downlink legs to use the Hopfield Troposphere model and the International Reference Ionosphere model. Other Media Corrections options such as Custom allow you to select different models for uplink and downlink legs.

When you are finished, the Media Corrections tab should appear as below.

Figure: Configuring the the Media Corrections
```Create DSNTrackingSystem DSN_WMAP
DSN_WMAP.MediaModel = Hopfield_IRI;
DSN_WMAP.DataFiles = {'.\MyData\WMAPDSN14-2009-134.trk-2-34'...
'.\MyData\WMAPDSN14-2009-135.trk-2-34'...
'.\MyData\WMAPDSN43-2009-134.trk-2-34'...
'.\MyData\WMAPDSN43-2009-135.trk-2-34'};
DSN_WMAP.AddDataType = 'DSN14Range';
DSN_WMAP.DSN14Range.Type                    = 'TwoWayRange';
DSN_WMAP.DSN14Range.Participants            = {DSN14,WMAP};
DSN_WMAP.DSN14Range.ErrorModel              = ConstantBias
DSN_WMAP.DSN14Range.Bias                    = 0.0134
DSN_WMAP.DSN14Range.NoiseSigma              = .003;
DSN_WMAP.DSN14Range.SigmaEdititingThreshold = 3;

DSN_WMAP.AddDataType = 'DSN43Range';
DSN_WMAP.DSN43Range.Type                    = 'TwoWayRange';
DSN_WMAP.DSN43Range.Participants            = {DSN43,WMAP};
DSN_WMAP.DSN43Range.ErrorModel              = ConstantBias
DSN_WMAP.DSN43Range.Bias                    = 0.0256
DSN_WMAP.DSN43Range.NoiseSigma              = .0015;
DSN_WMAP.DSN43Range.SigmaEdititingThreshold = 3;

DSN_WMAP.AddDataType = 'DSN43Doppler';
DSN_WMAP.DSN43Doppler.Type                    = 'TwoWayDoppler';
DSN_WMAP.DSN43Doppler.Participants            = {DSN43,WMAP};
DSN_WMAP.DSN43Doppler.ErrorModel              = ConstantBias
DSN_WMAP.DSN43Doppler.Bias                    = 25.2
DSN_WMAP.DSN43Doppler.NoiseSigma              = 2.13;
DSN_WMAP.DSN43Doppler.SigmaEdititingThreshold = 2;

DSN_WMAP.AddDataType = 'DSN14Doppler';
DSN_WMAP.DSN14Doppler.Type                    = 'TwoWayDoppler';
DSN_WMAP.DSN14Doppler.Participants            = {DSN14,WMAP};
DSN_WMAP.DSN14Doppler.ErrorModel              = ConstantBias
DSN_WMAP.DSN14Doppler.Bias                    = 12.5
DSN_WMAP.DSN14Doppler.NoiseSigma              = 1.05;
DSN_WMAP.DSN14Doppler.SigmaEdititingThreshold = 2;```

## Step 5: Configuring the Batch Estimator

Below we present the steps for configuring a Batch Estimator to process the data configured above. This includes setting convergence properties of the solver, the epoch for the solve-for parameters, selecting the solve-for parameters, and configuring the output such as residuals plots.

1. Locate the solvers folder on the resource tree. Expand the folder and right-click on the Estimator folder and select Add BatchEstimator.
2. Following procedures described above for other objects, rename the solver BLSQ.
3. Locate the Propagator drop down menu and select SunEarthL2Prop.
4. Locate the the Estimation Epoch drop combo box and select FirstObservation.
5. Click on the Add button next to Tracking Data text box and select DSN_WMAP tracking system.
6. Set the max. iterations to 20
7. Set the absolute tolerance to 1e-5
8. Set the relative tolerance to 1e-4
9. In the Output group box, check the ShowProgress button.
10. Check the Show All Residuals Plots check box.

To add solve-for parameters, click the Add button in the Solve-For Parameters group box.

1. Select WMAP in the Objects list, then select CartesianState in the Solve-For Parameters list. Click the right arrow button to add WMAP's Cartesian state to the Selected Parameters list.
2. Select DSN_WMAP in the Objects list, then select DSN14Range.Bias in the Solve-For Parameters list. Click the right arrow button to add the range bias between DSN14 and WMAP to the Selected Parameters list.
3. Follow the procedures above to add the range bias for DSN43 and the doppler biases for DSN14 and DSN43.
Figure: Selecting Solve-for Parameters

When you have completed the above instructions, the GUI and script for BLSQ should look like this:

Figure: Configuration of the Batch Estimator
```Create BatchEstimatorInv BLSq;
GMAT BLSq.AddTrackingSystems    = {DSN};
GMAT BLSq.AddSolveFor           = {WMAP.CartesianState, WMAP.Cd, ...
DSN_WMAP.DSN14Range.Bias, DSN_WMAP.DSN14Doppler.Bias...
DSN_WMAP.DSN43Range.Bias, DSN_WMAP.DSN43Doppler.Bias};
GMAT BLSq.ShowProgress          = true;
GMAT BLSq.ReportStyle           = 'Normal';
GMAT BLSq.Reportfile            = 'BatchEstimatorInvBLSq.data';
GMAT BLSq.MaximumIterations     = 25;
GMAT BLSq.AbsoluteTol           = 0.0001;
GMAT BLSq.RelativeTol           = 0.0001;
GMAT BLSq.ShowAllResiduals      = On;
GMAT BLSq.EstimationEpochFormat = 'FirstMeasurement';```

## Step 6: Running the Estimator

Under the Mission Tree,

1. Right click on the default propagator command Propagate1 and delete it.
2. Right click on the Mission Sequence folder, select Append, and add a RunEstimator Command.
3. Right click on RunEstimator2 command in the mission tree and select open.
4. In the Solver name drop-down menu, BLSQ is automatically chosen because it is the only estimator created in this session.
5. Change Solver Mode to SaveAndContinue. Once the run is performed, hitting the save button will result in the solution being saved as the new initial guess.

When you have finished with this portion of the tutorial, the GUI and script snippet for RunEstimator1 should appear as below.

```RunEstimator BLSQ {SolveMode = SaveAndContinue}
```
1. Click the save icon on the toolbar.
2. Click the run icon on the toolbar.

## Appendix: Configuring Measurements for Simulation

1. Double-left-click on the DSN_WMAP object.
2. On the measurement tab, left click in the first row of the Names column. Here you create a name for the measurement. Type DSN14Range for the name of this measurement.
3. Select "Two Way Range" from the drop down menu under Type.
4. Right click in the first row in the Participants column. This opens the Participant Select dialog box shown below.
5. Left-click on DSN14 in the Available Participants list. (DSNXPN will display in the Available Sensors list when you do this)
6. Left-click on the DSNXPND sensor in the Available Sensors list.
7. Click the right arrow button between the Available Sensors list and the Selected Participants/Sensors.
8. Follow the same preceding 4 steps to also add the WMAP spacecraft with the WMAPXNP sensor.
Figure: Selecting Participants for DSN14Range Measurment

Click ok on the Particpant Select dialog box, and the DSN_WMAP dialog box should now appear as shown below:

Figure: Configuring the DSN14 Two Way Range Model, Part I
• No labels