PLplot: qsastime.c File Reference

PLplot 5.15.0

Macros | Functions | Variables
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

## ◆ MJD_0000G

#define MJD_0000G -678941

Definition at line 53 of file qsastime.c.

## ◆ MJD_0000J

#define MJD_0000J -678943

Definition at line 48 of file qsastime.c.

## ◆ MJD_0001G

#define MJD_0001G -678575

Definition at line 57 of file qsastime.c.

## ◆ MJD_0001J

#define MJD_0001J -678577

Definition at line 56 of file qsastime.c.

## ◆ MJD_1970

#define MJD_1970 40587

Definition at line 59 of file qsastime.c.

## Function Documentation

## ◆ bhunt_search()

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.

## ◆ breakDownMJD()

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.

## ◆ btimeqsas()

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.

## ◆ closeqsas()

void closeqsas | ( | QSASConfig ** | qsasconfig | ) |

Definition at line 1200 of file qsastime.c.

## ◆ configqsas()

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.

## ◆ ctimeqsas()

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.

## ◆ geMJDtime_TAI()

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

Definition at line 1026 of file qsastime.c.

## ◆ geMJDtime_UTC()

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

Definition at line 1044 of file qsastime.c.

## ◆ getDayOfWeek()

const char* getDayOfWeek | ( | const MJDtime * | MJD | ) |

Definition at line 334 of file qsastime.c.

## ◆ getLongDayOfWeek()

const char* getLongDayOfWeek | ( | const MJDtime * | MJD | ) |

Definition at line 343 of file qsastime.c.

## ◆ getLongMonth()

const char* getLongMonth | ( | int | m | ) |

Definition at line 358 of file qsastime.c.

## ◆ getMonth()

const char* getMonth | ( | int | m | ) |

Definition at line 352 of file qsastime.c.

## ◆ getYAD()

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

Definition at line 175 of file qsastime.c.

## ◆ leap_second_TAI()

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

Definition at line 1062 of file qsastime.c.

## ◆ normalize_MJD()

void normalize_MJD | ( | MJDtime * | MJD | ) |

Definition at line 270 of file qsastime.c.

## ◆ setFromUT()

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.

## ◆ strfMJD()

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.

## ◆ strfqsas()

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

## ◆ MonthStartDOY

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

Definition at line 62 of file qsastime.c.

## ◆ MonthStartDOY_L

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.

## ◆ SecInDay

const double SecInDay = 86400
| static

Definition at line 61 of file qsastime.c.