MISR Toolkit  1.5.1
Macros | Functions
MtkCalToJulian.c File Reference
#include "MisrUtil.h"
#include "MisrError.h"
#include <math.h>
#include <string.h>
#include <stdio.h>

Go to the source code of this file.

Macros

#define GREGORIAN_EPOCH   1721425.5
 

Functions

static int leap_gregorian (int year)
 
static double gregorian_to_jd (int year, int month, int day)
 
MTKt_status MtkCalToJulian (int year, int month, int day, int hour, int min, int sec, double *jd)
 Convert calendar date to Julian date. More...
 

Macro Definition Documentation

◆ GREGORIAN_EPOCH

#define GREGORIAN_EPOCH   1721425.5

Definition at line 33 of file MtkCalToJulian.c.

Function Documentation

◆ gregorian_to_jd()

static double gregorian_to_jd ( int  year,
int  month,
int  day 
)
static

Definition at line 35 of file MtkCalToJulian.c.

◆ leap_gregorian()

static int leap_gregorian ( int  year)
static

Definition at line 25 of file MtkCalToJulian.c.

◆ MtkCalToJulian()

MTKt_status MtkCalToJulian ( int  year,
int  month,
int  day,
int  hour,
int  min,
int  sec,
double *  jd 
)

Convert calendar date to Julian date.

Returns
MTK_SUCCESS if successful.
Example:
In this example, we convert from the calendar date 2002-05-02 02:00:00 to Julian date.
status = MtkCalToJulian(2002, 5, 2, 2, 0, 0, &julian);
Parameters
[in]yearYear
[in]monthMonth
[in]dayDay
[in]hourHour
[in]minMinutes
[in]secSeconds
[out]jdJulian date

Definition at line 61 of file MtkCalToJulian.c.


MISR Toolkit - Copyright © 2005 - 2020 Jet Propulsion Laboratory
Generated on Fri Jun 19 2020 22:49:53