OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
EnvsatUtil.cpp File Reference
#include "EnvsatUtil.h"
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <timeutils.h>
Include dependency graph for EnvsatUtil.cpp:

Go to the source code of this file.

Functions

stringtrim_right (string &s, const string &delimiters)
 
stringtrim_left (string &s, const string &delimiters)
 
stringtrim (string &s, const string &delimiters)
 
void setString (const string &str, char *buffer, unsigned int offset, int size)
 
void getString (const char *buffer, string &str, unsigned int offset, int size)
 
int getInt (const char *buffer, unsigned int offset, int size)
 
void setInt (int val, char *buffer, unsigned int offset, int size)
 
int64_t getInt64 (const char *buffer, unsigned int offset, int size)
 
void setInt64 (int64_t val, char *buffer, unsigned int offset, int size)
 
double getLatLon (const char *buffer, unsigned int offset)
 
void setLatLon (double val, char *buffer, unsigned int offset)
 
int getRawInt16 (const char *buffer, unsigned int offset)
 
void setRawInt16 (int val, char *buffer, unsigned int offset)
 
int getRawInt32 (const char *buffer, unsigned int offset)
 
void setRawInt32 (int val, char *buffer, unsigned int offset)
 
double getMJD (const char *buffer, unsigned int offset)
 
void setMJD (int day, int sec, int microsec, char *buffer, unsigned int offset)
 
double merisTime2unix (const string &timeStr)
 
const stringunix2merisTime (double unixTime)
 
double envsatInterp (double x1, double x2, double y1, double y2, double xin)
 

Variables

const char * monthArray [12]
 

Function Documentation

◆ envsatInterp()

double envsatInterp ( double  x1,
double  x2,
double  y1,
double  y2,
double  xin 
)

Definition at line 174 of file EnvsatUtil.cpp.

◆ getInt()

int getInt ( const char *  buffer,
unsigned int  offset,
int  size 
)

Definition at line 50 of file EnvsatUtil.cpp.

◆ getInt64()

int64_t getInt64 ( const char *  buffer,
unsigned int  offset,
int  size 
)

Definition at line 66 of file EnvsatUtil.cpp.

◆ getLatLon()

double getLatLon ( const char *  buffer,
unsigned int  offset 
)

get a lat or lon value out of the character buffer These assume the lat and lon are written as ints * 1e6

Definition at line 82 of file EnvsatUtil.cpp.

◆ getMJD()

double getMJD ( const char *  buffer,
unsigned int  offset 
)

Definition at line 114 of file EnvsatUtil.cpp.

◆ getRawInt16()

int getRawInt16 ( const char *  buffer,
unsigned int  offset 
)

Definition at line 92 of file EnvsatUtil.cpp.

◆ getRawInt32()

int getRawInt32 ( const char *  buffer,
unsigned int  offset 
)

Definition at line 101 of file EnvsatUtil.cpp.

◆ getString()

void getString ( const char *  buffer,
string str,
unsigned int  offset,
int  size 
)

Definition at line 45 of file EnvsatUtil.cpp.

◆ merisTime2unix()

double merisTime2unix ( const string timeStr)

Definition at line 144 of file EnvsatUtil.cpp.

◆ setInt()

void setInt ( int  val,
char *  buffer,
unsigned int  offset,
int  size 
)

Definition at line 59 of file EnvsatUtil.cpp.

◆ setInt64()

void setInt64 ( int64_t  val,
char *  buffer,
unsigned int  offset,
int  size 
)

Definition at line 75 of file EnvsatUtil.cpp.

◆ setLatLon()

void setLatLon ( double  val,
char *  buffer,
unsigned int  offset 
)

Definition at line 87 of file EnvsatUtil.cpp.

◆ setMJD()

void setMJD ( int  day,
int  sec,
int  microsec,
char *  buffer,
unsigned int  offset 
)

Definition at line 138 of file EnvsatUtil.cpp.

◆ setRawInt16()

void setRawInt16 ( int  val,
char *  buffer,
unsigned int  offset 
)

Definition at line 96 of file EnvsatUtil.cpp.

◆ setRawInt32()

void setRawInt32 ( int  val,
char *  buffer,
unsigned int  offset 
)

Definition at line 107 of file EnvsatUtil.cpp.

◆ setString()

void setString ( const string str,
char *  buffer,
unsigned int  offset,
int  size 
)

Definition at line 33 of file EnvsatUtil.cpp.

◆ trim()

string& trim ( string s,
const string delimiters 
)

Definition at line 29 of file EnvsatUtil.cpp.

◆ trim_left()

string& trim_left ( string s,
const string delimiters 
)

Definition at line 25 of file EnvsatUtil.cpp.

◆ trim_right()

string& trim_right ( string s,
const string delimiters 
)

Definition at line 21 of file EnvsatUtil.cpp.

◆ unix2merisTime()

const string& unix2merisTime ( double  unixTime)

Definition at line 160 of file EnvsatUtil.cpp.

Variable Documentation

◆ monthArray

const char* monthArray[12]
Initial value:
= {"JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL",
"AUG", "SEP", "OCT", "NOV", "DEC"}

Definition at line 18 of file EnvsatUtil.cpp.