Skip to content

Commit

Permalink
nmea2snr ultra mod
Browse files Browse the repository at this point in the history
  • Loading branch information
kristinemlarson committed Jul 1, 2024
1 parent 23f2c0a commit 8d2c3cc
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 18 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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).

Expand Down
43 changes: 27 additions & 16 deletions gnssrefl/nmea2snr.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
]
setup(
name="gnssrefl",
version="3.5.7",
version="3.5.8",
author="Kristine Larson",
author_email="[email protected]",
description="A GNSS reflectometry software package ",
Expand Down

0 comments on commit 8d2c3cc

Please sign in to comment.