OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
l1agen_oci.h File Reference
#include <stdint.h>
#include <fstream>
#include <timeutils.h>
#include <netcdf>
#include "common.h"
Include dependency graph for l1agen_oci.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  time_struct
 
class  l1aFile
 

Macros

#define PBUFFER_SIZE   32768
 
#define ANCSIZE   104
 
#define TLMSIZE   3200
 

Functions

float ReverseFloat (const float inFloat)
 
int make_oci_line_index (itab *itable, int16_t *cindex, int16_t *sindex, int16_t *cdindex, int16_t *sdindex, int16_t *swir_loff)
 
int unpack_oci_sci (uint32_t npkts, int32_t spin, uint16_t ncps, uint16_t nsps, uint16_t msps, uint16_t &nbands, uint16_t btaps[16], uint16_t rtaps[16], uint8_t(*pbuffer)[PKTSIZE], uint16_t **bbands, uint16_t **rbands, uint32_t **sbands, int16_t *blines, int16_t *rlines, int16_t *slines, uint16_t &btype, uint16_t bagg[16], uint16_t &rtype, uint16_t ragg[16], int8_t *sfrm, int &iret)
 
int unpack_ccd_packet (uint8_t *packet, uint16_t btaps[16], uint16_t rtaps[16], uint16_t &ccdid, uint32_t &line, uint16_t &dtype, uint16_t &iagg, uint16_t jagg[16], uint16_t &nbands, uint16_t **ccddata, uint16_t ossdata[16])
 
int check_load_oci_data (short dtype, uint16_t ncps, uint16_t nsps, uint16_t ndcs, uint16_t ndss, uint16_t nbbs, uint16_t nrbs, uint16_t nswb, int16_t *cindex, int16_t *sindex, int16_t *cdindex, int16_t *sdindex, uint16_t **bbands, uint16_t **rbands, uint32_t **sbands, int16_t *blines, int16_t *rlines, int16_t *slines, uint16_t **bsci, uint16_t **rsci, uint32_t **ssci, uint16_t **bdark, uint16_t **rdark, uint32_t **sdark, uint8_t &linerr, int &icheck)
 
int unpack_swir_packet (uint8_t *packet, int16_t *slines, uint8_t *swirfrm, uint32_t *swirdata)
 
uint8_t check_sum (int32_t nc, uint8_t *dat, uint8_t *chk)
 
int eight20 (uint8_t *inbytes, uint32_t *outsamples)
 
int createNCDF (netCDF::NcGroup &ncGrp, const char *sname, const char *lname, const char *standard_name, const char *units, void *fill_value, const char *flag_values, const char *flag_meanings, const char *reference, double low, double high, int nt, std::vector< netCDF::NcDim > &varVec)
 
int expandEnvVar (std::string *sValue)
 

Variables

const uint16_t SWIR_LOFF_ETU [9] = {80,88,72,64,80,72,0,0,0}
 

Macro Definition Documentation

◆ ANCSIZE

#define ANCSIZE   104

Definition at line 9 of file l1agen_oci.h.

◆ PBUFFER_SIZE

#define PBUFFER_SIZE   32768

Definition at line 8 of file l1agen_oci.h.

◆ TLMSIZE

#define TLMSIZE   3200

Definition at line 10 of file l1agen_oci.h.

Function Documentation

◆ check_load_oci_data()

int check_load_oci_data ( short  dtype,
uint16_t  ncps,
uint16_t  nsps,
uint16_t  ndcs,
uint16_t  ndss,
uint16_t  nbbs,
uint16_t  nrbs,
uint16_t  nswb,
int16_t *  cindex,
int16_t *  sindex,
int16_t *  cdindex,
int16_t *  sdindex,
uint16_t **  bbands,
uint16_t **  rbands,
uint32_t **  sbands,
int16_t *  blines,
int16_t *  rlines,
int16_t *  slines,
uint16_t **  bsci,
uint16_t **  rsci,
uint32_t **  ssci,
uint16_t **  bdark,
uint16_t **  rdark,
uint32_t **  sdark,
uint8_t &  linerr,
int &  icheck 
)

Definition at line 1310 of file l1agen_oci.cpp.

◆ check_sum()

uint8_t check_sum ( int32_t  nc,
uint8_t *  dat,
uint8_t *  chk 
)

Definition at line 1543 of file l1agen_oci.cpp.

◆ createNCDF()

int createNCDF ( netCDF::NcGroup &  ncGrp,
const char *  sname,
const char *  lname,
const char *  standard_name,
const char *  units,
void *  fill_value,
const char *  flag_values,
const char *  flag_meanings,
const char *  reference,
double  low,
double  high,
int  nt,
std::vector< netCDF::NcDim > &  varVec 
)

◆ eight20()

int eight20 ( uint8_t *  inbytes,
uint32_t *  outsamples 
)

Definition at line 3780 of file l1agen_oci.cpp.

◆ expandEnvVar()

int expandEnvVar ( std::string sValue)
inline

Definition at line 142 of file l1agen_oci.h.

◆ make_oci_line_index()

int make_oci_line_index ( itab itable,
int16_t *  cindex,
int16_t *  sindex,
int16_t *  cdindex,
int16_t *  sdindex,
int16_t *  swir_loff 
)

Definition at line 944 of file l1agen_oci.cpp.

◆ ReverseFloat()

float ReverseFloat ( const float  inFloat)

Definition at line 16 of file l1agen_oci.h.

◆ unpack_ccd_packet()

int unpack_ccd_packet ( uint8_t *  packet,
uint16_t  btaps[16],
uint16_t  rtaps[16],
uint16_t &  ccdid,
uint32_t &  line,
uint16_t &  dtype,
uint16_t &  iagg,
uint16_t  jagg[16],
uint16_t &  nbands,
uint16_t **  ccddata,
uint16_t  ossdata[16] 
)

Definition at line 1206 of file l1agen_oci.cpp.

◆ unpack_oci_sci()

int unpack_oci_sci ( uint32_t  npkts,
int32_t  spin,
uint16_t  ncps,
uint16_t  nsps,
uint16_t  msps,
uint16_t &  nbands,
uint16_t  btaps[16],
uint16_t  rtaps[16],
uint8_t(*)  pbuffer[PKTSIZE],
uint16_t **  bbands,
uint16_t **  rbands,
uint32_t **  sbands,
int16_t *  blines,
int16_t *  rlines,
int16_t *  slines,
uint16_t &  btype,
uint16_t  bagg[16],
uint16_t &  rtype,
uint16_t  ragg[16],
int8_t *  sfrm,
int &  iret 
)

Definition at line 1032 of file l1agen_oci.cpp.

◆ unpack_swir_packet()

int unpack_swir_packet ( uint8_t *  packet,
int16_t *  slines,
uint8_t *  swirfrm,
uint32_t *  swirdata 
)

Definition at line 1275 of file l1agen_oci.cpp.

Variable Documentation

◆ SWIR_LOFF_ETU

const uint16_t SWIR_LOFF_ETU[9] = {80,88,72,64,80,72,0,0,0}

Definition at line 12 of file l1agen_oci.h.