Get

Top  Previous  Next

Description


The Get command loads data from an external file into a FreeFlyer Object. The external file must be in a supported format.

 

 

Syntax


FreeFlyer Object File

 

Get myVariable from "myVariable.FFObjectFile";

 

Spacecraft State Files

 

Get mySpacecraft as element 3 from "TVHF.report";
 
Get mySpacecraft as ASCII from "SCState.txt" using "SCConfig.txt";
 

// NoradSP and NORADSGP4 require additional DLL's

// See Choosing an Integrator for more information
Get mySpacecraft as NORADSGP4 from "Orbiter1.tle";
Get mySpacecraft as NORADSGP4 2 from "Orbiter1.tle" using "Norad_config.txt";
Get mySpacecraft as NORADSGP4 2 from "Orbiter1.tle" using "Norad_config.txt" named "SCName";
 
Get mySpacecraft as NORADSP from "Orbiter2.tle";
Get mySpacecraft as NORADSP Next from "Orbiter2.tle";
Get mySpacecraft as NORADSP 1, 1 from "Orbiter2.tle";

 

Where:

3 is the element number in "TVHF.report"

"TVHF.report" is the name of the TCOPS Vector Hold File (TVHF)

"SCState.txt" is an external ASCII file containing Spacecraft information

"SCConfig.txt" is the name of the configuration file used to define the contents of the "SCState.txt" file

"Orbiter1.tle" is an external NORADSGP4-formatted file containing Spacecraft information

"Norad_config.txt" is the name of the configuration file used to define the contents of the "Rel14.inp" file

"Orbiter2.tle" is an external NORADSP-formatted file containing Spacecraft information

 

For NORADSGP4:

oIf a config file is provided with the using clause, the Norad spacecraft name will be looked up in the config file and the first occurrence of that spacecraft in the input file will be returned.

oIf a name is provided using the named clause, the first occurrence of that spacecraft in the input file will always be returned.

oIf an index n is provided, then the nth element set in the input file will be returned. Indexes are numbered starting at 1.

If a name is provided using a named clause, and an index n is also provided, then the nth occurrence of that spacecraft in the input file will be returned.

If a config file is provided with a using clause, and an index n is also provided, then the Norad spacecraft name will be looked up in the config file and the nth occurrence of that spacecraft in the input file will be returned.

oIf the keyword Next is used, then on the first execution of the Get command, the first element set in the input file will be returned. On the next execution of the Get command, the second element set in the input file will be returned, and so on.

If a name is provided using a named clause, and the keyword Next is used, then on the first execution of the Get command, the first occurrence of that spacecraft in the input file will be returned. On the next execution of the command, the next occurrence of that spacecraft in the input file will be returned, and so on.

If a config file is provided with a using clause, and the keyword Next is used, then for the first execution of the Get command, the first element set for the specified spacecraft will be returned. On the next execution of the Get command, the next occurrence of the specified spacecraft in the input file will be returned, and so on.

oIf none of these keywords are used, the first element set in the file will always be returned.

 

For NORADSP:

oIf a pair of indices – (job j, spacecraft n) – are provided, then the jth job specification in the file will be read, and the nth spacecraft in that specification will be used. Indexes are numbered starting at 1.

oIf the keyword Next is used, then on the first execution of the Get command, the first spacecraft in the first job specification in the file will be used. For subsequent executions of the Get command, the following spacecraft in the first job specification will be used, and then the spacecraft in the second job specification, and so forth.

oIf none of these keywords are used, then the first spacecraft in the first job specification in the input file will always be returned.

 

Ephemeris Formats

 

Note: In FreeFlyer 6.0 or higher, use the Ephemeris.LoadEphemeris() method.

 

Get myEphemeris from FFephem "SCephem.FFephem";

Get myEphemeris from CCSDSOEM "SCephem.txt";
Get myEphemeris from STKephem "SCephem.e";
Get myEphemeris from STKAHF "SCephem.a";

 

// Requires NASA Pack

Get myEphemeris from ephem "SCephem.ephem";
Get myEphemeris from PCephem "SCephem.PCephem";

 

