Geodesy Tools#
import sasktran2 as sk
SASKTRAN2 contains a simple implementation of ellipsoidal implementations.
These can be created with the generic sasktran2.Geodetic object
which allows the creation of ellipsoids with arbitrary axis lengths and/or
flattening factors. Typically it is recommended to use one of the built in
specializations,
A geodetic object based upon the standard WGS84 ellipsoid. |
|
|
A geoid that is represented as a perfect sphere. |
In this guide we will use the sasktran2.WGS84 object.
geodetic = sk.WGS84()
Usage#
In the beginning, the geodetic object is in an unitialized state,
print(geodetic)
WGS84 Unitialized
to initialize the object, we use one of the available from_* methods,
geodetic.from_lat_lon_alt(latitude=60, longitude=120, altitude=10000)
print(geodetic)
WGS84 Location:
Latitude: 60.0, Longitude: 120.0, Altitude: 10000.0
Then we can do things such as convert to geocentric cartesian coordinates,
print(geodetic.location)
[-1601052.29346197 2773103.91785082 5509137.38797648]
or access the local right handed coordinate system pointing (up, south, west),
print(f"up: {geodetic.local_up}, south: {geodetic.local_south}, west: {geodetic.local_west}")
up: [-0.25 0.4330127 0.8660254], south: [-0.4330127 0.75 -0.5 ], west: [ 8.66025404e-01 5.00000000e-01 -2.77555756e-17]
Initialization Methods#
|
Initializes the Geodetic from a geocentric location |
Initializes the Geodetic based on a specifiec latitude, longitude, and altitude. |
|
Initializes the Geodetic by calculating the tangent point from an observer position and look vector |
|
Initialized the Geodetic from a specified tangent altitude, obsever location, and bore sight plane. |