OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
output_eng2_pkt2_to_scan.c
Go to the documentation of this file.
1 #include "L1A_prototype.h"
2 #include "PGS_IO.h"
3 #include "PD_pkt_data.h"
4 #include "SC_scan.h"
5 
6 
7 void output_eng2_pkt2_to_scan (PGSt_IO_L0_Packet *pkt,
8  SC_SCAN_DATA_t *L1A_scan)
9 
10 /*
11 !C************************************************************************
12 
13 !Description: This routine extracts the engineering2, packet2 data contents
14  and puts it in the scan structure.
15 
16 !Input Parameters:
17  PGSt_IO_L0_Packet *pkt ** The structure containing **
18  ** the current packet's **
19  ** unpacked contents **
20 
21 !Output Parameters:
22  None
23 
24 !Input/Output Parameters:
25  SC_SCAN_DATA_t *L1A_scan ** The MODIS scan structure **
26  ** currently being built **
27 
28 Return Values:
29  None
30 
31 Externally Defined:
32  PGSt_IO_L0_Packet (PGS_IO.h)
33  PD_E2P2_NUM_PV_GAINS (PD_pkt_data.h)
34  PD_E2P2_PV_GAINS_BYTE_OFFSET (PD_pkt_data.h)
35  SC_SCAN_DATA_t (SC_scan.h)
36 
37 Called By:
38  output_eng_data_to_scan
39 
40 Routines Called:
41  None
42 
43 !Revision History:
44  Revision 2.0 1997/09/09 13:19 EDT
45  Timi Adelekan/GSC (adelekan@ltpmail.gsfc.nasa.gov)
46  Originated Code.
47 
48  Revision 1.1 1997/08/27 10:00
49  Tom Johnson (johnson@ltpmail.gsfc.nasa.gov)
50  Incorporate PDL walkthru comments
51 
52  Revision 1.0 1997/08/14 16:30 EDT
53  Timi Adelekan/GSC (adelekan@ltpmail.gsfc.nasa.gov)
54  Original design
55 
56 !Team-unique Header:
57  This software is developed by the MODIS Science
58  Data Support Team (SDST) for the National Aeronautics
59  and Space Administration (NASA), Goddard Space Flight
60  Center (GSFC), under contract NAS5-32373.
61 
62 !References and Credits:
63  None
64 
65 !Design Notes: The CODE below was developed in C language.
66 
67  This routine was designed totally under the assumption that
68  the packet header has been previously validated and there
69  is no need to test for error conditions.
70 
71 !END************************************************************************
72 */
73 
74  {
75  /**************************************************************************/
76  /* */
77  /* Define and Initialize Local Variables */
78  /* */
79  /**************************************************************************/
80 
81  int i; /* loop variable */
82 
83 
84  /**************************************************************************/
85  /* */
86  /* Use loop to move engineering 2, packet 2 contents to scan structure */
87  /* Suggested loop: FOR loop */
88  /* */
89  /**************************************************************************/
90  /* */
91  /* FOR index equals 0 up to PD_E2P2_NUM_PV_GAINS */
92  /* set SC_SCAN_DATA_t.raw_pv_gains[index] equal to */
93  /* pkt[PD_E2P2_PV_GAINS_BYTE_OFFSET + index] */
94  /* ENDFOR */
95  /* */
96  /**************************************************************************/
97 
98 
99  for (i = 0; i < PD_E2P2_NUM_PV_GAINS; i++)
100  L1A_scan->raw_pv_gains[i] = pkt[PD_E2P2_PV_GAINS_BYTE_OFFSET + i];
101 
102  } /* End of routine output_engr2_pkt2_to_scan */
#define PD_E2P2_PV_GAINS_BYTE_OFFSET
Definition: PD_pkt_data.h:164
void output_eng2_pkt2_to_scan(PGSt_IO_L0_Packet *pkt, SC_SCAN_DATA_t *L1A_scan)
int8 raw_pv_gains[PD_E2P2_NUM_PV_GAINS]
Definition: SC_scan.h:249
#define PD_E2P2_NUM_PV_GAINS
Definition: PD_pkt_data.h:163
int i
Definition: decode_rs.h:71