OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
pdsinfo.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
Include dependency graph for pdsinfo.c:

Go to the source code of this file.

Classes

struct  pri_hdr
 
struct  apid_info
 
struct  modis_hdr
 

Macros

#define NAME   "pdsinfo"
 
#define VERSION   1
 
#define REVISION   6
 
#define PRI_HDR_SIZE   6
 
#define MODIS_HDR_SIZE   12
 
#define MODIS_REF_DATE   2436205.0
 
#define DATA_SIZE   100000
 

Functions

int ReadPriHdr (FILE *f, unsigned char *buf)
 
int DecodePriHdr (unsigned char *buf, struct pri_hdr *hdr)
 
int DecodeMODISHdr (unsigned char *buf, int len, struct modis_hdr *hdr)
 
struct apid_infoAllocAPIDInfo (int apid)
 
void AddAPIDInfo (struct apid_info **list, struct apid_info *ai)
 
void FreeAPIDInfoList (struct apid_info *list)
 
struct apid_infoFindAPIDInfo (struct apid_info *list, int apid)
 
void caldat (int *minute, int *hour, int *day, int *month, int *year, double jul)
 
int CalcChecksum12 (unsigned char *buf, int n)
 
int main (int argc, char *argv[])
 

Macro Definition Documentation

◆ DATA_SIZE

#define DATA_SIZE   100000

Definition at line 76 of file pdsinfo.c.

◆ MODIS_HDR_SIZE

#define MODIS_HDR_SIZE   12

Definition at line 72 of file pdsinfo.c.

◆ MODIS_REF_DATE

#define MODIS_REF_DATE   2436205.0

Definition at line 74 of file pdsinfo.c.

◆ NAME

#define NAME   "pdsinfo"

Definition at line 64 of file pdsinfo.c.

◆ PRI_HDR_SIZE

#define PRI_HDR_SIZE   6

Definition at line 70 of file pdsinfo.c.

◆ REVISION

#define REVISION   6

Definition at line 68 of file pdsinfo.c.

◆ VERSION

#define VERSION   1

Definition at line 66 of file pdsinfo.c.

Function Documentation

◆ AddAPIDInfo()

void AddAPIDInfo ( struct apid_info **  list,
struct apid_info ai 
)

Definition at line 619 of file pdsinfo.c.

◆ AllocAPIDInfo()

struct apid_info * AllocAPIDInfo ( int  apid)

Definition at line 578 of file pdsinfo.c.

◆ CalcChecksum12()

int CalcChecksum12 ( unsigned char *  buf,
int  n 
)

Definition at line 844 of file pdsinfo.c.

◆ caldat()

void caldat ( int *  minute,
int *  hour,
int *  day,
int *  month,
int *  year,
double  jul 
)

Definition at line 800 of file pdsinfo.c.

◆ DecodeMODISHdr()

int DecodeMODISHdr ( unsigned char *  buf,
int  len,
struct modis_hdr hdr 
)

Definition at line 728 of file pdsinfo.c.

◆ DecodePriHdr()

int DecodePriHdr ( unsigned char *  buf,
struct pri_hdr hdr 
)

Definition at line 538 of file pdsinfo.c.

◆ FindAPIDInfo()

struct apid_info * FindAPIDInfo ( struct apid_info list,
int  apid 
)

Definition at line 698 of file pdsinfo.c.

◆ FreeAPIDInfoList()

void FreeAPIDInfoList ( struct apid_info list)

Definition at line 672 of file pdsinfo.c.

◆ 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 146 of file pdsinfo.c.

◆ ReadPriHdr()

int ReadPriHdr ( FILE *  f,
unsigned char *  buf 
)

Definition at line 518 of file pdsinfo.c.