georust / rinex

RINEX and GNSS data processing :artificial_satellite:
Apache License 2.0
63 stars 14 forks source link

Panics on loading V2 data with empty constellation #228

Closed sjfawks closed 2 months ago

sjfawks commented 3 months ago

When loading current data from NASA (which uses RINEX version 2) it panics when it has a blank constellation. Using data from NASA requires a username and password, but the link is: https://cddis.nasa.gov/archive/gnss/data/daily/2024/brdc/brdc0990.24n.gz

The header from the RINEX we see is

2              NAVIGATION DATA                         RINEX VERSION / TYPE
CCRINEXN V1.6.0 UX  CDDIS               08-APR-24 17:18     PGM / RUN BY / DATE 
IGS BROADCAST EPHEMERIS FILE                                COMMENT             
    0.2142D-07  0.1490D-07 -0.1192D-06 -0.5960D-07          ION ALPHA           
    0.1208D+06  0.3277D+05 -0.2621D+06  0.1311D+06          ION BETA            
    0.931322574615D-09 0.355271367880D-14   319488     2309 DELTA-UTC: A0,A1,T,W
    18                                                      LEAP SECONDS        
                                                            END OF HEADER       
1 24  4  8  0  0  0.0 0.178544782102D-03 0.238742359215D-11 0.000000000000D+00
    0.450000000000D+02-0.582500000000D+02 0.359050670187D-08-0.282724798209D+01

The RINEX Version 2 requirement is that it support "blank" constellation, but none of the test files used in your repo have this.

10. RINEX VERSION 2 FORMAT DEFINITIONS AND EXAMPLES

 +----------------------------------------------------------------------------+
 |                                   TABLE A1                                 |
 |             OBSERVATION DATA FILE - HEADER SECTION DESCRIPTION             |
 +--------------------+------------------------------------------+------------+
 |    HEADER LABEL    |               DESCRIPTION                |   FORMAT   |
 |  (Columns 61-80)   |                                          |            |
 +--------------------+------------------------------------------+------------+
 |RINEX VERSION / TYPE| - Format version (2)                     |   I6,14X,  |
 |                    | - File type ('O' for Observation Data)   |   A1,19X,  |
 |                    | - Satellite System: blank or 'G': GPS    |   A1,19X   |
 |                    |                     'R': GLONASS         |            |
 |                    |                     'T': NNSS Transit    |            |
 |                    |                     'M': Mixed           |            |

This just looks like an oversight and should be an easy fix.