gnssrefl.refl_zones module

gnssrefl.refl_zones.FresnelZone(f, e, h)

based on GPS Tool Box Roesler and Larson (2018). Original source is Felipe Nievinski as published in the appendix of Larson and Nievinski 2013 this code assumes a horizontal, untilted reflecting surface

Parameters:
  • f (int) – frequency (1,2, or 5)

  • e (float) – elevation angle (deg)

  • h (float) – reflector height (m)

Returns:

firstF – [a, b, R ] in meters where: a : is the semi-major axis, aligned with the satellite azimuth b : is the semi-minor axis R : locates the center of the ellispe on the satellite azimuth direction (theta)

Return type:

list of floats

gnssrefl.refl_zones.calcAzEl_new(prn, newf, recv, u, East, North)

function to gather azel for all low elevation angle data this is used in the reflection zone mapping tool

Parameters:
  • prn (int) – satellite number

  • newf (3 vector of floats) – cartesian coordinates of the satellite (meters)

  • recv (3 vector of floats) – receiver coordinates (meters)

  • u (3 vector) – cartesian unit vector for up

  • East (3 vector) – cartesian unit vector for east direction

  • North (3 vector) – cartesian unit vector for north direction

Returns:

tv – list of satellite tracks [prn number, elevation angle, azimuth angle]

Return type:

numpy array of floats

gnssrefl.refl_zones.calcAzEl_newish(prn, newf, recv, u, East, North)

should be consolidated with the other function.but who has the time!

Parameters:
  • prn (int) – satellite number ?

  • newf

  • u (numpy array) – up unit vector

  • East

  • North

Returns:

tv

Return type:

numpy array

gnssrefl.refl_zones.makeEllipse_latlon(freq, el, h, azim, latd, lngd)

for given fresnel zone, produces coordinates of an ellipse

Parameters:
  • freq (int) – frequency

  • el (float) – elevation angle in degrees

  • h (float) – reflector height in meters

  • azim (float) – azimuth in degrees

  • latd (float) – latitude in degrees

  • lngd (float) – longitude in degrees

Returns:

  • lngdnew (float) – new longitudes in degrees

  • latdnew (float) – new latitudes in degrees

gnssrefl.refl_zones.makeFresnelEllipse(A, B, center, azim)

make an Fresnel zone given size, center, and orientation

Parameters:
  • A (float) – semi-major axis of ellipse in meters

  • B (float) – semi-minor axis of ellipse in meters

  • center (float) – center of the ellipse, provided as distance along the satellite azimuth direction

  • azimuth (float) – azimuth angle of ellipse in degrees. this will be clockwise positive as defined from north

Returns:

  • x (numpy array of floats) – x value of cartesian coordinates of ellipse

  • y (numpy array of floats) – y value of cartesian coordinates of ellipse

  • xcenter (float) – x value for center of ellipse in 2-d cartesian

  • ycenter (float) – y value for center of ellipse in 2-d cartesian

gnssrefl.refl_zones.make_FZ_kml(station, filename, freq, el_list, h, lat, lng, azlist)

makes fresnel zones for given azimuth and elevation angle lists.

Parameters:
  • station (str) – four character station name

  • filename (str) – output filename (the kml extension should already be there)

  • freq (int) – frequency (1,2, or 5)

  • el_list (list of floatss) – elevation angles

  • h (float) – reflector height in meters

  • lat (float) – latitude in deg

  • lng (float) – longitude in degrees

  • azlist (list of floats) – azimuths

gnssrefl.refl_zones.nyquist_simple(t, elev, azims, emin, emax, azriseset, reqsamplerate)

given numpy array of elevation angles (elev) and limtis (emin,emax) and azriseset, reqsamplerate

Parameters:
  • t – cannot remember

  • elev (numpy array of floats) – elevation angle of rising/setting arcs

  • azims (numpy array of floats) – azimuths of rising/setting arcs

  • emin (float) – minimum elevation angle, degrees

  • emax (float) – maximum elevation angle, degrees

  • azriseset – cannot remember

  • reqsamplerate (float) – requested receiver sampling rate

gnssrefl.refl_zones.rising_setting_new(recv, el_range, obsfile)

Calculates potential rising and setting arcs

Parameters:
  • recv (list of floats) – Cartesian coordinates of station in meters

  • el_range (list of floats) – elevation angles in degrees

  • obsfile (str) – orbit filename

Returns:

azlist – azimuth angle (deg), PRN, elevation angle (Deg)

Return type:

list of floats

gnssrefl.refl_zones.save_reflzone_orbits()

check that orbit files exist for reflection zone code. downloads to $REFL_CODE$/Files directory if needed

Returns:

foundfiles – whether needed files were found

Return type:

bool

gnssrefl.refl_zones.set_azlist_multi_regions(sectors, azlist)

edits initial azlist to restrict to given azimuth sectors. assumes that illegal list of sectors have been checked (i.e. no negative azimuths, they should be pairs, and increasing)

Parameters:
  • sectors (list of floats) – min and max azimuth (degrees). Must be in pairs, no negative numbers

  • azlist (list of floats) – list of tracks, [azimuth angle, satNumber, elevation angle ]

Returns:

azlist2 – same format as before, but with azimuths removed outside the restricted zones

Return type:

list of floats

gnssrefl.refl_zones.set_final_azlist(a1ang, a2ang, azlist)

edits initial azlist to restrict to given azimuths

Parameters:
  • a1ang (float) – minimum azimuth (degrees)

  • a2ang (float) – maximum azimuth (degrees)

  • azlist (list of floats) – list of tracks, [azimuth angle, satNumber, elevation angle ]

Returns:

azlist

Return type:

list of floats

gnssrefl.refl_zones.set_system(system)

finds the file needed to compute orbits for reflection zones

Parameters:
  • system (str) – gps,glonass,beidou, or galileo

  • it (int) – simple pointer from former code. 1 is GPS, 2 is Glonass etc

Returns:

orbfile – orbit filename with Cartesian coordinates for one day

Return type:

str

gnssrefl.refl_zones.write_coords(lng, lat)
Parameters:
  • lng (list of floats) – longitudes in degrees

  • lat (list of floats) – latitudes in degrees

Returns:

points – for google maps

Return type:

list of pairs of long/lat