Description | Example | Return message | Group

InitialState

The InitialState Connect command enables you to import or export initial state data (i.e., epoch, position, and velocity) for satellites and missiles.

Syntax

InitialState <ObjectPath> {Import | Export} {Source} ["<FilePath>"] [{Options}]

Description

  • Import
  • You can obtain the initial state from a vehicle's ephemeris (when Source is STKEphem), from an STK file (when Source is STKFile), or from one of several types of initial state files (when Source is one of the other valid values). See the Initial State Tool in the STK Desktop Help. If the vehicle uses the HPOP propagator, then STK will load any mass, drag, or solar radiation parameters contained as part of the initial state message into the vehicle as well, replacing any existing values. If the Source is CCSDS_OPM and that message contains position-velocity covariance, then STK will load it also into the vehicle, replacing any current values. STK will preserve the other HPOP Force Model settings.

  • Export
  • You can export one or more initial states into an external file, formatted per the Source setting as specified by the corresponding authoritative organization. [These are not AGI-designed formats.] When the vehicle uses the HPOP or LOP propagator and the Source is EPV or CCSDS_OPM, then STK will include the vehicle's mass, drag, and solar radiation parameters in the file as part of the initial state message. Similarly, if the HPOP vehicle contains covariance, STK will include it as part of the CCSDS_OPM message.

The format used will depend on the whether you choose Import or Export. Formats are outlined below.

Generic Parameters

Valid values for {Source} are described in the table below.

The <FilePath> parameter includes the full path and name of the file to be imported or exported.

The <FilePath> parameter is required for both Import and Export unless the {Source} is STKEphem.

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

{Source}Description
STKFileRead the initial state data from an STK satellite file (.sa) or ephemeris file (.e). If you have not yet propagated the satellite, STK will set the propagator to TwoBody.

HPOP must propagate from the orbit epoch to the start time, so use caution when selecting a satellite or ephemeris file (i.e., check the epoch time in the file).

This {Source} is valid for Import only.

STKEphemRead the initial state data from the satellite's ephemeris. STK obtains the ephemeris from the vehicle specified by the <ObjectPath> parameter. You must propagate the satellite prior to using this option. Do not include the <FilePath> parameter in the command.

This {Source} is valid for Import only.

IIRVRead or generate data in Improved Interrange Vector (IIRV) format.
IIRV1Read or generate data in IIRV Type 1 format.
IIRV9Read or generate data in IIRV Type 9 format.
EPVRead or generate data in Extended Precision Vector (EPV) format.
NASAIIRVRead or generate data in NASA Flight Dynamics Facility IIRV format.

In order to be successfully imported into STK, the name of the NASA IIRV file must include the year, starting at the eighth character, for example: ephmxxxYYYYddd.

CCSDS_OPMRead or generate data in CCSDS OPM Format, version 2.0.

Import Options

For a satellite, you must use one of the following propagators: TwoBody, J2Perturbation, J4Perturbation, HPOP, LOP, or Astrogator. If you have not propagated the satellite, then STK will set the propagator to TwoBody.

When you use the TwoBody propagator for a satellite, STK uses the spacecraft parameters for mass, drag (Cd and area-to-mass ratio), and SRP (Cr and area-to-mass ratio) as well as the position-velocity covariance as read from the Initial State file. When you use Interpolate for epoch selection, STK obtains the parameters as if you chose ClosestPoint and determines the initial state through interpolation.

You must use the TwoBody or HPOP propagator for a missile. If you have not yet propagated the missile, then STK will set the propagator to TwoBody.

STK will set the ephemeris step size for the satellite or missile to 60.0 seconds, unless the propagator is LOP, in which case STK will use a step size of 1 day.

HPOP must propagate from the orbit epoch to the start time, so use caution when selecting a satellite or ephemeris file (i.e., check the epoch time in the file).

The following table describes the Import {Options}.

