PLplot  5.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
qsastime.c File Reference
#include <ctype.h>
#include <math.h>
#include "qsastimeP.h"
#include "tai-utc.h"

Go to the source code of this file.

Macros

#define MJD_0000J   -678943
#define MJD_0000G   -678941
#define MJD_0001J   -678577
#define MJD_0001G   -678575
#define MJD_1970   40587

Functions

static int geMJDtime_TAI (const MJDtime *number1, const TAI_UTC *number2)
static int geMJDtime_UTC (const MJDtime *number1, const TAI_UTC *number2)
static double leap_second_TAI (const MJDtime *MJD_TAI, int *inleap, int *index)
int setFromUT (int year, int month, int day, int hour, int min, double sec, MJDtime *MJD, int forceJulian)
void getYAD (int *year, int *ifleapyear, int *doy, const MJDtime *MJD, int forceJulian)
void normalize_MJD (MJDtime *MJD)
void breakDownMJD (int *year, int *month, int *day, int *hour, int *min, double *sec, const MJDtime *MJD, int forceJulian)
const char * getDayOfWeek (const MJDtime *MJD)
const char * getLongDayOfWeek (const MJDtime *MJD)
const char * getMonth (int m)
const char * getLongMonth (int m)
size_t strfMJD (char *buf, size_t len, const char *format, const MJDtime *MJD, int forceJulian, int inleap)
void configqsas (double scale, double offset1, double offset2, int ccontrol, int ifbtime_offset, int year, int month, int day, int hour, int min, double sec, QSASConfig **qsasconfig)
void closeqsas (QSASConfig **qsasconfig)
int ctimeqsas (int year, int month, int day, int hour, int min, double sec, double *ctime, QSASConfig *qsasconfig)
void btimeqsas (int *year, int *month, int *day, int *hour, int *min, double *sec, double ctime, QSASConfig *qsasconfig)
size_t strfqsas (char *buf, size_t len, const char *format, double ctime, QSASConfig *qsasconfig)
void bhunt_search (const void *key, const void *base, int n, size_t size, int *low, int(*ge)(const void *keyval, const void *datum))

Variables

static const double SecInDay = 86400
static const int MonthStartDOY [] = { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 }
static const int MonthStartDOY_L [] = { 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335 }

Macro Definition Documentation

#define MJD_0000G   -678941

Definition at line 53 of file qsastime.c.

#define MJD_0000J   -678943

Definition at line 48 of file qsastime.c.

#define MJD_0001G   -678575

Definition at line 57 of file qsastime.c.

#define MJD_0001J   -678577

Definition at line 56 of file qsastime.c.

#define MJD_1970   40587

Definition at line 59 of file qsastime.c.

Function Documentation

void bhunt_search ( const void key,
const void base,
int  n,
size_t  size,
int *  low,
int(*)(const void *keyval, const void *datum)  ge 
)

Definition at line 1312 of file qsastime.c.

void breakDownMJD ( int *  year,
int *  month,
int *  day,
int *  hour,
int *  min,
double *  sec,
const MJDtime MJD,
int  forceJulian 
)

Definition at line 289 of file qsastime.c.

void btimeqsas ( int *  year,
int *  month,
int *  day,
int *  hour,
int *  min,
double *  sec,
double  ctime,
QSASConfig qsasconfig 
)

Definition at line 1233 of file qsastime.c.

void closeqsas ( QSASConfig **  qsasconfig)

Definition at line 1200 of file qsastime.c.

void configqsas ( double  scale,
double  offset1,
double  offset2,
int  ccontrol,
int  ifbtime_offset,
int  year,
int  month,
int  day,
int  hour,
int  min,
double  sec,
QSASConfig **  qsasconfig 
)

Definition at line 1142 of file qsastime.c.

int ctimeqsas ( int  year,
int  month,
int  day,
int  hour,
int  min,
double  sec,
double *  ctime,
QSASConfig qsasconfig 
)

Definition at line 1210 of file qsastime.c.

int geMJDtime_TAI ( const MJDtime number1,
const TAI_UTC number2 
)
static

Definition at line 1026 of file qsastime.c.

int geMJDtime_UTC ( const MJDtime number1,
const TAI_UTC number2 
)
static

Definition at line 1044 of file qsastime.c.

const char* getDayOfWeek ( const MJDtime MJD)

Definition at line 334 of file qsastime.c.

const char* getLongDayOfWeek ( const MJDtime MJD)

Definition at line 343 of file qsastime.c.

const char* getLongMonth ( int  m)

Definition at line 358 of file qsastime.c.

const char* getMonth ( int  m)

Definition at line 352 of file qsastime.c.

void getYAD ( int *  year,
int *  ifleapyear,
int *  doy,
const MJDtime MJD,
int  forceJulian 
)

Definition at line 175 of file qsastime.c.

double leap_second_TAI ( const MJDtime MJD_TAI,
int *  inleap,
int *  index 
)
static

Definition at line 1062 of file qsastime.c.

void normalize_MJD ( MJDtime MJD)

Definition at line 270 of file qsastime.c.

int setFromUT ( int  year,
int  month,
int  day,
int  hour,
int  min,
double  sec,
MJDtime MJD,
int  forceJulian 
)

Definition at line 71 of file qsastime.c.

size_t strfMJD ( char *  buf,
size_t  len,
const char *  format,
const MJDtime MJD,
int  forceJulian,
int  inleap 
)

Definition at line 365 of file qsastime.c.

size_t strfqsas ( char *  buf,
size_t  len,
const char *  format,
double  ctime,
QSASConfig qsasconfig 
)

Definition at line 1271 of file qsastime.c.

Variable Documentation

const int MonthStartDOY[] = { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 }
static

Definition at line 62 of file qsastime.c.

const int MonthStartDOY_L[] = { 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335 }
static

Definition at line 63 of file qsastime.c.

const double SecInDay = 86400
static

Definition at line 61 of file qsastime.c.