Toggle navigation
Ocean Color Science Software
Jump to content
ocssw
V2022
web
ocssw
ocssw_src
src
nav_seahawk
hawknav
ned2ecr.py
Go to the documentation of this file.
1
def
ned2ecr
(lon,lat):
2
# Program to compute the transformation from North, East, Down to ECR
3
# at a given geodetic latitude and longitude
4
# input: lon, lat
5
# output: n2e
6
# Ported from ned2ecr.pro by Fred Patt
7
# Liang Hong, 2/19/2020
8
9
import
numpy
as
np
10
11
sla = np.sin(np.deg2rad(lat))
12
cla = np.cos(np.deg2rad(lat))
13
slo = np.sin(np.deg2rad(lon))
14
clo = np.cos(np.deg2rad(lon))
15
n = [-sla*clo,-sla*slo,cla]
16
e = [-slo,clo,0.0]
17
d = [-cla*clo,-cla*slo,-sla]
18
19
n2e = [n, e, d]
20
21
return
n2e
22
ned2ecr.ned2ecr
def ned2ecr(lon, lat)
Definition:
ned2ecr.py:1