Geodetic

Module: sasktran.geodetic

Internally SASKTRAN uses the World Geodetic System (WGS48). This module provides some helpers for working with geodetic coordinates.

class sasktran.Geodetic(geoid_name=None)

Bases: object

Class which handles the representation of the Earth geometry. The object is initialized through one of the from methods, and then after initialization various parameters are available.

Parameters

geoid_name (str, optional) –

Examples

>>> import sasktran as sk
>>> geodetic = sk.Geodetic()
>>> geodetic.from_lat_lon_alt(latitude=60, longitude=30, altitude=0)
>>> print(geodetic)
ISKGeodetic: IAU 1976
 Latitude: 60.0, Longitude: 30.0, Altitude: 0.0
>>> print(geodetic.local_up)
[ 0.4330127  0.25       0.8660254]
>>> print(geodetic.location)
[ 2768775.09176071  1598553.04455358  5500479.72571591]
altitude_intercepts(altitude, observer, look_vector)

Calculate the two intersections of a line of sight and an altitude.

Parameters
  • altitude (float) – Altitude in meters.

  • observer (np.ndarray) – Three element array containing the obsever position in geocentric coordinates.

  • look_vector (np.ndarray) – Three element array containing a normalized look vector.

Returns

  • np.ndarray – Three element array containing the first (entering) intercept in geocentric coordinates.

  • np.ndarray – Three element array containing the second (exiting) intercept in geocentric coordinates.

Examples

>>> import sasktran as sk
>>> import numpy as np
>>> geodetic = sk.Geodetic()
>>> look = geodetic.from_tangent_altitude(15322, [3.676013154788849600e+005, 1.009976313640051500e+006,                                                       -6.871601202127538600e+006], [0, 0, 1])
>>> obs = geodetic.location
>>> intercept1, intercept2 = geodetic.altitude_intercepts(16000, obs, look)
>>> print(np.array_str(intercept1, precision=3))
[ 1147300.6    3152182.491 -5425366.163]
>>> print(np.array_str(intercept2, precision=3))
[ 1201097.087  3299987.124 -5325581.071]
from_lat_lon_alt(latitude, longitude, altitude)

Initializes the Geodetic based on a specifiec latitude, longitude, and altitude.

Parameters
  • latitude (float) – Latitude in degrees (-90 to 90)

  • longitude (float) – Longitude in degrees (0 to 360 or -180 to 180)

  • altitude (float) – Altitude above the geoid in metres

Examples

>>> import sasktran as sk
>>> geodetic = sk.Geodetic()
>>> geodetic.from_lat_lon_alt(latitude=-15, longitude=-20, altitude=7342)
>>> print(geodetic)
ISKGeodetic: IAU 1976
 Latitude: -15.0, Longitude: 340.0, Altitude: 7342.0
from_tangent_altitude(altitude, observer, boresight)

Initialized the Geodetic from a specified tangent altitude, obsever location, and bore sight plane.

Parameters
  • altitude (float) – Tangent altitude in meters

  • observer (np.ndarray) – Three element array containing the obsever position in geocentric coordinates

  • boresight (np.ndarray) – Three element array containing a normalized look vector that is within the bore sight plane.

Returns

Three element array containing the normalized look vector to the tangent point.

Return type

np.ndarray

Examples

>>> import sasktran as sk
>>> geodetic = sk.Geodetic()
>>> look = geodetic.from_tangent_altitude(15322, [ 3.676013154788849600e+005, 1.009976313640051500e+006,                                                          -6.871601202127538600e+006], [0, 0, 1])
>>> print(look)
[ 0.28880576  0.7934873   0.535695  ]
>>> print(geodetic)
ISKGeodetic: IAU 1976
 Latitude: -57.608525446153806, Longitude: 70.00000000000001, Altitude: 15321.971935943235
from_tangent_point(observer, look_vector)

Initializes the Geodetic by calculating the tangent point from an observer position and look vector

