Skip to content

Commit

Permalink
Merge pull request #35 from AndreHauschild/devel
Browse files Browse the repository at this point in the history
Enable RTCM3 PPP test in workflow
  • Loading branch information
hirokawa authored Jul 10, 2024
2 parents 79db999 + 3eddb83 commit 066e7b4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 26 deletions.
1 change: 0 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ jobs:
export PYTHONPATH="../cssrlib/src:$PYTHONPATH"
cd ./samples
for file in $(find . -name "*.py"); do
if [ "$file" == "./test_ppprtcm.py" ]; then continue; fi
echo "# Execute $file"
echo "#"
python "$file" > /dev/null
Expand Down
41 changes: 16 additions & 25 deletions samples/ssr2sp3.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,6 @@ def file2time(year, fileName):
print("ERROR: unkown SSR format for {}!".format(ssrfiles[0]))
sys.exit(1)

# Load SSR corrections
#
v = np.array([], dtype=dtype)
for ssrfile in ssrfiles:
v = np.append(v, np.genfromtxt(ssrfile, dtype=dtype))

# Output files
#
orbfile = '{}_{:4d}{:03d}{:02d}00_01D_{}_ORB.SP3'\
Expand Down Expand Up @@ -218,21 +212,27 @@ def file2time(year, fileName):

# Setup SSR decoder
#
if 'gale6' in ssrfile:
if 'gale6' in ssrfiles[0]:
cs = cssr_has()
file_gm = baseDirName+'Galileo-HAS-SIS-ICD_1.0_Annex_B_Reed_Solomon_Generator_Matrix.txt'
gMat = np.genfromtxt(file_gm, dtype="u1", delimiter=",")
elif 'qzsl6' in ssrfile:
elif 'qzsl6' in ssrfiles[0]:
cs = cssr()
cs.cssrmode = sc.QZS_MADOCA
elif "bdsb2b" in ssrfile:
elif "bdsb2b" in ssrfiles[0]:
cs = cssr_bds()
else:
print("ERROR: unkown SSR format for {}!".format(ssrfile))
print("ERROR: unkown SSR format for {}!".format(ssrfiles[0]))
sys.exit(1)

cs.monlevel = 0

# Load SSR corrections
#
v = np.array([], dtype=dtype)
for ssrfile in ssrfiles:
v = np.append(v, np.genfromtxt(ssrfile, dtype=dtype))

# Load ANTEX data for satellites and stations
#
atx = atxdec()
Expand Down Expand Up @@ -275,7 +275,9 @@ def file2time(year, fileName):
cs.week = week
cs.tow0 = tow//3600*3600

if 'gale6' in ssrfile:
hasNew = False

if cs.cssrmode == sc.GAL_HAS_SIS:

buff = unhexlify(vi['nav'])
i = 14
Expand Down Expand Up @@ -317,7 +319,7 @@ def file2time(year, fileName):
rec = []
mid_ = -1

elif 'qzsl6' in ssrfile:
elif cs.cssrmode == sc.QZS_MADOCA:

if vi['type'] != l6_ch or vi['prn'] != prn_ref:
continue
Expand All @@ -330,7 +332,7 @@ def file2time(year, fileName):
hasNew = True
time = cs.time

elif "bdsb2b" in ssrfile:
elif cs.cssrmode == sc.BDS_PPP:

if vi['prn'] != prn_ref:
continue
Expand Down Expand Up @@ -391,16 +393,6 @@ def file2time(year, fileName):
print("ERROR: invalid sytem {}".format(sys2str(sys)))
continue

elif cs.cssrmode == sc.GAL_HAS_IDD:

if sys == ug.GPS:
sig0 = (rSigRnx("GC1C"),)
elif sys == ug.GAL:
sig0 = (rSigRnx("EC1C"),)
else:
print("ERROR: invalid sytem {}".format(sys2str(sys)))
continue

elif cs.cssrmode == sc.BDS_PPP:

if sys == ug.GPS:
Expand Down Expand Up @@ -446,8 +438,7 @@ def file2time(year, fileName):

# Fix GPS L2 P(Y) signal code for Galileo HAS
#
if cs.cssrmode in (sc.GAL_HAS_SIS, sc.GAL_HAS_IDD) and \
rSigRnx('GC2P') == sig_:
if cs.cssrmode == sc.GAL_HAS_SIS and rSigRnx('GC2P') == sig_:
sig_ = sig_.toAtt('W')

if sat_ not in biases.keys():
Expand Down

0 comments on commit 066e7b4

Please sign in to comment.