sasktran2.Geodetic#

class sasktran2.Geodetic(self: sasktran2._core.Geodetic, equatorial_radius: float, flattening_factor: float)#

Bases: pybind11_object

A geodetic object based on a given equatorial (semi-major) radius and flattening factor.

Standard usage is to create a geodetic object, and then initialize it through one of the from_* methods.

Parameters:
  • equatorial_radius (float) – Radius at the equator (semi-major) of the ellipsoid.

  • flattening_factor (float) – Flattening factor of the ellipsoid. This is defined as (a-b)/a, where a is the semi-major axis and b is the semi-minor radius

__init__(self: sasktran2._core.Geodetic, equatorial_radius: float, flattening_factor: float) None#

A geodetic object based on a given equatorial (semi-major) radius and flattening factor.

Standard usage is to create a geodetic object, and then initialize it through one of the from_* methods.

Parameters:
  • equatorial_radius (float) – Radius at the equator (semi-major) of the ellipsoid.

  • flattening_factor (float) – Flattening factor of the ellipsoid. This is defined as (a-b)/a, where a is the semi-major axis and b is the semi-minor radius

Methods

__init__(self, equatorial_radius, ...)

A geodetic object based on a given equatorial (semi-major) radius and flattening factor.

altitude_intercepts(self, altitude, ...)

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

from_lat_lon_alt(self, latitude, longitude, ...)

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

from_tangent_altitude(self, altitude, ...)

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

from_tangent_point(self, observer, look_vector)

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

from_xyz(self, location)

Initializes the Geodetic from a geocentric location

Attributes

altitude

Altitude in [m] above the surface of the ellipsoid.

latitude

Geodetic latitude in degrees

local_south

A unit vector pointing in the local south direction

local_up

A unit vector pointing up (perpindicular to the ellipsoidal surface)

local_west

A unit vector pointing in the local west direction

location

Geocentric location in cartesian coordinates

longitude

Geodetic longitude in degrees

valid

True if the geodetic object has been initialized, False otherwise.

property altitude#

Altitude in [m] above the surface of the ellipsoid.

altitude_intercepts(self: sasktran2._core.Geodetic, altitude: float, observer: numpy.ndarray[numpy.float64[3, 1]], look_vector: numpy.ndarray[numpy.float64[3, 1]]) tuple[numpy.ndarray[numpy.float64[3, 1]], numpy.ndarray[numpy.float64[3, 1]]]#

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 sasktran2 as sk
>>> import numpy as np
>>> geodetic = sk.WGS84()
>>> 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))
[ 1147302.059  3152186.5   -5425360.027]
>>> print(np.array_str(intercept2, precision=3))
[ 1201098.489  3299990.978 -5325574.803]
from_lat_lon_alt(self: sasktran2._core.Geodetic, latitude: float, longitude: float, altitude: float) None#

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 sasktran2 as sk
>>> geodetic = sk.WGS84()
>>> geodetic.from_lat_lon_alt(latitude=-15, longitude=-20, altitude=7342)
>>> print(geodetic)
WGS84 Location:
Latitude: -15.0, Longitude: 340.0, Altitude: 7342.0
from_tangent_altitude(self: sasktran2._core.Geodetic, altitude: float, observer: numpy.ndarray[numpy.float64[3, 1]], boresight: numpy.ndarray[numpy.float64[3, 1]]) numpy.ndarray[numpy.float64[3, 1]]#

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 sasktran2 as sk
>>> geodetic = sk.WGS84()
>>> look = geodetic.from_tangent_altitude(15322, [ 3.676013154788849600e+005, 1.009976313640051500e+006,\
                                                  -6.871601202127538600e+006], [0, 0, 1])
>>> print(look)
[0.28880556 0.79348676 0.53569591]
>>> print(geodetic)
WGS84 Location:
Latitude: -57.60888188776806, Longitude: 70.00000000000001, Altitude: 15321.971935882739
from_tangent_point(self: sasktran2._core.Geodetic, observer: numpy.ndarray[numpy.float64[3, 1]], look_vector: numpy.ndarray[numpy.float64[3, 1]]) None#

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 sasktran2 as sk
>>> geodetic = sk.WGS84()
>>> geodetic.from_tangent_point([ 3.676013154788849600e+005, 1.009976313640051500e+006,\
                                 -6.871601202127538600e+006], [ 2.884568631765662100e-001,\
                                  7.925287180643269000e-001,  5.372996083468238900e-001])
>>> print(geodetic)
WGS84 Location:
Latitude: -57.500000192733594, Longitude: 70.0, Altitude: 10002.99586173162
from_xyz(self: sasktran2._core.Geodetic, location: numpy.ndarray[numpy.float64[3, 1]]) None#

Initializes the Geodetic from a geocentric location

Parameters:

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

Examples

>>> import sasktran2 as sk
>>> geodetic = sk.WGS84()
>>> geodetic.from_xyz([ 5797230.47518212, -2110019.3341472, -1642001.16317228])
>>> print(geodetic)
WGS84 Location:
Latitude: -14.999999973747736, Longitude: 340.00000000000006, Altitude: 7344.999610390202
property latitude#

Geodetic latitude in degrees

property local_south#

A unit vector pointing in the local south direction

property local_up#

A unit vector pointing up (perpindicular to the ellipsoidal surface)

property local_west#

A unit vector pointing in the local west direction

property location#

Geocentric location in cartesian coordinates

property longitude#

Geodetic longitude in degrees

property valid#

True if the geodetic object has been initialized, False otherwise.