diff --git a/CHANGELOG.md b/CHANGELOG.md index 21b86ff2f..80bdfd804 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## 3.5.8 +At request for Felipe Nevinski, I am having the ultra orbit option in nmea2snr check for three different files. +I am skeptical ... but I could be wrong. + ## 3.5.7 small issue with bkg high rate downloads. now fixed. diff --git a/README.md b/README.md index dc9f5f7c0..af3feefe1 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# gnssrefl v3.5.7 +# gnssrefl v3.5.8 gnssrefl is an open source software package for GNSS interferometric reflectometry (GNSS-IR). diff --git a/gnssrefl/nmea2snr.py b/gnssrefl/nmea2snr.py index 5d135797c..f7aec35de 100644 --- a/gnssrefl/nmea2snr.py +++ b/gnssrefl/nmea2snr.py @@ -66,6 +66,11 @@ def nmea_translate(locdir, fname, snrfile, csnr, dec, year, doy, recv, sp3, gzip Note from KL: I believe lowercase is also allowed (and preferred), but the A at the end is still set to be upper case (I believe) The SNR files are stored with upper case if given upper case, lower case if given lower case. + At request of Felipe Nievinski, the ultra option (which points to GFZ ultrarapid orbits) will + first look for the orbit on (requested doy, hour 0), then (doy-1, hour 0), and then (doy-1, hour 12). + I do not think this first search is correct - but I don't think it makes the code crash so I will + keep it there for now. + Parameters ----------- locdir : str @@ -113,33 +118,39 @@ def nmea_translate(locdir, fname, snrfile, csnr, dec, year, doy, recv, sp3, gzip xf,orbdir,foundit = g.get_wuhan_orbits(year,doy-1,0,12) if orb == 'ultra': - if (doy == 1): - xf,orbdir,foundit = g.new_ultra_gfz_orbits(year-1,12,31,hour) - else: - xf,orbdir,foundit = g.new_ultra_gfz_orbits(year,doy-1,0,hour) - if not foundit: - print('Try noon from previous day') - if ((doy-1) == 1): - xf,orbdir,foundit = g.new_ultra_gfz_orbits(year-1,12,31,12) - else: - xf,orbdir,foundit = g.new_ultra_gfz_orbits(year,doy-2,0,12) + # first try given doy + xf,orbdir,foundit = g.new_ultra_gfz_orbits(year,doy,0,hour=0) + # now try doy before + if not foundit: + if (doy == 1): + xf,orbdir,foundit = g.new_ultra_gfz_orbits(year-1,12,31,hour) + else: + xf,orbdir,foundit = g.new_ultra_gfz_orbits(year,doy-1,0,hour) + if not foundit: + print('Try ultrarapid orbit from noon on the previous day') + if ((doy-1) == 1): + xf,orbdir,foundit = g.new_ultra_gfz_orbits(year-1,12,31,12) + else: + xf,orbdir,foundit = g.new_ultra_gfz_orbits(year,doy-2,0,12) else: # the old way is to try multiple orbit sources if (year+doy/365.25) < gfz_date: # someone needs to link to new code for newer final orbits xf,orbdir,foundit=g.gbm_orbits_direct(year,month,day) else: - print('Could not find the precise GNSS orbits from GFZ. Try Rapid GFZ ') + print('Try Rapid orbit products from GFZ ') xf,orbdir,foundit=g.rapid_gfz_orbits(year,month,day) if not foundit: - print('Could not find the rapid orbits from GFZ. Try ultra') + print('Could not find the rapid orbits from GFZ. Try ultrarapid') if (year + doy/365.25) > gfz_date: print('Use new GFZ directory for ultra rapid orbits with the long filenames') - if doy == 1: - xf,orbdir,foundit = g.new_ultra_gfz_orbits(year-1,12,31,hour) - else: - xf,orbdir,foundit = g.new_ultra_gfz_orbits(year,doy-1,0,hour) + xf,orbdir,foundit = g.new_ultra_gfz_orbits(year,doy, 0,hour=0) + if not foundit: + if doy == 1: + xf,orbdir,foundit = g.new_ultra_gfz_orbits(year-1,12,31,hour=0) + else: + xf,orbdir,foundit = g.new_ultra_gfz_orbits(year,doy-1,0,hour=0) else: print('use old GFZ directory structure') xf,orbdir,foundit = g.ultra_gfz_orbits(year,month,day,0) diff --git a/setup.py b/setup.py index 77a473304..3dcb8d279 100644 --- a/setup.py +++ b/setup.py @@ -42,7 +42,7 @@ ] setup( name="gnssrefl", - version="3.5.7", + version="3.5.8", author="Kristine Larson", author_email="kristinem.larson@gmail.com", description="A GNSS reflectometry software package ",