Skip to content

ITRF Coordinate

itrfcoord

Representation of a coordinate in the International Terrestrial Reference Frame (ITRF)

This coordinate object can be created from and also output to Geodetic coordinates (latitude, longitude, height above ellipsoid). Functions are also available to provide rotation quaternions to the East-North-Up frame and North-East-Down frame at this coordinate.

Example

Create ITRF coord from Cartesian:

coord = itrfcoord([ 1523128.63570828, -4461395.28873207,  4281865.94218203 ])

Create ITRF coord from Geodetic:

coord = itrfcoord(latitude_deg=42.44, longitude_deg=-71.15, altitude=100)

latitude_deg property

Latitude in degrees

longitude_deg property

Longitude in degrees

latitude_rad property

Latitude in radians

longitude_rad property

Longitude in radians

altitude property

Altitude above ellipsoid, in meters

geodetic_rad property

Geodetic position in radians

Returns:

Type Description
tuple[float, float, float]

tuple[float, float, float]: Tuple with 3 elements representing the geodetic position. First element is latitude in radians, second is longitude in radians, and third is altitude in meters

geodetic_deg property

Geodetic position in degrees

Returns:

Type Description
tuple[float, float, float]

tuple[float, float, float]: Tuple with 3 elements representing the geodetic position. First element is latitude in degrees, second is longitude in degrees, and third is altitude in meters

vector property

Cartesian ITRF coord as numpy array

Returns:

Type Description
NDArray[float64]

npt.NDArray[np.float64]: 3-element numpy array representing the ITRF Cartesian coordinate in meters

qned2itrf property

Quaternion representing rotation from North-East-Down (NED) to ITRF at this location

Returns:

Type Description
quaternion

satkit.quaternion: Quaternion representiong rotation from North-East-Down (NED) to ITRF at this location

qenu2itrf property

Quaternion representiong rotation from East-North-Up (ENU) to ITRF at this location

Returns:

Type Description
quaternion

satkit.quaternion: Quaternion representiong rotation from East-North-Up (ENU) to ITRF at this location

__init__(vec=None, *, latitude_deg=..., longitude_deg=..., latitude_rad=..., longitude_rad=..., altitude=..., height=...)

Create ITRF coordinate from Cartesian vector or geodetic parameters.

Parameters:

Name Type Description Default
vec NDArray[float64] | list[float] | None

ITRF Cartesian location in meters (3-element array, list, or tuple)

None
latitude_deg float

Latitude in degrees

...
longitude_deg float

Longitude in degrees

...
latitude_rad float

Latitude in radians

...
longitude_rad float

Longitude in radians

...
altitude float

Height above ellipsoid, meters

...
height float

Height above ellipsoid, meters (alias for altitude)

...

to_enu(refcoord)

Return vector from reference coordinate to this coordinate in East-North-Up (ENU) frame of the reference coordinate

Parameters:

Name Type Description Default
refcoord itrfcoord

Reference ITRF coordinate representing origin of ENU frame

required

Returns:

Type Description
NDArray[float64]

npt.NDArray[np.float64]: 3-element numpy array representing vector from reference coordinate to this coordinate in East-North-Up (ENU) frame of reference at the reference coordinate

Note
  • This is equivalent to calling: refcoord.qenu2itrf.conj * (self - refcoord)
Example
station = satkit.itrfcoord(latitude_deg=42.36, longitude_deg=-71.06, altitude=0)
target = satkit.itrfcoord(latitude_deg=42.37, longitude_deg=-71.06, altitude=1000)
enu = target.to_enu(station)
print(f"East: {enu[0]:.1f} m, North: {enu[1]:.1f} m, Up: {enu[2]:.1f} m")

to_ned(refcoord)

Return vector from reference coordinate to this coordinate in North-East-Down (NED) at the reference coordinate

Parameters:

Name Type Description Default
refcoord itrfcoord

Reference ITRF coordinate representing origin of NED frame

required

Returns:

Type Description
NDArray[float64]

npt.NDArray[np.float64]: 3-element numpy array representing vector from reference coordinate to this coordinate in North-East-Down (NED) frame of reference at the reference coordinate

Note
  • This is equivalent to calling: refcoord.qned2itrf.conj * (self - refcoord)

__sub__(other)

Subtract another ITRF coordinate from this one

Parameters:

Name Type Description Default
other itrfcoord

Other ITRF coordinate to subtract

required

Returns:

Type Description
NDArray[float64]

npt.NDArray[np.float64]: 3-element numpy array representing the difference in meters between the two ITRF coordinates

geodesic_distance(other)

Use Vincenty formula to compute geodesic distance: https://en.wikipedia.org/wiki/Vincenty%27s_formulae

Returns:

Type Description
tuple[float, float, float]

tuple[float, float, float]: (distance in meters, initial heading in radians, heading at destination in radians)

Example
boston = satkit.itrfcoord(latitude_deg=42.36, longitude_deg=-71.06, altitude=0)
nyc = satkit.itrfcoord(latitude_deg=40.71, longitude_deg=-74.01, altitude=0)
dist, heading_start, heading_end = boston.geodesic_distance(nyc)
print(f"Distance: {dist/1000:.1f} km")

move_with_heading(distance, heading_rad)

Move a distance along the Earth surface with a given initial heading

Parameters:

Name Type Description Default
distance float

Distance to move in meters

required
heading_rad float

Initial heading in radians

required
Notes

Altitude is assumed to be zero

Use Vincenty formula to compute position: https://en.wikipedia.org/wiki/Vincenty%27s_formulae

Returns:

Type Description
itrfcoord

tuple[float, float, float]: (distance in meters, initial heading in radians, heading at destination in radians)

Example
import math
start = satkit.itrfcoord(latitude_deg=42.36, longitude_deg=-71.06, altitude=0)
# Move 100 km due north
dest = start.move_with_heading(100e3, math.radians(0))
print(f"Destination: {dest.latitude_deg:.2f} deg lat, {dest.longitude_deg:.2f} deg lon")