OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
GEO_vec_prod3.c
Go to the documentation of this file.
1 /* GEO_vec_prod3.c */
2 
3 #include "GEO_basic.h"
4 #include "GEO_util.h"
5 
7  double vec1[3],
8  double vec2[3],
9  double * const prod
10  )
11 {
12 /*
13 !C*****************************************************************************
14 !Description: subroutine in the utility functions of the Level-1A geolocation
15  software to calculate the products of two 3 element vectors.
16 
17 !Input Parameters:
18  double vec1[3] - the first 3 element vector
19  doubel vec2[3] - the second 3 element vector
20 
21 !Output Parameters:
22  double *prod - the product of the two input 3 element vectors
23 
24 !Revision History:
25  $Log: GEO_vec_prod3.c,v $
26  Revision 1.4 1997/07/21 16:24:34 kuyper
27  Baselined Version 1
28 
29  * Revision 1.4 1997/03/26 18:17:00 fhliang
30  * Initial revision of SDST delivery of GEO_vec_prod3.c.
31  *
32  Revision 1.3 1996/07/24 21:52:58 kuyper
33  Changed to return void.
34  Declared arguments const.
35  Inserted required '!'s in comments.
36  Converted constants to double, to skip implied conversion.
37  Removed ret_val.
38 
39  Revision 1.2 1996/07/18 21:27:33 kuyper
40  Included self-checking header file.
41 
42 
43  4/5/95
44  Ruiming Chen (rchen@ltpmail.gsfc.nasa.gov)
45  Finished coding.
46 
47  6/12/95
48  Frederick S. Patt (patt@modis-xl.gsfc.nasa.gov)
49  Revised prolog
50 
51 Call function:
52  None
53 
54 !Team-unique Header:
55  This software is developed by the MODIS Science Data Support
56  Team for the National Aeronautics and Space Administration,
57  Goddard Space Flight Center, under contract NAS5-32373.
58 
59 !END*************************************************************************
60 */
61 
62  int i = 0; /* iteration parameter */
63 
64  /* calculate the product of vec1 and vec2 */
65  *prod = 0.0;
66  for (i = 0; i < 3; ++i)
67  *prod = *prod + vec1[i] * vec2[i];
68 
69  return;
70 }
void GEO_vec_prod3(double vec1[3], double vec2[3], double *const prod)
Definition: GEO_vec_prod3.c:6
int i
Definition: decode_rs.h:71