OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
l1agen_oci.cpp File Reference
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <unistd.h>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <getopt.h>
#include <libgen.h>
#include "nc4utils.h"
#include "l1agen_oci.h"
Include dependency graph for l1agen_oci.cpp:

Go to the source code of this file.

Macros

#define VERSION   "1.05.00_2022-06-24"
 

Functions

int ccsds_sec_to_yds (uint8_t *cctime, int32_t *iyear, int32_t *iday, double *sec)
 
int main (int argc, char *argv[])
 
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 unpack_swir_packet (uint8_t *packet, int16_t *slines, uint8_t *swirfrm, uint32_t *swirdata)
 
int check_load_oci_data (short dtype, uint16_t ncpt, uint16_t nspt0, 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)
 
uint8_t check_sum (int32_t nc, uint8_t *dat, uint8_t *chk)
 
int createNCDF (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, vector< NcDim > &varVec)
 
int eight20 (uint8_t *inbytes, uint32_t *outsamples)
 

Variables

ofstream tempOut
 

Macro Definition Documentation

◆ VERSION

#define VERSION   "1.05.00_2022-06-24"

Definition at line 46 of file l1agen_oci.cpp.

Function Documentation

◆ ccsds_sec_to_yds()

int ccsds_sec_to_yds ( uint8_t *  cctime,
int32_t *  iyear,
int32_t *  iday,
double *  sec 
)

Definition at line 20 of file l1agen_oci.cpp.

◆ check_load_oci_data()

int check_load_oci_data ( short  dtype,
uint16_t  ncpt,
uint16_t  nspt0,
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 ( 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,
vector< NcDim > &  varVec 
)

Definition at line 3367 of file l1agen_oci.cpp.

◆ eight20()

int eight20 ( uint8_t *  inbytes,
uint32_t *  outsamples 
)

Definition at line 3780 of file l1agen_oci.cpp.

◆ main()

int main ( int  argc,
char *  argv[] 
)

An implementation of a Lon/Lat to UTM zone code written by Chuck Gantz chuck.nosp@m..gan.nosp@m.tz@gl.nosp@m.obal.nosp@m.star..nosp@m.com ...in 1998...found on http://www.gpsy.com/gpsinfo/geotoutm/, a site published by Karen Nakamura, last updated 22 June 2000.

Minor modifications to the code were made to eliminate deprecation warnings

Definition at line 142 of file l1agen_oci.cpp.

◆ 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.

◆ 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

◆ tempOut

ofstream tempOut

Definition at line 140 of file l1agen_oci.cpp.