Due to the lapse in federal government funding, NASA is not updating this website. We sincerely regret this inconvenience.
NASA Logo
Ocean Color Science Software

ocssw V2022
ecef.f
Go to the documentation of this file.
1  subroutine ecef(gha,posi,veli,pose,vele)
2 c
3 c Converts inertial Earth-centered coordinates of position and
4 c velocity into Earth-centered, Earth-fixed (ECEF) coordinates,
5 c using the Greenwich Hour Angle as the rotation angle.
6 c
7  implicit real*8 (a-h,o-z)
8  dimension posi(3),veli(3)
9  dimension pose(3),vele(3)
10  common /gconst/pi,radeg,re,rem,f,omf2,omegae
11 c
12  rgha = gha/radeg
13  cosgha = dcos(rgha)
14  singha = dsin(rgha)
15 c
16 c Position rotation
17  pose(1) = posi(1)*cosgha + posi(2)*singha
18  pose(2) = -posi(1)*singha + posi(2)*cosgha
19  pose(3) = posi(3)
20 c
21 c Velocity rotation
22  term1 = veli(1)*cosgha + veli(2)*singha
23  term2 = omegae*(-posi(1)*singha + posi(2)*cosgha)
24  vele(1) = term1+term2
25  term1 = -veli(1)*singha + veli(2)*cosgha
26  term2 = omegae*(-posi(1)*cosgha - posi(2)*singha)
27  vele(2) = term1+term2
28  vele(3) = veli(3)
29 c
30  return
31  end
#define f
Definition: l1_czcs.c:696
subroutine ecef(gha, posi, veli, pose, vele)
Definition: ecef.f:2
#define pi
Definition: vincenty.c:23
#define re
Definition: l1_czcs.c:695
#define omf2
Definition: l1_czcs.c:697