gnssrefl.nmea2snr_cl module

gnssrefl.nmea2snr_cl.nmea2snr(station: str, year: int, doy: int, snr: int = 66, year_end: int = None, doy_end: int = None, overwrite: bool = False, dec: int = 1, lat: float = None, lon: float = None, height: float = None, risky: bool = False, gzip: bool = True)

This code creates SNR files from NMEA files.

The NMEA files should be stored in $REFL_CODE/nmea/ssss/2023 for station ssss and year 2023 or $REFL_CODE/nmea/SSSS/2023 for station SSSS. The NMEA files should be named SSSS1520.23.A or ssss1520.23.A, where the day of year is 152 and year is 2023 in this example.

The SNR files created are stored with upper case if given upper case, lower case if given lower case. Currently I have left the last character in the file name as it was given to me - capital A. If this should be lower case for people that use lowercase station names, please let me know. As far as I can tell, the necessary fields in the NMEA files are GPGGA and GPGSV.

Originally this code used interpolations of the az and el NMEA fields. I have decided this is DANGEROUS. If you really want to use those low-quality measurements, you have to say -risky T

The default usage is to use multi-GNSS orbits from GFZ. To compute az-el, you need to provide a priori station coordinates. You can submit those on the command line or it will read them from the $REFL_CODE/input/ssss.json file (for station ssss or SSSS) if it exists.

As of 2023 September 14, the SNR files are defined in GPS time, which is how the file is defined. Prior to version 1.7.0, if you used the sp3 option, the SNR files were written in UTC. This led to the orbits being propagated to the wrong time and thus az-el values are biased. The impact on RH is not necessarily large - but you should be aware. The best thing to do is remake your SNR files.

As for March 16, 2024, this code has been changed to use gnssrefl standards for inputs and outputs. The code, in principle, now looks for final, rapid, and ultra rapid orbits from GFZ, in that order.

  • station (str) – 4 ch name of station

  • year (int) – full year

  • doy (int) – day of year

  • snr (int, optional) – snr file type (default is 66); 99: 5-30 deg.; 66: < 30 deg.; 88: all data; 50: < 10 deg

  • year_end (int, optional) – final year

  • doy_end (int, optional) – final day of year

  • overwrite (bool, optional) – whether make a new SNR file even if one already exists

  • dec (int, optional) – decimation in seconds

  • lat (float, optional) – latitude, deg,

  • lon (float, optional) – longitude, deg

  • height (float, optional) – ellipsoidal height, m

  • risky (bool, optional) – confirm you want to use low quality orbits (default is False)

  • gzip (bool, optional) – compress SNR files after creation. Default is true


nmea2snr wesl 2023 8 -dec 5

makes SNR file with decimation of 5 seconds with good orbits

nmea2snr wesl 2023 8

makes SNR file with original sampling rate and good orbits

nmea2snr xyz2 2023 8 -lat 40.2342 -lon -120.32424 -height 12

makes SNR file with user provided station coordinates and good orbits