OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
GEO_util.h
Go to the documentation of this file.
1 /*
2 !C-INC*************************************************************************
3 
4 !Description: the .h file for the utility functions in the Level-1A
5  geolocation software
6 
7 !Input Parameters: N/A
8 
9 !Output Parameters: N/A
10 
11 !Revision History:
12  * $Log: GEO_util.h,v $
13  * Revision 6.1 2011/02/14 21:36:35 kuyper
14  * Corrected const-qualification of arguments to GEO_poly_fit().
15  *
16  * Revision 5.1 2005/03/16 21:36:13 kuyper
17  * Changed header guard macro name to avoid reserved name space.
18  *
19  * Revision 4.1 2002/12/05 19:26:59 kuyper
20  * Dropped obsolete chebyshev polynomial functions.
21  *
22  * Revision 2.3 1999/03/12 17:48:37 kuyper
23  * Capitalized Prolog Sections
24  *
25  * Revision 2.2 1997/10/24 13:25:20 kuyper
26  * Removed GEO_lagrange() declaration.
27  *
28  * Revision 2.1 1997/10/21 18:15:47 kuyper
29  * Returned from ClearCase
30  *
31  * Revision /main/GEO_V2_DEV/2 1997/09/19 kuyper
32  * Added CUBIC macro.
33  *
34  * Revision /main/GEO_V2_DEV/1 1997/08/14 kuyper
35  * Added declarations for Chebyshev functions and globals.
36  *
37  * Revision 1.4 1997/07/18 21:58:00 kuyper
38  * Baselined Version 1
39  *
40  * Revision 1.4 1996/07/24 22:19:42 fhliang
41  * Initial revision of SDST delivery of GEO_util.h.
42  *
43  Revision 1.3 1996/07/24 22:19:42 kuyper
44  Inserted required '!'s in comments.
45  Declared GEO_mat_vec_mul3, GEO_vec_prod3, GEO_vec_length3 as void.
46  Declared arguments const.
47 
48  Revision 1.2 1996/07/18 22:07:16 kuyper
49  Removed GEO_factorial() and GEO_combination() function declarations.
50 
51 
52  4/5/95
53  Ruiming Chen
54  Finished coding
55 
56  6/20/95
57  Frederick S. Patt (patt@modis-xl.gsfc.nasa.gov)
58  Removed unused routines
59 
60 !Team-unique Header:
61  This software is developed by the MODIS Science Data Support
62  Team for the National Aeronautics and Space Administration,
63  Goddard Space Flight Center, under contract NAS5-32373.
64 
65 !END***************************************************************************
66 */
67 
68 #ifndef GEO_UTIL_H
69 #define GEO_UTIL_H
70 /* Macros. */
71 #define CUBIC 4
72 
73 /* function prototypes */
74 int GEO_vec_mul3( /* cal. the cross product of two 3-dim vecs */
75  double vec1[3], /* input vec 1 */
76  double vec2[3], /* input vec 2 */
77  double vec[3] /* output vec */
78  );
79 
80 void GEO_mat_vec_mul3( /* cal. a vec of the mul. of a matrix and vec */
81  double mat[3][3], /* input 2-dim matrix */
82  double vec1[3], /* input vec */
83  double vec[3] /* output vec */
84  );
85 
86 int GEO_mat_mul3( /* cal. matrix of the mul. of 2 matrices */
87  double mat1[3][3], /* input 2-dim matrix 1 */
88  double mat2[3][3], /* input 2-dim matrix 2 */
89  double mat[3][3] /* output 2-dim matrix */
90  );
91 
92 void GEO_vec_prod3( /* cal. the dot product of two vecs */
93  double vec1[3], /* input vec 1 */
94  double vec2[3], /* input vec 2 */
95  double * const prod /* output vec */
96  );
97 
98 void GEO_vec_length3( /* length of vec with size 3*/
99  double vec[3], /* input vec */
100  double * const length /* output length */
101  );
102 
103 int GEO_vec_unit3( /* normalizes a vector */
104  double vec[3], /* input vec */
105  double unit_vec[3] /* output unit_vec */
106  );
107 
108 int GEO_poly_coef1( /* determine cubic polynomial coefficients */
109  double const var_val1, /* displacement at t1 */
110  double const var_val2, /* displacement at t2 */
111  double const val_derv1, /* derivative at t1 */
112  double const val_derv2, /* derivative at t1 */
113  double const t1, /* first time */
114  double const t2, /* second time */
115  double coef[CUBIC] /* cubic polynomial coefficients */
116  );
117 
118 int GEO_poly_fit( /* evaluate polynomial */
119  double const *, /* array of polynomial coefficients */
120  double const, /* independent variable */
121  int const, /* order of the polynomial */
122  double * const y /* the pointer to the fitted number */
123 );
124 
125 #endif
126 
#define CUBIC
Definition: GEO_util.h:71
int GEO_mat_mul3(double mat1[3][3], double mat2[3][3], double mat[3][3])
int GEO_vec_unit3(double vec[3], double unit_vec[3])
Definition: GEO_vec_unit3.c:9
int GEO_poly_coef1(double const var_val1, double const var_val2, double const val_derv1, double const val_derv2, double const t1, double const t2, double coef[CUBIC])
Definition: GEO_poly_coef1.c:4
void GEO_vec_prod3(double vec1[3], double vec2[3], double *const prod)
Definition: GEO_vec_prod3.c:6
int GEO_vec_mul3(double vec1[3], double vec2[3], double vec[3])
Definition: GEO_vec_mul3.c:6
void GEO_mat_vec_mul3(double mat[3][3], double vec1[3], double vec[3])
void GEO_vec_length3(double vec[3], double *const length)
int GEO_poly_fit(double const *, double const, int const, double *const y)
Definition: GEO_poly_fit.c:8