gnssrefl.refraction module

written in python from from original TU Vienna codes for GMF

gnssrefl.refraction.Equvilent_Angle_Corr_NITE(Hr_apr, e_T, N_ant, ztd_ant, mpf_tot, dmpf_de_tot)

NITE formula equvilent angle correction and forward model From Peng et al. 2023

Parameters:
  • Hr_apr (float) – a priori reflector height, meters

  • e_T (float) – elevation angle - units!!!!!

  • N_ant (float) – antenna refractivity

  • ztd_ant (float) – total zenith tropo delay, meters

  • mpf_tot (float) –

  • dmpf_de_tot (float) –

Returns:

new_elev – new elevation angle, units?

Return type:

float

gnssrefl.refraction.Hv_Hr_ratio(Hr, Re, e_A)

no documentation provided # in meter, in meter, in degree

gnssrefl.refraction.N_layer(N_antenna, Hr)

no documentation

#in ppm, in meter # average refractivity in the layer between GNSS antenna and sea surface

gnssrefl.refraction.Ulich_Bending_Angle(ele, N0, lsp, p, T, ttime, sat)

Ulich, B. L. “Millimeter wave radio telescopes: Gain and pointing characteristics.” (1981)

Author: 20220629, fengpeng modified to use numpy so I can do arrays

currently writes out corrections to a file for testing

Parameters:
  • ele (numpy array of floats) – true elevation angle, degrees

  • N0 (float) – antenna refractivity in ppm

Returns:

De – corrected elevation angle, deg

Return type:

numpy array of floats

gnssrefl.refraction.Ulich_Bending_Angle_original(ele, N0)

no documentation # input degree, ppm

gnssrefl.refraction.corr_el_angles(el_deg, press, temp)

Corrects elevation angles for refraction using simple angle bending model

Parameters:
  • el_deg (numpy array of floats) – elevation angles in degrees

  • press (float) – pressure in hPa

  • temp (float) – temperature in degrees C

Returns:

corr_el_deg – corrected elevation angles (in degrees)

Return type:

numpy array of floats

gnssrefl.refraction.dH_curve(Hr, Re, e_A)

no documentation provided # in meter, in meter, in degree #vertial displacement of the reflection point vs. a “plane reflection”

gnssrefl.refraction.dmpf_dh(ele, dhgt)

no documentation # mapping function height correction by (Niell, 1996)

gnssrefl.refraction.gmf_deriv(dmjd, dlat, dlon, dhgt, zd)

This subroutine determines the Global Mapping Functions GMF and derivative. Translated from https://vmf.geo.tuwien.ac.at/codes/gmf_deriv.f by Peng Feng in March, 2023.

Johannes Boehm, 2005 August 30

ref 2006 Aug. 14: derivatives (U. Hugentobler) ref 2006 Aug. 14: recursions for Legendre polynomials (O. Montenbruck) ref 2011 Jul. 21: latitude -> ellipsoidal latitude

Parameters:
  • dmjd (float) – modified julian date

  • dlat (float) – ellipsoidal latitude in radians

  • dlon (float) – longitude in radians

  • dhgt (float) – height in m

  • zd (float) – zenith distance in radians ??? ( is this really what you mean??

Returns:

  • gmfh(2) (floats) – hydrostatic mapping function and derivative wrt z

  • gmfw(2) (floats) – wet mapping function and derivative wrt z

gnssrefl.refraction.gpt2_1w(station, dmjd, dlat, dlon, hell, it)
Parameters:
  • station (str) – station name

  • dmjd (float) – modified Julian date (scalar, only one epoch per call is possible)

  • dlat (float) – ellipsoidal latitude in radians [-pi/2:+pi/2]

  • dlon (float) – longitude in radians [-pi:pi] or [0:2pi]

  • hell (float) – ellipsoidal height in m

  • it (integer) –

    case 1: no time variation but static quantities

    case 0: with time variation (annual and semiannual terms)

Returns:

  • p (float) – pressure in hPa

  • T (float) – temperature in degrees Celsius

  • dT (float) – temperature lapse rate in degrees per km

  • Tm (float) – mean temperature of the water vapor in degrees Kelvin

  • e (float) – water vapor pressure in hPa

  • ah (float) – hydrostatic mapping function coefficient at zero height (VMF1)

  • aw (float) – wet mapping function coefficient (VMF1)

  • la (float) – water vapor decrease factor

  • undu (float) – geoid undulation in m

gnssrefl.refraction.look_for_pickle_file()

latest attempt to solve the dilemma of the pickle file needed for the refraction correction

Returns:

  • foundit (bool) – whether pickle file found

  • fullpname (str) – full path to the pickle file

gnssrefl.refraction.mpf_tot(gmf_h, gmf_w, zhd, zwd)

no documentation #convert seperate wet&dry MPF to total MPF

guessing

gmf_hfloat

?

gmf_wfloat

?

zhdfloat

zenith hydrostatic delay

zwdfloat

zenith wet delay

gnssrefl.refraction.readWrite_gpt2_1w(xdir, station, site_lat, site_lon)

makes a grid for refraction correction

Parameters:
  • xdir (str) – directory for output

  • station (str) – station name, 4 ch

  • lat (float) – latitude in degrees

  • lon (float) – longitude in degrees

gnssrefl.refraction.read_4by5(station, dlat, dlon, hell)

reads existing grid points for a given location

Parameters:
  • station (string) – name of station

  • dlat (float) – latitude in degrees

  • dlon (float) – longitude in degrees

  • hell (float) – ellipsoidal height in meters

Returns:

  • pgrid (4 by 5 numpy array) – pressure in hPa

  • Tgrid (4 by 5 numpy array) – temperature in C

  • Qgrid (4 by 5 numpy array)

  • dTgrid (4 by 5 numpy array) – temperature lapse rate in degrees per km

  • u (4 by 1 numpy array) – geoid undulation in meters

  • Hs (4 by 1 numpy array)

  • ahgrid (4 by 5 numpy array) – hydrostatic mapping function coefficient at zero height (VMF1)

  • awgrid (4 by 5 numpy array) – wet mapping function coefficient (VMF1)

  • lagrid (4 by 5 numpy array)

  • Tmgrid (4 by 5 numpy array) – mean temperature of the water vapor in degrees Kelvin

  • requires that an environment variable exists for REFL_CODE

gnssrefl.refraction.refrc_Rueger(drypress, vpress, temp)

Obtains refractivity index suitable for GNSS-IR

Rüeger, Jean M. “Refractive index formulae for radio waves.” Proceedings of the FIG XXII International Congress, Washington, DC, USA. Vol. 113. 2002.

Parameters:
  • drypress (float) – dry pressure hPa

  • vpress (float) – vapor pressure in hPa

  • temp (float) – temperature in Kelvin

Returns:

ref – [Ntotal, Nhydro, Nwet], which are total, hydrostatic and wet refractivity in ppm

Return type:

list of floats

gnssrefl.refraction.saastam2(press, lat, height)

no documentation in hPa, in degree, in meter Saastamion model with updated refractivity equation from Rüeger (2002)

as best i understand this it is the dry delay

gnssrefl.refraction.sita_Earth(Hr, e_A)

no documentation # in meter, in degree

gnssrefl.refraction.sita_Satellite(Hr, e_A)

no documentation # in meter, in degree # satellite angle between the reflection point and the GNSS antenna