OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
vec2mean.f
Go to the documentation of this file.
1  subroutine vec2mean(vec,ge,aj2,xinit,xmean,ier)
2 
3 c $header: /app/shared/rcs/irix-5.2/seawifsd/src/mops/mopsv4.1/swfnav/vec2mean.f,v 1.1 1995/01/17 23:03:07 seawifsd exp seawifsd $
4 c $log: vec2mean.f,v $
5 c revision 1.1 1995/01/17 23:03:07 seawifsd
6 c initial revision
7 c
8 
9 c purpose: this subroutine computes mean elements with respect to j2
10 c from an orbit vector.
11 c
12 c calling arguments:
13 c
14 c name Type i/o description
15 c -------- ---- --- -----------
16 c vec(6) r*8 i input orbit vector
17 c ge r*8 i earth gravitational constant
18 c aj2 r*8 i j2 gravity term
19 c xinit(6) r*8 i initial guess at mean elements
20 c xmean(6) r*8 o output mean elements
21 c ier i*4 o error flag(mean elements did not converge)
22 c
23 c
24 c by: frederick s. patt, gsc, october 19, 1994
25 c
26 c notes:
27 c
28 c modification history:
29 c
30  implicit none
31 #include "nav_cnst.fin"
32 
33  real*8 vec(6),xinit(6),xmean(6),ge,aj2
34  real*8 x(6),tmp(6),y(18)
35  integer*4 i,ier
36 
37  call eqnox(vec,ge,y)
38  x(1) = y(1)
39  do i=2,6
40  x(i) = y(i+5)
41  end do
42  tmp(1) = xinit(1)
43  tmp(2) = xinit(2)
44  do i=3,6
45  tmp(i) = xinit(i)/radeg
46  end do
47  tmp(6) = x(5) + x(6) - tmp(5)
48  call kozsak2(3,ge,re,aj2,x,xmean,tmp,ier)
49  do i=3,6
50  xmean(i) = xmean(i)*radeg
51  end do
52 
53  return
54  end
float * vector(long nl, long nh)
Definition: nrutil.c:15
subroutine kozsak2(IFLAG, GE, RE, AJ2, X, XN, XI, IER)
Definition: kozsak2.f:2
float mean(float *xs, int sample_size)
Definition: numerical.c:81
subroutine earth(pos, vel, widphse1, widphfl1, widphse2,
Definition: earth.f:2
#define real
Definition: DbAlgOcean.cpp:26
subroutine vec2mean(vec, ge, aj2, xinit, xmean, ier)
Definition: vec2mean.f:2
#define re
Definition: l1_czcs_hdf.c:701
subroutine eqnox(X, GM, Y)
Definition: eqnox.f:2
#define f
Definition: l1_czcs_hdf.c:702