Parameters
  • observer (np.ndarray) – Three element array containing the observer position in geocentric coordinates

  • look_vector (np.ndarray) – Three element array containing a normalized look vector

Examples

>>> import sasktran as sk
>>> geodetic = sk.Geodetic()
>>> geodetic.from_tangent_point([ 3.676013154788849600e+005, 1.009976313640051500e+006,                                         -6.871601202127538600e+006], [ 2.884568631765662100e-001,                                          7.925287180643269000e-001,  5.372996083468238900e-001])
>>> print(geodetic)
ISKGeodetic: IAU 1976
 Latitude: -57.499726734289936, Longitude: 70.0, Altitude: 10000.000072686584
from_xyz(location)

Initializes the Geodetic from a geocentric location

Parameters

location (np.ndarray) – Three element vector containing a location in geocentric coordinates

Examples

>>> import sasktran as sk
>>> geodetic = sk.Geodetic()
>>> geodetic.from_xyz([ 5797230.47518212, -2110019.3341472, -1642001.16317228])
>>> print(geodetic)
ISKGeodetic: IAU 1976
 Latitude: -15.000000000000009, Longitude: 340.00000000000006, Altitude: 7341.999999995809
property altitude

Altitude in meters

Examples

>>> import sasktran as sk
>>> geodetic = sk.Geodetic()
>>> geodetic.from_xyz([ 5797230.47518212, -2110019.3341472, -1642001.16317228])
>>> print(geodetic.altitude)
7341.999999995809
Type

float

property latitude

Latitude in degrees in the range (-90 to 90)

Examples

>>> import sasktran as sk
>>> geodetic = sk.Geodetic()
>>> geodetic.from_xyz([ 5797230.47518212, -2110019.3341472, -1642001.16317228])
>>> print(geodetic.latitude)
-15.000000000000009
Type

float

property local_south

Three element vector unit vector tangent to the Earth pointing south

Examples

>>> import sasktran as sk
>>> geodetic = sk.Geodetic()
>>> geodetic.from_xyz([ 5797230.47518212, -2110019.3341472, -1642001.16317228])
>>> print(geodetic.local_south)
[-0.24321035  0.08852133 -0.96592583]
Type

np.ndarray

property local_up

Three element unit vector normal to the surface of the Earth pointing up

Examples

>>> import sasktran as sk
>>> geodetic = sk.Geodetic()
>>> geodetic.from_xyz([ 5797230.47518212, -2110019.3341472, -1642001.16317228])
>>> print(geodetic.local_up)
[ 0.90767337 -0.33036609 -0.25881905]
Type

np.ndarray

property local_west

Three element unit vector tangent to the surface of the Earth pointing west

Examples

>>> import sasktran as sk
>>> geodetic = sk.Geodetic()
>>> geodetic.from_xyz([ 5797230.47518212, -2110019.3341472, -1642001.16317228])
>>> print(geodetic.local_west)
[-0.34202014 -0.93969262  0.        ]
Type

np.ndarray

property location

Three element vector representing the position in geocentric coordinates

Examples

>>> import sasktran as sk
>>> geodetic = sk.Geodetic()
>>> geodetic.from_lat_lon_alt(latitude=-15, longitude=-20, altitude=7342)
>>> print(geodetic.location)
[ 5797230.47518212 -2110019.3341472  -1642001.16317228]
Type

np.ndarray

property longitude

Longitude in degrees in the range (0 to 360)

Examples

>>> import sasktran as sk
>>> geodetic = sk.Geodetic()
>>> geodetic.from_xyz([ 5797230.47518212, -2110019.3341472, -1642001.16317228])
>>> print(geodetic.longitude)
340.00000000000006
Type

float

See Also

Geometry

Objects which describe the geometry of the calculations to the engine. At a minimum these objects define the Lines of Sight, but can also specify things such as the suns position and the polling reference point.

Lines of Sight

An object that describes a line of sight. A line of sight is made up of: (1) a look vector, (2) an observer position, (3) an obervation time.