> I can't find the reason of this question, but I give you a piece of
> program that could give correct answer.
>
> /** Create a CalDate object using MJD. From Montenbruck C++ code.
> * @param mjd Modified Julian Date.
> */
> public CalDate(double mjd){
> long a,b,c,d,e,f;
> double Hours,x;
>
> // Convert Julian day number to calendar date
> a = (long)(mjd+2400001.0);
>
> if ( a < 2299161 ) { // Julian calendar
> b = 0;
> c = a + 1524;
> }
> else { // Gregorian calendar
> b = (long)((a-1867216.25)/36524.25);
> c = a + b - (b/4) + 1525;
> }
>
> d = (long)( (c-122.1)/365.25 );
> e = 365*d + d/4;
> f = (long)( (c-e)/30.6001 );
>
> long temp = (long)(30.6001*f);
> this.Day = (int)(c - e - temp);
> temp = (long)(f/14);
> this.Month = (int)(f - 1 - 12*temp);
> temp = (long)((7+Month)/10);
> this.Year = (int)(d - 4715 - temp);
>
> Hours = 24.0*(mjd-Math.floor(mjd));
>
> this.Hour = (int)Hours;
> x = (Hours-Hour)*60.0;
> this.Min = (int) x;
> this.Sec = (x-Min)*60.0;
> this.DOY = day2doy(this.Year, this.Month, this.Day);
> }
>
>
> 2011/5/19, Petrus Hyvönen <
petrus.hyvonen@gmail.com>:
>> Hi,
>>
>> This maybe is a FAQ but anyway...
>>
>> I'm trying to create an absolute date based on a julian date created in
>> another software.
>>
>> My julian date is 2.456413500000000e+006, corresponding to 01-May-2013
>> 00:00:00 UTC according to that software and some web conversion i checked
>> it
>> with.
>>
>> with orekit i do:
>> ad_jd = AbsoluteDate.JULIAN_EPOCH
>> ad_jd =
>> -4712-01-01T11:59:27.816
>>
>> AbsoluteDate(ad_jd,t*24*3600)
>> ans =
>> 2013-04-30T23:58:53.816
>>
>> There must be some kind of time scale or different references here I
>> suppose, how can convert this properly?
>>
>> Best regards
>> /Petrus
>>
>