Where:

"SCephem.FFephem" is a FreeFlyer-formatted external ephemeris

"SCephem.txt" is a CCSDS OEM-formatted external ephemeris

"SCephem.e" is a STK-formatted external ephemeris

"SCephem.a" is a STK-formatted attitude history file

"SCephem.ephem" is a Binary external ephemeris (Requires NASA Pack)

"SCephem.PCephem" is a PCephem-formatted external ephemeris (Requires NASA Pack)

 

Groundstation Geodetics File

 

Get myGroundStation as station KS2P from "fdfstatn.dat";

 

Where:

KS2P is the station Identifier for Kennedy Space Center

"fdfstatn.dat" is the name of the FDF Station file

 

Star Field Files

 

Get myStarField as ffstarcatalog from "FFstars.dat";
Get myStarField as skymap from "SMstars.dat";
Get myStarField as openuniverse from "OUstars.dat";

 

Where "<XX>stars.dat" is an external file containing Star Catalog information

 

 

Details


Any FreeFlyer object can be retrieved from an XML-formatted external file using the syntax: Get <myObjectName> from "myObjectName.FFObjectFile";

The Object.GetFromFile() or Object.GetFromString() methods can be used in place of the Get command.

The Put command is used to store object data to external files, which can be retrieved with the Get command.

The Put and Get commands provide similar functionality to the Save and Restore commands, while saving object data to external files instead of internal memory.

When retrieving data for a Spacecraft object, the Get command will only import the spacecraft's properties, not its attached objects (such as tanks and sensors).

The Get command can not be used with Lists or Formations.

 

Copying objects:

The Assignment command can be used to set all the properties of one object equal to those of another object.

oThe Assignment command only supports certain object types: Variables, Arrays, Strings, StringArrays, Spacecraft, and GroundStations.

oThe Assignment command does not equalize the properties of any attached objects or subsystems (such as Propagators, ForceModels, Tanks, Thrusters, Sensors, and Antennas).

One way to copy objects or subsystems that are not supported by the Assignment command is to use the Put and Get commands to put the first object out to a file and then load all the properties back in to a second object.

oThe example below shows how to equalize all the properties of two Spacecraft's Propagators and ForceModels:

 

// Use the Assigment command to copy Spacecraft1's properties into Spacecraft2

Spacecraft2 = Spacecraft1;

 

// Put Spacecraft1's Propagator and ForceModel to files

Put (Spacecraft1.Propagator AsType RK89) to "prop.FFObjectFile";

Put (Spacecraft1.Propagator AsType RK89).ForceModel to "fm.FFObjectFile";

 

// Retrieve data from files into Spacecraft2's Propagator and ForceModel

Get (Spacecraft2.Propagator AsType RK89) from "prop.FFObjectFile";

Get (Spacecraft2.Propagator AsType RK89).ForceModel from "fm.FFObjectFile";

 

 

Command Editor


Object

Specifies the FreeFlyer Object that you would like to retrieve from an external file

  Spacecraft

  GroundStation

Ephemeris

StarField

Any other object

 

Script

Displays the FreeFlyer Script that is generated by the editor

 

Description

Displays descriptions of the editor and its fields

Description text changes as the mouse pointer moves over the different fields within the editor

 

 

 

 

Deprecated


Spacecraft State Files

 

Note: In FreeFlyer 6.0 or higher, use mySpacecraft.LoadTLEState.

 

Get mySpacecraft as NORAD 2 from "NORAD.txt";
Get mySpacecraft as NORAD 2 from "NORAD.txt" using "NORADconfig.txt";
Get mySpacecraft as NORAD Next from "NORAD.txt" using "NORADconfig.txt";
Get mySpacecraft as NORAD 2 from "NORAD.txt" using "NORADconfig.txt" named "myString";

 

Where:

2 and Next define the state from the NORAD file

"NORAD.txt" is an external NORADSGP4-formatted file containing Spacecraft information

"NORADconfig.txt" is the name of the configuration file used to define the contents of the "NORAD.txt" file

 

 

See Also


Put Command

Save Command

Restore Command

Data Files Reference