Description | Example | Return message | Group

SetState FromFile

Set the path of a vehicle from an external ephemeris file

Syntax

SetState <VehObjectPath> FromFile "<FilePath>" [{Options}]

Related commands

Description

The SetState FromFile command with the File {PropagatorType} option loads the path of a vehicle from a specified ephemeris file.

The "<FilePath>" is the path and filename of an ephemeris file that you wish to load. See the {Format} parameter below for valid ephemeris file formats.

"<FilePath>" can be the path to a file on your local drive or the path to a file on an SDF server. See Specifying Paths for "<SDFFilePath>" syntax information.

Any or all of the following options can be entered, but if more than one option is entered they must be entered in the order given in the table below.

{Options}Description
StartTime {EphemStartTime}Use this option if the first ephemeris point in the ephemeris file being loaded is to be at a time different than the one specified in the file.

For valid {EphemStartTime} values see Time Options.

FileFormat {Format}Valid values for {Format} include:
  • StkPL - STK Ephemeris (*.e)
  • StkBinEphem - STK Binary ephemeris (*.be)
  • Code500Ephem - (*.EPH)
  • CCSDS_OEM - (*.oem, version 1.0 and 2.0 oem files, and *.xml version 2.0 files)

There may be other valid ephemeris formats that STK recognizes. These values are case-sensitive.

If no {Format} is entered then the ephemeris type is determined by the file extension. If the file has no extension or the ephemeris format can not be determined from the extension then STK Ephemeris will be used.

Save {File | Locally} Enter File to have the Save command write the entire ephemeris to the file specified by the "<FilePath>".

Using the File option will overwrite the original ephemeris file unless the original file is renamed.

Enter Locally to have the Save command write the ephemeris file to the user's current Scenario directory. When the vehicle is reloaded into STK, the local version of the ephemeris file will be used.

Use the Locally option when you want a vehicle's external ephemeris file to be saved in the same directory as the vehicle with which it is associated regardless of where on your computer system the external ephemeris file originally resided. This makes it much easier to locate the ephemeris files that you have associated with a specific vehicle.

This option applies only to STK Ephemeris and STK Binary ephemeris files.

NoPropIf included on the command line the satellite's state will be set but it will not be propagated.
LimitEphemeris {ScenarioInterval | No}Limit the span of external ephemeris available for analysis.

Specify ScenarioInterval to limit the ephemeris to the Scenario interval. The default is No.

Examples

To use the data from STK Ephemeris file EphemFile.e when propagating ephemeris for the Shuttle satellite:

SetState */Satellite/Shuttle FromFile "C:\stk\User\Data\EphemFile.e"

Save the file from which you loaded the ratpack1 missile's ephemeris back to its original location and overwrite the original ephemeris file:

SetState */Missile/ratpack1 FromFile "c:\FtpDir\missilex.e" Save File

Save the file from which you loaded the ratpack1 missile's ephemeris to the default STK user directory:

SetState */Missile/ratpack1 FromFile "c:\FtpDir\missilex.e" Save Locally

To change the start time of the first ephemeris point in ephemeris file Satellite1.e being used by Satellite3 in the active scenario, but don't propagate the satellite:

SetState */Satellite/Satellite3 FromFile "c:\stkDB\Satellite1.e" StartTime "1 Jun 2003 14:00:00.00" NoProp

To set an ephemeris file and inform STK that the file is in the STK Ephemeris format:

SetState */Satellite/Satellite1 FromFile "C:\Users\stkUser\Documents\ExternFiles\Satellite1.txt" FileFormat StkPL

To use a CCSDS version 2.0 xml file to set a satellite's ephemeris:

SetState */Satellite/Satellite3 FromFile "C:\Users\stkUser\Documents\ExternFile\Sat1_Connect.xml" FileFormat CCSDS_OEM

Return message

Group membership

This command belongs to the following group(s):

Vehicles

Version

11.5