⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jd2cal.m

📁 gps matlab 仿真程序(A collection of geodetic functions that solve a variety of problems in geodesy. Supp
💻 M
字号:
function [yr,mn,dy]=jd2cal(jd)% JD2CAL  Converts Julian date to calendar date using algorithm%   from "Practical Ephemeris Calculations" by Oliver Montenbruck%   (Springer-Verlag, 1989). Must use astronomical year for B.C.%   dates (2 BC = -1 yr). Non-vectorized version. See also CAL2JD,%   DOY2JD, GPS2JD, JD2DOW, JD2DOY, JD2GPS, JD2YR, YR2JD.% Version: 24 Apr 99% Usage:   [yr, mn, dy]=jd2cal(jd)% Input:   jd - Julian date% Output:  yr - year of calendar date%          mn - month of calendar date%          dy - day of calendar date (including decimal)if nargin ~= 1  warning('Incorrect number of arguments');  return;endif jd < 0  warning('Julian date must be greater than or equal to zero');  return;enda = fix(jd+0.5);if a < 2299161  c = a + 1524;else  b = fix( (a-1867216.25) / 36524.25 );  c = a + b - fix(b/4) + 1525;endd = fix( (c-122.1)/365.25 );e = fix(365.25*d);f = fix( (c-e) / 30.6001 );dy = c - e - fix(30.6001*f) + rem((jd+0.5),a);mn = f - 1 - 12*fix(f/14);yr = d - 4715 - fix( (7+mn)/10 );

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -