Click or drag to resize

StkEphemerisFileReadFrom Method (TextReader, StkEphemerisFileOptions)

Reads an STK ephemeris (.e) file from a TextReader. The TextReader can be a StreamReader for reading from a file, a StringReader for reading from a string, or any number of other types. See the Remarks section for more information.

Namespace:  AGI.Foundation.Stk
Assembly:  AGI.Foundation.Models (in AGI.Foundation.Models.dll) Version: 24.2.419.0 (24.2.419.0)
Syntax
public static StkEphemerisFile ReadFrom(
	TextReader reader,
	StkEphemerisFileOptions readOptions
)

Parameters

reader
Type: System.IOTextReader
The reader from which to read the ephemeris.
readOptions
Type: AGI.Foundation.StkStkEphemerisFileOptions
An object containing any additional instructions for the read process.

Return Value

Type: StkEphemerisFile
An StkEphemerisFile instance containing the read ephemeris file.
Exceptions
ExceptionCondition
InvalidDataException Thrown when the STK ephemeris file is invalid or it contains unsupported properties or property values.
ArgumentNullException Thrown when reader is .
Remarks

The STK ephemeris file format is a mix of well-defined, unambiguous properties, and fairly STK-specific properties that are difficult to interpret outside of the context of STK. For example, the "CoordinateSystem" property can specify any coordinate system that is known to STK's Vector Geometry Tool in the current scenario. In the general case, it's impossible to determine from the ephemeris file itself, in the absence of an STK scenario, what that coordinate system actually means. As a result, this method should be considered a "best effort" that works well in most common cases, but that may have problems with certain ephemeris files.

By default, when this method does not understand a property or property value read from the file, it will throw an InvalidDataException describing the problem. You can attempt to read files with unsupported properties or property values setting the IgnoreUnsupportedProperties and IgnorePropertiesWithUnsupportedValues properties of the StkEphemerisFileOptions passed to this method to . With these properties set, unsupported properties and property values will be added to the UnsupportedProperties and PropertiesWithUnsupportedValues dictionaries, respectively, and the reader can make no guarantees that its results will match STK.

Here are the known limitations, compared to STK, when reading an ephemeris file using this method:

  • Only the following properties are supported: NumberOfEphemerisPoints, NumberOfCovariancePoints, ScenarioEpoch, CoordinateSystemEpoch, CoordinateSystem, DistanceUnit, CentralBody, InterpolationMethod, InterpolationOrder, InterpolationSamplesM1, BlockingFactor (ignored), TimeFormat, and CovarianceFormat.
  • Only the following CentralBody values are supported: Earth, Sun, and Moon.
  • When the CentralBody is Earth, only the following CoordinateSystem values are supported: ICRF, J2000, Inertial, Fixed, TrueOfDate, TrueOfEpoch, MeanOfDate, MeanOfEpoch, TEMEOfDate, and TEMEOfEpoch.
  • When the CentralBody is Sun or Moon, only the following CoordinateSystem values are supported: Inertial and Fixed.
  • Only the following DistanceUnit values are supported: Meters, Kilometers, Kilofeet, Feet, NauticalMiles, and StatuteMiles.
  • Only the following InterpolationMethod values are supported: Lagrange, Hermite, and LagrangeVOP.
  • Only the following TimeFormat values are supported: EpSec, GPSG, UTCG, TAIG, and TDTG.
  • Only the following ephemeris formats are supported: EphemerisTimePos, EphemerisTimePosVel, EphemerisTimePosVelAcc, EphemerisLLATimePos, EphemerisLLATimePosVel, EphemerisLLRTimePos, and EphemerisLLRTimePosVel.
  • Only the following covariance formats are supported: CovarianceTimePos and CovarianceTimePosVel.
See Also