OB.DAAC Logo
NASA Logo
Ocean Color Science Software

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