AIRS Code Collection
Functions
time2jsec.c File Reference

Convert date to Julian seconds. More...

#include "jurassic.h"

Go to the source code of this file.

Functions

int main (int argc, char *argv[])
 

Detailed Description

Convert date to Julian seconds.

Definition in file time2jsec.c.

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 27 of file time2jsec.c.

29 {
30
31 double jsec;
32
33 /* Check arguments... */
34 if (argc < 8)
35 ERRMSG("Give parameters: <year> <mon> <day> <hour> <min> <sec> <remain>");
36
37 /* Read arguments... */
38 const int year = atoi(argv[1]);
39 const int mon = atoi(argv[2]);
40 const int day = atoi(argv[3]);
41 const int hour = atoi(argv[4]);
42 const int min = atoi(argv[5]);
43 const int sec = atoi(argv[6]);
44 const double remain = atof(argv[7]);
45
46 /* Convert... */
47 time2jsec(year, mon, day, hour, min, sec, remain, &jsec);
48 printf("%.2f\n", jsec);
49
50 return EXIT_SUCCESS;
51}