s2d2.orbit_tools
Module Contents
Functions
|
get paramters of the WGS84 ellipsoid |
|
get the eccentricity of the WGS84 ellipsoid |
|
get axis length of the WGS84 ellipsoid |
|
provide value for the standard gravitational parameter of the Earth |
|
|
|
|
|
|
|
|
|
|
|
given satellite and ground coordinates, estimate observation angles |
|
|
|
get ground coordinates in Cartesian system |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
perterp one of the arguments |
|
numerical differentiation, via pertubation of the observation vector |
|
- s2d2.orbit_tools.wgs84_param() tuple[float, float][source]
get paramters of the WGS84 ellipsoid
- Returns:
major_axis (float, unit=meter) – largest axis of the ellipsoid
flattening (float) – amount of compression of the ellipsoid
See also
Notes
The flattening (f) stem from the major- (a) en minor-axis (b) via:
\[f = (a - b)/a\]or via the eccentricity (e):
\[f = 1 - \sqrt{ 1 - e^2}\]
- s2d2.orbit_tools.earth_eccentricity() float[source]
get the eccentricity of the WGS84 ellipsoid
- Returns:
eccentricity – amount of deviation from circularity
- Return type:
See also
- s2d2.orbit_tools.earth_axes() tuple[float, float][source]
get axis length of the WGS84 ellipsoid
- Returns:
major_axis (float, unit=meter) – the largest axis of the ellipsoid
minor_axis (float, unit=meter) – the shortest axis of the ellipsoid
See also
- s2d2.orbit_tools.standard_gravity() float[source]
provide value for the standard gravitational parameter of the Earth
- Returns:
mu – standard gravity
- Return type:
float, unit= m**3 * s**-2
- s2d2.orbit_tools.calculate_correct_mapping(grid: s2d2.sentinel2_grid.Sentinel2Anglegrid, inclination: float = 98.5621, revolutions_per_day: float = 14.30824258387262, radius: float | None = None, mean_altitude: float | None = None)[source]
- Parameters:
grid (Sentinel2Anglegrid) –
- with the following entries:
- zenith{numpy.ndarray, numpy.masked.array}, size=(k,l,h)
observation angles of the different detectors/bands
- azimuth{numpy.ndarray, numpy.masked.array}, size=(k,l,h)
observation angles of the different detectors/bands
- bandnumpy.ndarray, size=(h,)
number of the band, corresponding to the third dimension of ‘zenith’
- detectornumpy.ndarray, size=(h,)
number of the detector, corresponding to the third dimension of ‘zenith’
- geotransformtuple, size=(6,)
geotransform of the grid of ‘zenit’ and ‘azimuth’
- crsosgeo.osr.SpatialReference() object
coordinate reference system (CRS)
inclination (float, unit=degrees) – angle of the orbital plane in relation to the equatorial plane
revolutions_per_day (float) – amount of revolutions a satellite platform performs around the Earth
mean_altitude (float, unit=meter) – estimate of mean satellite altitude above the Earth surface
- Returns:
l_time (numpy.ndarray, size=(p,), unit=seconds) – asd
lat, lon (float, unit=degrees) – ground location of the satelite at time 0
radius (float, unit=metre) – distance away from Earths’ center
inclination (unit=degrees) – tilt of the orbital plane in relation to the equator
period (float, unit=seconds) – time it takes to complete one revolution
time_para (numpy.ndarray, size=(p,b)) – polynomial fitting parameters for the different bands (b)
combos (numpy.ndarray, size=(h,2)) – combinations of band and detector pairs, corresponding to the third dimension of ‘grid.zenith’
- s2d2.orbit_tools.remap_observation_angles(lat, lon, radius, inclination, period, time_para, combos, x_grd, y_grd, det_stack, bnd_list, geotransform, crs)[source]
- s2d2.orbit_tools.acquisition_angles(p_x: numpy.ndarray, g_x: numpy.ndarray) tuple[numpy.ndarray, numpy.ndarray][source]
given satellite and ground coordinates, estimate observation angles
- s2d2.orbit_tools.line_of_sight(lat_arr: numpy.ndarray, lon_arr: numpy.ndarray, zn_arr: numpy.ndarray, az_arr: numpy.ndarray, eccentricity: float | None = None, major_axis: float | None = None) tuple[numpy.ndarray, numpy.ndarray][source]
- Parameters:
lat_arr (numpy.ndarray, size=(m,n), unit=degrees) – location of observation angles
lon_arr (numpy.ndarray, size=(m,n), unit=degrees) – location of observation angles
zn_arr (numpy.ndarray, size=(m,n), unit=degrees) – polar angles of line of sight to the satellite, also known as, delcination and right ascension.
az_arr (numpy.ndarray, size=(m,n), unit=degrees) – polar angles of line of sight to the satellite, also known as, delcination and right ascension.
eccentricity (float) – eccentricity squared, if None default is WGS84 (6.69E-10)
major_axis (float, unit=meters) – length of the major axis, if None default is WGS84 (6.37E6)
- Returns:
sat (numpy.ndarray, size=(m*n,3)) – observation vector from ground location towards the satellite
g_x (numpy.ndarray, size=(m*n,3)) – ground location in Cartesian coordinates
- s2d2.orbit_tools.ground_vec(lat_arr: numpy.ndarray, lon_arr: numpy.ndarray, eccentricity: float | None = None, major_axis: float | None = None) numpy.ndarray[source]
get ground coordinates in Cartesian system
- Parameters:
lat_arr (numpy.ndarray, size=(m,n), unit=degrees) – location of observation angles
lon_arr (numpy.ndarray, size=(m,n), unit=degrees) – location of observation angles
eccentricity (float) – eccentricity squared, if None default is WGS84 (6.69E-10)
major_axis (float, unit=meters) – length of the major axis, if None default is WGS84 (6.37E6)
- Returns:
g_x – ground location in Cartesian coordinates
- Return type:
numpy.ndarray, size=(m*n,3)
- s2d2.orbit_tools.orbital_fitting(sat, g_x, inclination, lat=None, lon=None, radius=None, period=None, revolutions_per_day=None, mean_altitude=None, gps=None, convtol=0.001, orbtol=1.0, maxiter=20, printing=False)[source]
- Parameters:
sat (numpy.ndarray, size=(m*n,3)) – observation vector from ground location towards the satellite
g_x (numpy.ndarray, size=(m*n,3)) – ground location in Cartesian coordinates
lat (float, unit=degrees) – location of satellite within orbital track
lon (float, unit=degrees) – location of satellite within orbital track
radius (float, unit=meter) – radius towards the orbiting satellite
inclination (float, unit=degrees, range=-180...+180) – inclination of the orbital plane with the equatorial plane
period (float, unit=seconds) – time it takes to revolve one time around the Earth
- s2d2.orbit_tools._omega_lon_calculation(lat, lon, inclination)[source]
- Parameters:
lat ({float, numpy.array}, unit=radians) – location on the Earth
lon ({float, numpy.array}, unit=radians) – location on the Earth
inclination ({float, numpy.array}, unit=radians) – angle of the orbital plane i.r.t. the equator
- s2d2.orbit_tools.observation_calculation(ltime, sat, g_x, radius, inclination, period, omega_0, lon_0)[source]
- Parameters:
ltime (numpy.array, size=(m,1)) –
sat (numpy.ndarray, size=(m,3)) – observation vector from ground location towards the satellite
g_x (numpy.ndarray, size=(m,3)) – ground location in Cartesian coordinates
radius (float, unit=meter) – radius towards the orbiting satellite
inclination (float, unit=degrees, range=-180...+180) – inclination of the orbital plane with the equator
period (float, unit=seconds) – time it takes to revolve one time around the Earth
omega_0 (float, unit=degrees) – angle towards ascending node, one of the orbit Euler angles
lon_0 (float, unit=degrees) – ephemeris longitude
- Returns:
v_x
- Return type:
numpy.array, size=(m,3)
- s2d2.orbit_tools._pert_param(idx, pert, *args)[source]
perterp one of the arguments
- Parameters:
idx (integer, range=0...m-1) – index which of the arguments should be perturbed
pert ({float, numpy.array}) – amount of pertubation
args (tuple, size=m) – tuple with different arguments, with datatypes like arrays or floats
- Returns:
args – tuple with different arguments, with datatypes like arrays or floats
- Return type:
tuple, size=m