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

📄 gpslsec.m

📁 GPS TOOLBOX包含以下内容: 1、GPS相关常量和转换因子; 2、角度变换; 3、坐标系转换: &#61656 点变换; &#61656 矩阵变换; &#61656 向量变换
💻 M
字号:
%                                 gpslsec.m
%  Scope:   This MATLAB macros determines the UTC leap seconds value for a 
%           specified year between 1980 and 2059; after the year 1999 the leap 
%           second value is only an estimate.
%  Usage:   xoutput = gpslsec(year)
%  Description of parameters:
%           year     - input, year (between 1980 and 2059)
%           xoutput  - output, UTC leap seconds value 
%                      the result is set to -1 for out of range inputs
%  Last update:  04/16/00
%  Copyright (C) 1999-00 by LL Consulting. All Rights Reserved.

function  xoutput = gpslsec(year)

if (year < 1980)
   disp('Error 1 - GPSLSEC; year is not in range (year < 1980)');
   xoutput = - 1;
elseif (year >= 1980.) & (year < 1981.5)
   xoutput = 0;
elseif (year >= 1981.5) & (year < 1982.5)
   xoutput = 1;
elseif (year >= 1982.5) & (year < 1983.5)
   xoutput = 2;
elseif (year >= 1983.5) & (year < 1985.5)
   xoutput = 3;
elseif (year >= 1985.5) & (year < 1988.)
   xoutput = 4;
elseif (year >= 1988.) & (year < 1990.)
   xoutput = 5;
elseif (year >= 1990.) & (year < 1991.)
   xoutput = 6;
elseif (year >= 1991.) & (year < 1992.5)
   xoutput = 7;
elseif (year >= 1992.5) & (year < 1993.5)
   xoutput = 8;
elseif (year >= 1993.5) & (year < 1994.5)
   xoutput = 9;
elseif (year == 1994.5) & (year < 1996.)
   xoutput = 10;
elseif (year == 1996.) | (year < 1998.)
   xoutput = 11;
elseif (year >= 1998) & (year < 1999.5)
   xoutput = 12;
elseif (year >= 1999.5) & (year < 2001.)
   xoutput = 13;

%  estimated values  (linear interpolation between values are recommended)

elseif (year >= 2001.) & (year <= 2059.)
   xoutput = floor(14. + (22./29.)*(year - 2001.));
else  
   disp('Error 2 - GPSLSEC; year is not in range (year > 2059)');
   xoutput = - 1;
end

⌨️ 快捷键说明

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