SGL-UT / GPSTk

ATTENTION: This repository has been moved and is for archival purposes only. GPSTk toolkit has been renamed to GNSSTK and has been split into two new separate repositories. GNSSTK now only contains libraries while the other repository GNSSTK-APPS contains only applications. The rename and split into libraries and applications started with version v12.0.0 on September 2021. GPSTk --> GNSSTK at https://gitlab.com/sgl-ut/gnsstk --> GNSSTK-APPS at https://gitlab.com/sgl-ut/gnsstk-apps
Other
339 stars 182 forks source link

Valid RINEX nav files are rejected #11

Closed butala closed 3 years ago

butala commented 8 years ago

Hi,

I am observing GPSTk fail reading (I think) valid RINEX nav files. For example, consider the broadcast nav message for DOY=302 2012:

ftp://cddis.gsfc.nasa.gov/gnss/data/daily/2012/302/12n/brdc3020.12n.Z

My conclusion that the file is valid is based on teqc:

$ teqc +version
executable:  teqc
version:     teqc  2013Mar15
build:       Linux 2.4.21-27.ELsmp|Opteron|gcc|Linux x86_64|=+
$ teqc +v brdc3020.12n
! Notice ! GPS week in RINEX GPS NAV = 688; (default) GPS week = 1898
teqc: 'brdc3020.12n' readable as RINEX V.2.00 format```

Note that teqc (in its documentation states that) checks TOC, TOE, and TOW epochs for consistency.

However, any GPSTk code that relies on OrbitEphStore fails, for example:

$ /home/butala/src/GPSTk/build-remote2-v2.8/ext/apps/Rinextools/RinNav brdc3020.12n
# RinNav, part of the GPS Toolkit, Ver 2.2 10/31/13, Run 2016/05/27 17:47:09
addEphemeris caught excp text 0:Unexpected matching beginValid time but not Toe, for GPS 9, beginValid= 2012/10/28 02:00:00 GPS, Toe(map)= 2012/10/28 02:00:00 GPS, Toe(candidate)= 2012/10/28 04:00:00 GPS
location 0:/home/butala/src/GPSTk/core/lib/GNSSEph/OrbitEphStore.cpp:231
location 1:/home/butala/src/GPSTk/core/lib/GNSSEph/OrbitEphStore.cpp:288
Exception: text 0:Unexpected matching beginValid time but not Toe, for GPS 9, beginValid= 2012/10/28 02:00:00 GPS, Toe(map)= 2012/10/28 02:00:00 GPS, Toe(candidate)= 2012/10/28 04:00:00 GPS
location 0:/home/butala/src/GPSTk/core/lib/GNSSEph/OrbitEphStore.cpp:231
location 1:/home/butala/src/GPSTk/core/lib/GNSSEph/OrbitEphStore.cpp:288
location 2:/home/butala/src/GPSTk/core/lib/GNSSEph/Rinex3EphemerisStore.cpp:174
location 3:/home/butala/src/GPSTk/core/lib/GNSSEph/Rinex3EphemerisStore.cpp:181
location 4:/home/butala/src/GPSTk/ext/apps/Rinextools/RinNav.cpp:814

I was wondering if you could please help. Is the problem with the RINEX nav file or with GPSTk?

butala commented 8 years ago

This looks like a duplicate of the issue brought up in #9 --- I posted the issue before looking over existing issues. Apologies. Keeping issue open to communicate that I am not alone in seeking a fix.