35 ERRMSG(
"Give parameters: <year> <mon> <day> <hour> <min> <sec> <remain>");
38 int year = atoi(argv[1]);
39 int mon = atoi(argv[2]);
40 int day = atoi(argv[3]);
41 int hour = atoi(argv[4]);
42 int min = atoi(argv[5]);
43 int sec = atoi(argv[6]);
44 double remain = atof(argv[7]);
47 time2jsec(year, mon, day, hour, min, sec, remain, &jsec);
48 printf(
"%.2f\n", jsec);
void time2jsec(const int year, const int mon, const int day, const int hour, const int min, const int sec, const double remain, double *jsec)
Converts time components to seconds since January 1, 2000, 12:00:00 UTC.
MPTRAC library declarations.
#define ERRMSG(...)
Print an error message with contextual information and terminate the program.
int main(int argc, char *argv[])