Skip to content

Commit

Permalink
Merge pull request #34 from AndreHauschild/main
Browse files Browse the repository at this point in the history
  • Loading branch information
hirokawa committed Oct 24, 2023
2 parents fd514cb + db2ccce commit 5228e89
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ It supports the following open format:
************************************************
Click this button for a quick demo in Google Colab


<a target="_blank" href="https://colab.research.google.com/github/hirokawa/cssrlib/blob/main/tutorials/cssrlib.ipynb">
<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
</a>
Expand Down
13 changes: 9 additions & 4 deletions src/cssrlib/peph.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ def parse_sp3(self, fname, nav, opt=0):
print("invalid version: {:s}".format(self.ver))
break
self.flag = line[2]
if self.flag not in ('P', 'V'):
print("invalid P/V flag: {:s}".format(self.flag))
break
self.t0 = str2time(line, 3, 27)
self.status = 1
elif self.status == 1:
Expand Down Expand Up @@ -129,7 +132,7 @@ def parse_sp3(self, fname, nav, opt=0):
self.scl[0] = float(line[3:13])
self.scl[1] = float(line[14:26])
self.status = 10
for k in range(3):
for _ in range(3):
line = fh.readline()
continue
self.parse_acclist(line)
Expand All @@ -140,10 +143,12 @@ def parse_sp3(self, fname, nav, opt=0):
nav.ne += 1
self.cnt = 0
peph = peph_t(str2time(line, 3, 27))
# print("{:4.0f}/{:02.0f}/{:02.0f} {:2.0f}:{:2.0f}:{:5.2f}"\
# .format(ep[0],ep[1],ep[2],ep[3],ep[4],ep[5]))
# ep = time2epoch(peph.time)
# print("{:4.0f}/{:02.0f}/{:02.0f} {:2.0f}:{:2.0f}:{:5.2f}"
# .format(ep[0], ep[1], ep[2], ep[3], ep[4], ep[5]))

for k in range(self.nsat):
nline = self.nsat if self.flag == 'P' else self.nsat*2
for _ in range(nline):
line = fh.readline()
if line[0] != 'P' and line[0] != 'V':
continue
Expand Down

0 comments on commit 5228e89

Please sign in to comment.