{Option}<Parameter>Description
EpochSelectInterpolateCalculates a point precisely at the Target Epoch to select the initial state. Interpolate is the default value.
ClosestPointUses the data point closest to the Target Epoch to select the initial state.
ClosestPreviousUses the closest data point preceding the Target Epoch to select the initial state.
ClosestFollowingUses the closest data point following the Target Epoch to select the initial state.
FirstPointUses the first ephemeris point to select the initial state.
LastPointUses the last ephemeris point to select the initial state.
Epoch{TimeEpoch}If EpochSelect is Interpolate, ClosestPoint, ClosestPrevious, or ClosestFollowing, enter the Epoch {TimeEpoch} for STK to use as a starting point for initial state. If the {TimeEpoch} lies outside the span of the available ephemeris, STK uses the closest ephemeris point.

For valid {TimeEpoch} values, see Time Options.

If you do not enter a time, STK uses the vehicle's orbit epoch, unless it falls outside the vehicle's ephemeris. When it does fall outside, STK uses either the start time or end time, whichever is closer to the orbit epoch.

InterpOrder<InterpOrder>If the EpochSelect is Interpolate, set the order of interpolation by specifying an integer between 1 and 22. The default value is 5.
GatorPath"<Path>"Enter the path of the satellite's Initial State segment. If you do not include GatorPath, STK will use the first InitialState segment.

This option is valid only for satellites with a propagator set to Astrogator.

Stepsize<TimeDuration>The Stepsize to use for propagation. <TimeDuration> is given in Connect time units. Default value is to use the vehicle's current Stepsize, if known, else 60.0 seconds. Valid only when Source is STKFile or STKEphem.

Import Deprecated Format

The format for the InitialState Import options was changed in STK 9. The following describes the format in previous versions of STK. You should avoid using this format; it appears here only for backward compatibility.

InitialState <ObjectPath> Import {Source} "<FilePath>" [{EpochSelect} "<TgtEpoch>" <InterpOrder>]

Export Options

If you are exporting an initial state file, the valid command format is:

InitialState <ObjectPath> Export {Source} "<FilePath>" {CrdnSystem} [{ExportOption} <Value> [{ExportOption} <Value>...]]

If you are exporting an initial state file, valid values for {CrdnSystem} will depend on the {Source} specified.

{Source}{CrdnSystem}
EPVIf {Source} is EPV, {CrdnSystem} can be:
  • GreenwichTODRotating
  • MeanB1950
  • TODJ2000
  • MeanJ2000

Deprecated values for {CrdnSystem}, in order, are: Fixed, B1950, TrueOfDate, and J2000. Please replace these deprecated values with currently valid ones.

IIRVIf {Source} is IIRV, {CrdnSystem} can be:
  • GeocentricTODRotating
  • GeocentricMeanB1950
  • HeliocentricB1950
  • GeocentricMeanJ2000
  • HeliocentricJ2000

Deprecated values for the first two {CrdnSystem} values, in order, are: Fixed and B1950. Please replace these deprecated values with currently valid ones.

IIRV1If {Source} is IIRV1, {CrdnSystem} can be:
  • GeocentricTODRotating
  • GeocentricMeanB1950

Deprecated values for {CrdnSystem}, in order, are: Fixed and B1950. Please replace these deprecated values with currently valid ones.

IIRV9If {Source} is IIRV9, {CrdnSystem} can be:
  • GeocentricTODRotating
  • GeocentricMeanB1950

Deprecated values for {CrdnSystem}, in order, are: Fixed and B1950. Please replace these deprecated values with currently valid ones.

NASAIIRVIf {Source} is NASAIIRV, {CrdnSystem} can be:
  • GeocentricTODRotating

For NASAIIRV Export, the <FilePath> should include the output directory only.

The exported NASAIIRV file name is automatically constructed as follows: ephmxxxyyyyddd, where xxx is the MissionID, yyyy is the year, and ddd is the day of year.

The deprecated value for {CrdnSystem} is Fixed. Please replace these deprecated values with currently valid ones.

CCSDS_OPM You can use any coordinate system supported by the vehicle's central body. Additionally, ITRF2020, ITRF2014, ITRF2008, ITRF2005, and ITRF2000 are valid when the vehicle's central body is Earth.

If {Source} is IIRV, valid {ExportOption} <Value> combinations are:

