Creating an Ephemeris File
|Top Previous Next|
The Ephemeris object is used to generate new Ephemeris files from FreeFlyer. There is built-in support for writing FreeFlyer, STK, CCSDS OEM, SPICE, and some NASA file formats. These files can contain various combinations of:
Collect Spacecraft State Data
FreeFlyer can collect Spacecraft state data into an Ephemeris object using the Put command or by declaring the Ephemeris object as a global ephemeris. In both cases, once all the desired data for the ephemeris file is collected, the Put command applied to the Ephemeris object takes the data and converts it to a single ephemeris file, as described in the "Generate an External Ephemeris File" section below.
Configuring the Ephemeris Data
The ephemeris central body and columns to include can be configured through the Ephemeris object editor (as shown in the image below), or using the properties of the Ephemeris object shown in the syntax example below. This example shows how to include all the available built-in columns.
Note that not all available columns are supported by all ephemeris file formats.
The Put Command
The Put command provides a mechanism to collect Spacecraft state data into an Ephemeris object. Whenever you want to add the Spacecraft's current state into the Ephemeris object, use the Put command. The Put command is often placed in a While loop, usually following Step and/or Maneuver commands. You can control which portions of your simulation are added to the ephemeris file by only calling the Put command when desired, for example, when only the first week of a month-long propagation is required for external product generation.
Spacecraft state data can also be added to an Ephemeris object using the Ephemeris.AddVectorData() or Ephemeris.SetVectorData() methods. See the Accessing Data in an Ephemeris page for more information.
Note: For Mission Plans still using millisecond precision mode, Ephemeris objects can be declared "as Global", as described below. As of FreeFlyer 7.3, the default timing precision mode is nanosecond precision mode which provides more modern and robust interfaces for this functionality.
Generate an External Ephemeris File
Once all of the Spacecraft states have been collected into the Ephemeris object, the Put command can be used to transmit data from a FreeFlyer Object to an external file. This is usually at the end of the Mission Sequence. For more information on creating external files, see the Interfacing with External Resources Guide.
External ephemeris files can also be generated using the Ephemeris.GenerateEphemeris() method.
Several formats are available for the creation of external ephemeris files, including FreeFlyer ephemerides (*.FFephem), STK ephemerides (*.e), SPICE ephemerides (*.bsp), and Goddard Space Flight Center Code 500 ephemerides (requires NASA pack). See the Ephemeris Formats table on the Ephemerides and AHF page for more information.
Note: If data exists in an Ephemeris object but is not supported by the format to which it is being written, that data will be ignored. Similarly, if required data for the selected format is missing from the Ephemeris object, it will be taken from the Spacecraft object associated with the Ephemeris object to fill in the gaps.
Ephemeris Object Editor
The Ephemeris Object editor is used to configure the type of Ephemeris the user would like to work with.
Note: Only the FreeFlyer ephemeris format version 1 is supported in the Ephemeris object editor; all subsequent FreeFlyer ephemeris versions must be configured using FreeFlyer script instead of the object editor.
The Ephemeris Object editor allows the user to:
The information included in the Ephemeris is dependent on the type of ephemeris selected. For example, when the Type is "Ephemeris", only Position and Velocity will be be included. A Custom File allows the user to choose any combination of information to include in the Ephemeris file.
Note: Writing the position and velocity covariance using the checkbox shown below is only supported for the CCSDS OEM ephemeris file format. Additionally, the FreeFlyer Ephemeris v2.0 file format allows the user to specify any custom columns.
Ephemeris Object Editor
FreeFlyer can use the data contained in ephemeris files to seed an initial Spacecraft state, and then use an integrator and Force Model to "step" the Spacecraft forward in time, or FreeFlyer can step the Spacecraft sequentially to the states represented by the data points in the ephemeris file, interpolating Spacecraft states in between data points if needed. See the Importing an Ephemeris File page for more information on stepping the Spacecraft using an ephemeris file.