Skip to content

Commit df6badf

Browse files
committed
- SBAS: fixed igp index, reference time.
1 parent 54ba202 commit df6badf

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/cssrlib/sbas.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def searchIGP(t, posp, cs):
102102
if band not in cs.vtec or band not in cs.givei:
103103
continue
104104

105-
gp = cs.igp_t[band]
105+
gp = cs.igp_t[band][cs.igp_idx[band]]
106106
for i in range(4):
107107
idx = np.where((gp[:, 0] == latp[i]) & (gp[:, 1] == lonp[i]))[0]
108108
if len(idx) == 0:
@@ -158,10 +158,12 @@ def ionoSBAS(t, pos, az, el, cs):
158158
if err:
159159
return diono, var
160160

161+
t0_igp = cs.lc[cs.inet].t0[0][sCType.VTEC]
162+
161163
for i in range(4):
162164
if i not in igp:
163165
continue
164-
dt = timediff(t, cs.t0_igp)
166+
dt = timediff(t, t0_igp)
165167
diono += w[i]*igp[i][0]
166168
var += w[i]*givei_t[igp[i][1]]*9e-8*abs(dt)
167169

0 commit comments

Comments
 (0)