{ExportOption}<Value>Description
MessageID<IDNum><IDNum> is an integer between 0 and 9999999.
MessageClassNominalSpecify the message class identifier that STK will use.
Inflight
MessageOriginGSFCSelect the originating facility.
ETR
WTR
PMR
KMR
WLP
JPL
JSC
CSTC
CNES
Destination<cccc>Enter a four-character string representing the site for which the message was generated. Enter MANY if generating a message for more than one site.
VectorTypeFreeFlightSpecify the vector type identifier.
Forced
Spare3
Ignition
CutOff
Reentry
Powered
Stationary
Spare9
VectorSourceNominalEnter the vector source identifier.
RealTime
Offline
OfflineMean
CounterStart<Counter>Enter an integer between 1 and 1000.
VehicleID<VehIDValue>Enter an integer between 1 and 99.
SolarRef<SRPCoeff>Enter a number between -10.0 and 10.0 that STK will use as the solar radiation pressure coefficient.
Drag<DragCoeff>Enter a number between -10.0 and 10.0 that STK will use as the drag coefficient.
Area<AreaValue>Enter a number between -1000.0 and 1000.0 for the cross-sectional area.
RoutingMessage<cccc>Enter a four-character string representing the site for which the message was generated. Enter MANY if generating a message for more than one site.
SupportID<SupportIDValue>Enter an integer between 0 and 9999.
UseStartStop {TimeInterval}Enter the time period used to create the file. For valid {TimeInterval} values, see Time Options. STK will only use the part of this interval that overlaps with the vehicle's time period. If you do not enter this option, STK will use the vehicle's orbit epoch if it occurs on the vehicle's time period; otherwise, STK will use the start or stop time of the vehicle's time period, whichever is closest to the orbit epoch.
Stepsize<TimeDuration>If you provide UseStartStop, enter the step size at which to report states over that interval. <TimeDuration> is given in Connect time units; the default value is 1 hr.

If {Source} is IIRV1, valid {ExportOption} <Value> combinations are:

{ExportOption}<Value>Description
Destination<cccc>Enter a four-character string representing the site for which the message was generated. Enter MANY if generating a message for more than one site.
VectorTypeRoutineSpecify the vector type identifier.
ForcedSpecial
ForcedNoBurn
Ignition
CutOff
Reentry
Powered
VectorSourceNominalEnter the vector source identifier.
RealTime
OffLine
OffLineMean
CounterStart<Counter>Enter an integer between 1 and 1000.
VehicleID<VehIDValue>Enter 5 or 6.
Drag<DragCoeff>Enter a number between -10.0 and 10.0 that STK will use as the drag coefficient.
Area<AreaValue>Enter a number between -1000.0 and 1000.0 for the cross sectional area.
RoutingMessage<cccc>Enter a four-character string representing the site for which the message was generated. Enter MANY if generating a message for more than one site.
SupportID<SupportIDValue>Enter an integer between 0 and 9999.
UseStartStop {TimeInterval}Enter the time period used to create the file. For valid {TimeInterval} values, see Time Options. STK will only use the part of this interval that overlaps with the vehicle's time period. If you do not enter this option, STK will use the vehicle's orbit epoch if it occurs on the vehicle's time period; otherwise, it will use the start or stop time of the vehicle's time period, whichever is closest to the orbit epoch.
Stepsize<TimeDuration>If you provide UseStartStop, enter the step size at which to report states over that interval. <TimeDuration> is given in Connect time units; the default value is 1 hr.

If {Source} is IIRV9, valid {ExportOption} <Value> combinations are:

{ExportOption}<Value>Description
IRON<IRONID>Enter a number between 0 and 99999 representing the object identifier.
SRP<SRPCoeff>Enter a number between -10.0 and 10.0 that STK will use as the solar radiation pressure coefficient. This will set the PerturbationCoeff type to Solar Radiation.
Drag<DragCoeff>Enter a number between -10.0 and 10.0 that STK will use as the drag coefficient. This will set the Perturbation Coefficient type to Drag.
UseStartStop {TimeInterval}Enter the time period used to create the file. For valid {TimeInterval} values, see Time Options. STK will only use the part of this interval that overlaps with the vehicle's time period. If you do not enter this option, STK will use the vehicle's orbit epoch if it occurs on the vehicle's time period; otherwise, STK will use the start or stop time of the vehicle's time period, whichever is the time closest to the orbit epoch.
Stepsize<TimeDuration>If you provide UseStartStop, enter the step size at which to report states over that interval. <TimeDuration> is given in Connect time units; the default value is 1 hr.

