儒略日Juliandate计算matlab

儒略日Juliandate计算matlab

2023年7月20日发(作者:)

儒略日 Juliandate 计算 matlab

儒略日 Juliandate 计算 matlab

thanksto:

在天文学有一种连续纪日的儒略日(JD),它以儒略历公元前4713年1月1日的GMT正午为第0日的开始。还有一种简化儒略日(MJD):

MJD=JD-2400000.5MJD的第0日是从公历1858年11月17日的GMT零时开始的。

需要注意:儒略历公元前4713年1月1日相当于公历公元前4713年11月24日。

儒略日(Julianday)是指由公元前4713年1月1日,协调世界时中午12时开始所经过的天数,多为天文学家采用,用以作为天文学的单一历法,把不同历法的年表统一起来。

儒略日是一种不用年月的长期纪日法,简写为JD。是由法国学者JosephJustusScliger(1540-1609)在1583年所创,这名称是为了纪念他的父亲--意大利学者JuliusCaesarScaliger(1484-1558)。

儒略日的起点订在公元前4713年(天文学上记为-4712年)1月1日格林威治时间平午(世界时12:00),即JD0指定为4713B.C.1月1日12:00UT到4713B.C.1月2日12:00UT的24小时。每一天赋予了一个唯一的数字,顺数而下,如:1996年1月1日12:00:00的儒略日是2450084。这个日期是考虑了太阳、月亮的运行周期,以及当时收税的间隔而订出来的。JosephScliger定义儒略周期为7980年,是因28、19、15的最小公倍数为28×19×15=7980。其中:

28年为一太阳周期(solarcycle),经过一太阳周期,则星期的日序与月的日序会重复。 19年为一太阴周期,或称默冬章(Metoniccycle),因235朔望月=19回归年,经过一太阴周期则阴历月年的日序重复。

15年为一小纪(indictioncycle),此为罗马皇帝君士坦丁(Constantine)

所颁,每15年评定财产价值以供课税,成为古罗马用的一个纪元单位,

故以7980年为一儒略周期,而所选的起点公元前4713年,则是这三个循

环周期同时开始的最近年份。

以儒略日计日是为方便计算年代相隔久远或不同历法的两事件所间隔的日

数。

由于儒略日数字位数太多,国际天文学联合会于1973年采用简化儒略日

(MJD),其定义为MJD=JD-2400000.5。MJD相应的起点是1858年11月17日世

界时0时。

---

儒略日的计算

儒略日=K-32075+1461*(I+4800+(J-14)/12)/4+367*(J-2-(J-14)/12*12)/12-3*((I+4900+(J-

14)/12)/100)/4typejuliandatefunctionjd=juliandate(varargin)

%JULIANDATECalculateJuliandate.

%JD=JULIANDATE(V)convertsoneormoredatevectorsVintoJuliandate

%canbeanM-by-6orM-by-3matrixcontainingMfullor

%partialdatevectors,DATEreturnsacolumnvector

%ofMJuliandateswhicharethenumberofdaysandfractionssincenoon

%UniversalTimeonJanuary1,4713BCE.

%

%Adatevectorcontainssixelements,specifyingyear,month,day,hour, %minute,aldatevectorhasthreeelements,specifying

%year,month,ementofVmustbeapositivedouble %precisionnumber.

%

%JD=JULIANDATE(S,F)convertsoneormoredatestringsStoJuliandate

%acharacterarraywhereeach

%rowcorrespondstoonedatestring,oronedimensionalcellarrayof

%DATEreturnsacolumnvectorofMJuliandates,whereMis

%thenumberofstringsinS.

%

%AllofthedatestringsinSmusthavethesameformatF,whichmustbe

%swith

%'Q'arenotacceptedbyJULIANDATE.

%

%Certainformatsmaynotcontainenoughinformationtocomputeadate

%ecases,hours,minutes,andsecondsdefaultto0,days

%defaultto1,monthsdefaulttoJanuary,andyearsdefaulttothe

%ringswithtwocharacteryearsareinterpretedto

%bewithinthe100yearscenteredaroundthecurrentyear.

%

%JD=JULIANDATE(Y,MO,D)andJD=JULIANDATE([Y,MO,D])returntheJulian

%dateforcorrespondingelementsoftheY,MO,D(year,month,day)

%arrays.Y,MO,andDmustbearraysofthesamesize(oranycanbea %scalar).

% %JD=JULIANDATE(Y,MO,D,H,MI,S)andJD=JULIANDATE([Y,MO,D,H,MI,S])

%returntheJuliandatesforcorrespondingelementsoftheY,MO,D,H,MI,S

%(year,month,day,hour,minute,second)argumentsmustbe

%arraysofthesamesize(oranycanbeascalar).

%

%Limitations:

%Thisfunctionisvalidforallcommonera(CE)datesintheGregorian %calendar.

%

%ThecalculationofJuliandatedoesnottakeintoaccountleapseconds. %

%Examples:

%

%CalculateJuliandateforMay24,2005:

%jd=juliandate('24-May-2005','dd-mmm-yyyy') %

%CalculateJuliandateforDecember19,2006:

%jd=juliandate(2006,12,19)

%

%CalculateJuliandateforOctober10,2004at12:21:00pm:

%jd=juliandate(2004,10,10,12,21,0)

%

%SeealsoDECYEAR,LEAPYEAR,MJULIANDATE.

%Copyright2000-2006TheMathWorks,Inc.

%$Revision:1.1.6.1$$Date:2006/04/2017:45:01$

[yearmonthdayhourminsec]=datevec(datenum(varargin{:}));

fork=length(month):- 1:1if(month(k)=2)%january&februaryyear(k)=year(k)-1.0;

month(k)=month(k)+12.0;

endendjd=floor(365.25*(year+4716.0))+floor(30.6001*(month+1.0))+2

.0-.

floor(year/100.0)+floor(floor(year/100.0)/4.0)+day-1524.5+.

(hour+min/60+sec/3600)/24;

例如:

formatlongg;juliandate(now()) ans=

2455062.99134494

发布者:admin,转转请注明出处:http://www.yc00.com/web/1689825515a288965.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信