CalcSphAngle CalcJD

CalcHJD


The CalcHJD function calculates the Heliocentric Julian Date using the date and time plus the right ascension and declination of the object. The date and time are specified in Universal Time ("UT", also known as GMT). To calculate the "normal", or geocentric Julian Date, use CalcJD.

Syntax

nJD = CalcHJD( sDate, sTime. sRA, sDec )

    sDate, sTime are the UT date and time strings to convert to Julian Date.

    sRA and sDec are the right ascension and declination of the object.

    nJD is the Julian Date (e.g., 2441552.645325).

Remarks

To calculate the "normal", or geocentric Julian Date, use CalcJD. The date, time, RA, and DEC may be specified in a very relaxed format. The simplest cases are shown in the example below.

Example

The following script converts UT date and time, right ascension, and declination to Heliocentric Julian Date:

 

sDate = "1999 6 17"

-- 17 June 1999 UT

sTime = "1 1 59"

-- 01:01:59.0 UT

sRA = "18 42 43.42"

-- RA: 18h 42m 43.42s

sDec = "63 35 6.1"

-- Dec: 63 degrees 35' 06.1"

nHJD = CalcHJD( sDate, sTime, sRA, sDec )

-- calculate the HJD

Printf("HJD = %14.5lf\r\n", nHJD )

-- Result: JD = 2451346.54326

Related Topics

FormatYmdStr, JDtoDateTime, CalcJD, CalcMJD