If {Source} is EPV, valid {ExportOption} <Value> combinations are:

{ExportOption}<Value>Description
MessageID<IDNum><IDNum> is an integer between 0 and 9999999.
MessageClassRoutineSpecify the message class identifier that STK will use.
Maneuver
MessageOriginGSFCSelect the originating facility.
ETR
WTR
PMR
KMR
WLP
JPL
JSC
CSTC
CNES
Destination<cccc>Enter a four-character string representing the site for which the message was generated. Enter MANY if generating a message for more than one site.
VectorTypeFreeFlightSpecify the vector type identifier.
Forced
Spare3
Ignition
CutOff
Reentry
Powered
Stationary
Spare9
VectorSource {SrcOption}NominalEnter the vector source identifier.
RealTime
VehicleID<VehIDValue>Enter an integer between 1 and 99.
SupportID<SupportIDValue>Enter an integer between 0 and 9999.
UserText<TextNum> "<String>"<TextNum> is 1, 2 or 3; "<String>" can be up to 60 characters enclosed in quotes.
UseStartStop {TimeInterval}Enter the time period used to create the file. For valid {TimeInterval} values, see Time Options. STK will only use the part of this interval that overlaps with the vehicle's time period. If you do not enter this option, STK will use the vehicle's orbit epoch if it occurs on the vehicle's time period; otherwise, STK will use the start or stop time of the vehicle's time period, whichever is the time closest to the orbit epoch.
Stepsize<TimeDuration>If you provide UseStartStop, enter the step size at which to report states over that interval. <TimeDuration> is given in Connect time units; the default value is 1 hr.

If {Source} is NASAIIRV, valid {ExportOption} <Value> combinations are:

{ExportOption}<Value>Description
MissionID<ccc><ccc> must be three characters.

This option is required.

MessageID<IDNum><IDNum> is an integer between 0 and 9999999.
MessageClassNominalSpecify the message class identifier that STK will use.
Inflight
RoutingIndicator<cccc><cccc> must be 1-4 characters; if you enter additional characters, STK will truncate the value.
VectorTypeFreeFlightSpecify the vector type identifier.
Forced
Spare3
Ignition
CutOff
Reentry
Powered
Stationary
VectorSourceNominalEnter the vector source identifier.
RealTime
OffLine
SolarRef<Value><Value> is between -9.999999999 and 9.999999999 for the solar reflectivity coeeficient.
Drag<Value><Value> is between 0.0 and 10.0 for the drag coefficient.
Area<AreaValue>Enter a number between -1000.0 and 1000.0 for the cross sectional area.
OriginatorRoutingInd{GCQU | GAQD}Specify the originator routing indicator.
UseStartStop{TimeInterval}Enter the time period used to create the file. For valid {TimeInterval} values, see Time Options. STK will only use the part of this interval that overlaps with the vehicle's time period. If you do not enter this option, STK will use the vehicle's orbit epoch if it occurs on the vehicle's time period; otherwise, STK will use the start or stop time of the vehicle's time period, whichever is the time closest to the orbit epoch.
Stepsize<TimeDuration>If you provide UseStartStop, enter the step size at which to report states over that interval. <TimeDuration> is given in Connect time units; the default value is 1 hr.

If {Source} is CCSDS_OPM, valid {ExportOption} <Value> combinations are:

