Position and velocity of satellite
[___] = states(___,'CoordinateFrame',
returns the outputs in the coordinates specified by
Create a satellite scenario object.
sc = satelliteScenario;
Add a satellite to the scenario.
tleFile = "eccentricOrbitSatellite.tle"; sat = satellite(sc,tleFile);
Obtain the position and velocity of the satellite in the Earth-centered Earth-fixed (ECEF) frame corresponding to May 25, 2021, 10:30 PM UTC.
time = datetime(2021,5,25,22,30,0); [position,velocity] = states(sat(1),time,"CoordinateFrame","ecef")
position = 3×1 107 × -0.9431 -3.0675 2.7404
velocity = 3×1 103 × -1.2166 0.4198 -1.6730
Satellite, specified as a row vector of
timeIn— Time at which output is calculated
Time at which the output is calculated, specified as a scalar. If you do not specify a time zone, then the time zone is assumed to be UTC.
C— Coordinate frame
Coordinate frame in which the outputs are returned, specified as
'ecef' option returns the coordinates in the Earth
Centered Earth Fixed (ECEF) frame. For more information on ECEF frames, see Earth-Centered Earth-Fixed Coordinates.
'inertial' option returns the coordinates in the GCRF
'geographic' option returns the position as
[lat; lon; altitude],
where lat and lon are latitude and longitude
in degrees, and altitude is the height above the wgs84 ellipsoid in meters. The
velocity returned is ECEF, defined in the local North-East-Down (NED)
pos— Position history
Position history of the satellite, returned as a scalar, vector, matrix, or N-D array in the GCRF frame. Units are in meters.
velocity— Velocity history
Velocity history of the satellite, returned as a scalar, vector, matrix, or N-D array in the GCRF frame. Units are in meters/second.
timeOut— Time samples of position and velocity
Time samples of the position and velocity of the satellite, returned as a scalar or
vector. If time histories of the position and velocity of the satellite are returned,
timeOut is a row vector.