forked from geospace-code/pymap3d
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvreckon
More file actions
executable file
·18 lines (15 loc) · 726 Bytes
/
vreckon
File metadata and controls
executable file
·18 lines (15 loc) · 726 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env python
from pymap3d.vreckon import vreckon
if __name__ == '__main__': # pragma: no cover
from argparse import ArgumentParser
p = ArgumentParser(description='Python port of vreckon.m')
p.add_argument('lat', help='latitude WGS-84 [degrees]', type=float)
p.add_argument('lon', help='longitude WGS-84 [degrees]', type=float)
p.add_argument(
'range', help='range traversed from start point [meters]', type=float)
p.add_argument('azimuth', help='azimuth to start [deg.]', type=float)
p = p.parse_args()
lat2, lon2, a21 = vreckon(p.lat, p.lon, p.range, p.azimuth)
print('new lat =', lat2)
print('new lon =', lon2)
print('az back to start:', a21)