{ExportOption}<Value>Description
ObjectName<StringValue>Enter text indicating the object's name. If not specified, STK will use "UNKNOWN".
ObjectID<StringValue>Enter text indicating the object's identifier. The spec suggests that you use the international deisgnator, but any text will be accepted. If not specified, STK will use "UNKNOWN".
CoordSystemEpoch<Date>Enter the date in Connect Date units for STK to use when the {CrdnSystem} specified is an OfEpoch coordinate system (i.e., MeanOfEpoch, TrueOfEpoch, or TEMEOfEpoch). This is not needed when using other coordinate systems.
CovCoordSystem<Name>Enter the name of the coordinate system to export the covariance information, if the vehicle has covariance information. This can be any coordinate system supported by the vehicle's central body or a local frame: RIC, RTN (another name for RIC), RSW (another name for RIC), or TNW (aligned with velocity and crosstrack). See the Initial State Tool in the STK Desktop Help, where it explains this notation.
Format<Type>Enter the OPM file type: XML or KVN (Keyword Value Notation). If you generate more than one state, the XML format produces a CCSDS NDM message containing OPM elements; otherwise it produces an OPM element by itself.
UseStartStop{TimeInterval}Enter the time period used to create the file. For valid {TimeInterval} values, see Time Options. STK only uses the part of this interval that overlaps with the vehicle's time period. If you do not enter this option, STK will use the vehicle's orbit epoch if it occurs on the vehicle's time period; otherwise, STK will use the start or stop time of the vehicle's time period, whichever is the time closest to the orbit epoch.
Stepsize<TimeDuration>If you provide UseStartStop, enter the step size at which to report states over that interval. <TimeDuration> is given in Connect time units; the default value is 1 hr.

Examples

Propagate Satellite2 using an external EPV file:

InitialState */Satellite/Satellite2 Import EPV "c:\stkdb\epvC1.epv"

To propagate Satellite2 using the iirvIPC3.iirv file:

InitialState */Satellite/Satellite2 Import IIRV "C:\stkdb\iirvIPC3.iirv"

Propagate TestSat2 using the last ephemeris point from the file Satellite1.e:

InitialState */Satellite/TestSat2 Import STKFile "C:\STKUser\TestScen\Satellite1.e" EpochSelect LastPoint

The following series of commands will create a satellite with Astrogator propagator and set the Initial State for the satellite:

New / */Satellite AstroSat2
Astrogator */Satellite/AstroSat2 SetProp
InitialState */Satellite/AstroSat2 Import STKFile "C:\STKUser\Satellite2.e" GatorPath "MainSEQUENCE.SegmentList.Initial_State"

Use the closest data point, in the file Satellite1.e, following the Epoch to set the initial state:

InitialState */Satellite/TestSat2 Import STKFile "C:\STKUser\TestScen\Satellite1.e" Epoch "1 Jul 2006 14:00:00.00" EpochSelect ClosestFollowing

Use the closest data point to the Epoch, from the ephemeris of TestSat1, to set the initial state:

InitialState */Satellite/TestSat1 Import STKEphem EpochSelect ClosestPoint Epoch "Scenario/FieldTestSc AnalysisStartTime"

Examples

Create an IIRV T9 file from Satellite SunSync, with an SRP of 1.234 and a defined start and stop time:

InitialState */Satellite/SunSync Export IIRV9 "c:\stkdb\iirvIPC1.iirv9" GeocentricTODRotating SRP 1.234 UseStartStop "1 Jun 2002 12:00:00.00" "1 Jun 2002 18:00:00.00"

Create an IIRV file from Satellite Sat1, setting various parameters:

InitialState */Satellite/Sat1 Export IIRV "c:\stkdb\iirvIPC2.iirv" GeocentricTODRotating Destination SAE1 VectorType Cutoff VectorSource realtime SupportID 678 VehicleID 34 CounterStart 765

Create an IIRV T1 file from Missile Missile1:

InitialState */Missile/Missile1 Export IIRV1 "C:\Temp\InitialState\Missile1.iirv1" GeocentricTODRotating Drag 1.234 UseStartStop "1 Jul 2006 12:00:00.000" "1 Jul 2006 12:20:00.000"

Export an initial state file in NASA IIRV format, the following file will be created, ephmTc12009143:

InitialState */Satellite/Satellite1 Export NASAIIRV "C:\STKUser\IIRVFiles" GeocentricTODRotating MissionID Tc1

Export an initial state file in EPV format:

InitialState */Satellite/Satellite2 Export EPV "C:\STKUser\IIRVFiles\epvIPC1.epv" TODJ2000 MessageID 123 MessageOrigin KMR VehicleID 34 UseStartStop "Satellite/Satellite1 EphemerisTimeSpan Interval" SupportID 56

Return message

Group membership

This command belongs to the following group(s):

Vehicles

Version

12.1