Skip to content

Commit

Permalink
reference compare
Browse files Browse the repository at this point in the history
  • Loading branch information
scivision committed Oct 31, 2018
1 parent 25884b2 commit 457dd39
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test_kepler.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import xarray
import georinex as gr
from datetime import datetime, timedelta
import numpy as np

TGPS0 = datetime(1980, 1, 6)

Expand All @@ -28,6 +29,10 @@
'M0': 2.24295542,
}

xref = -5.67841101e6
yref = -2.49239629e7
zref = 7.05651887e6

time = TGPS0 + timedelta(weeks=910, seconds=4.03272930e5)

dat = xarray.Dataset(sv, attrs={'svtype': 'G'},
Expand All @@ -36,3 +41,6 @@
x, y, z = gr.keplerian2ecef(dat)

print(x, y, z)

magerr = np.sqrt((x-xref)**2 + (y-yref)**2 + (z-zref)**2)
print('error magnitude [meters]', magerr)

0 comments on commit 457dd39

Please sign in to comment.