forked from kristinemlarson/gnssIR_python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheasy_llh.py
More file actions
25 lines (22 loc) · 670 Bytes
/
easy_llh.py
File metadata and controls
25 lines (22 loc) · 670 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# -*- coding: utf-8 -*-
"""
# Kristine m. Larson
removed station input
"""
import sys
import numpy as np
import math
import gps as g
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("x", help="X coordinate (m) ", type=float)
parser.add_argument("y", help="Y coordinate (m) ", type=float)
parser.add_argument("z", help="Z coordinate (m) ", type=float)
#parser.add_argument("station", help="station ", type=str)
args = parser.parse_args()
#station = args.station
x=args.x; y=args.y; z=args.z
xyz = [x, y, z]
# calculate llh in degrees (and meters)
lat,lon,h = g.xyz2llhd(xyz)
print("Lat Lon Ht (deg deg m) %12.7f %12.7f %9.3f " % (lat, lon, h) )