s2d2.orbit_tools

Module Contents

Functions

wgs84_param()

earth_eccentricity()

earth_axes()

standard_gravity()

provide value for the standard gravitational parameter of the Earth

transform_rpy_xyz2ocs(xyz, uvw, roll, pitch, yaw, ...)

estimate_inclination_via_xyz_uvw(xyz, uvw)

calculate_correct_mapping(Zn_grd, Az_grd, bnd, det, ...)

param Zn_grd:

observation angles of the different detectors/bands

remap_observation_angles(Ltime, lat, lon, radius, ...)

get_absolute_timing(lat, lon, sat_dict)

acquisition_angles(Px, Gx)

given satellite and ground coordinates, estimate observation angles

line_of_sight(Lat, Lon, Zn, Az[, eccentricity, major_axis])

param Lat:

location of observation angles

ground_vec(Lat, Lon[, eccentricity, major_axis])

get ground coordinates in Cartesian system

_make_timing_system(IN, dX, dY, Ltime)

time_fitting(Ltime, Az, Zn, bnd, det, X, Y, geoTransform)

orbital_fitting(Sat, Gx[, lat, lon, radius, ...])

param Sat:

observation vector from ground location towards the satellite

_omega_lon_calculation(φ, λ, inclination)

param lat:

location on the Earth

_gc_calculation(ltime, period, inclination, ω_0, λ_0)

orbital_calculation(ltime, radius, inclination, ...)

observation_calculation(ltime, Sat, Gx, radius, ...)

param ltime:

_pert_param(idx, pert, *args)

perterp one of the arguments

partial_obs(ltime, Sat, Gx, φ, λ, radius, inclination, ...)

numerical differentiation, via pertubation of the observation vector

partial_tim(ltime, Sat, Gx, φ, λ, radius, inclination, ...)

s2d2.orbit_tools.wgs84_param()[source]
s2d2.orbit_tools.earth_eccentricity()[source]
s2d2.orbit_tools.earth_axes()[source]
s2d2.orbit_tools.standard_gravity()[source]

provide value for the standard gravitational parameter of the Earth

Returns:

μ – standard gravity

Return type:

float, unit: m**3 * s**-2

s2d2.orbit_tools.transform_rpy_xyz2ocs(xyz, uvw, roll, pitch, yaw, xyz_time, ang_time)[source]
s2d2.orbit_tools.estimate_inclination_via_xyz_uvw(xyz, uvw)[source]
s2d2.orbit_tools.calculate_correct_mapping(Zn_grd, Az_grd, bnd, det, grdTransform, crs, sat_dict=None)[source]
Parameters:
  • Zn_grd ({numpy.ndarray, numpy.masked.array}, size=(k,l,h)) – observation angles of the different detectors/bands

  • Az_grd ({numpy.ndarray, numpy.masked.array}, size=(k,l,h)) – observation angles of the different detectors/bands

  • bnd (numpy.ndarray, size=(h,)) – number of the band, corresponding to the third dimension of ‘Zn_grd’

  • det (numpy.ndarray, size=(h,)) – number of the detector, corresponding to the third dimension of ‘Zn_grd’

  • grdTransform (tuple, size=(8,)) – geotransform of the grid of ‘Zn_grd’ and ‘Az_grd’

  • crs (osgeo.osr.SpatialReference() object) – coordinate reference system (CRS)

  • sat_dict (dictonary) –

    metadata of the satellite platform, preferably having the following elements:

    • ’inclination’

    • ’revolutions_per_day’

    • ’altitude’

Returns:

  • Ltime (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 ‘Zn_grd’

s2d2.orbit_tools.remap_observation_angles(Ltime, lat, lon, radius, inclination, period, time_para, combos, X_grd, Y_grd, det_stack, bnd_list, geoTransform, crs)[source]
s2d2.orbit_tools.get_absolute_timing(lat, lon, sat_dict)[source]
s2d2.orbit_tools.acquisition_angles(Px, Gx)[source]

given satellite and ground coordinates, estimate observation angles

s2d2.orbit_tools.line_of_sight(Lat, Lon, Zn, Az, eccentricity=None, major_axis=None)[source]
Parameters:
  • Lat (numpy.ndarray, size=(m,n), unit=degrees) – location of observation angles

  • Lon (numpy.ndarray, size=(m,n), unit=degrees) – location of observation angles

  • Zn (numpy.ndarray, size=(m,n), unit=degrees) – polar angles of line of sight to the satellite, also known as, delcination and right ascension.

  • Az (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

  • Gx (numpy.ndarray, size=(m*n,3)) – ground location in Cartesian coordinates

s2d2.orbit_tools.ground_vec(Lat, Lon, eccentricity=None, major_axis=None)[source]

get ground coordinates in Cartesian system

Parameters:
  • Lat (numpy.ndarray, size=(m,n), unit=degrees) – location of observation angles

  • Lon (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:

Gx – ground location in Cartesian coordinates

Return type:

numpy.ndarray, size=(m*n,3)

s2d2.orbit_tools._make_timing_system(IN, dX, dY, Ltime)[source]
s2d2.orbit_tools.time_fitting(Ltime, Az, Zn, bnd, det, X, Y, geoTransform)[source]
s2d2.orbit_tools.orbital_fitting(Sat, Gx, lat=None, lon=None, radius=None, inclination=None, period=None, sat_dict=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

  • Gx (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 equator

  • period (float, unit=seconds) – time it takes to revolve one time around the Earth

  • sat_dict (dictonary) –

s2d2.orbit_tools._omega_lon_calculation(φ, λ, 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._gc_calculation(ltime, period, inclination, ω_0, λ_0)[source]
s2d2.orbit_tools.orbital_calculation(ltime, radius, inclination, period, ω_0, λ_0)[source]
s2d2.orbit_tools.observation_calculation(ltime, Sat, Gx, radius, inclination, period, ω_0, λ_0)[source]
Parameters:
  • ltime (numpy.array, size=(m,1)) –

  • Sat (numpy.ndarray, size=(m,3)) – observation vector from ground location towards the satellite

  • Gx (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

  • ω_0 (float, unit=degrees) – angle towards ascending node, one of the orbit Euler angles

  • λ_0 (float, unit=degrees) – ephemeris longitude

Returns:

Vx

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

s2d2.orbit_tools.partial_obs(ltime, Sat, Gx, φ, λ, radius, inclination, period)[source]

numerical differentiation, via pertubation of the observation vector

s2d2.orbit_tools.partial_tim(ltime, Sat, Gx, φ, λ, radius, inclination, period, pertubation=0.1)[source]