tropoc1.m

来自「GPS TOOLBOX包含以下内容: 1、GPS相关常量和转换因子; 2、角」· M 代码 · 共 43 行

M
43
字号
%                                 tropoc1.m
%  Scope:   This MATLAB macro computes tropospheric correction for a specified 
%           user by using a simplified model [1]; WGS-84 constants are used.
%  Usage:   tropoc = tropoc1(lat,lon,alt,elev,tgeoid)
%  Description of parameters:
%           lat    - input, user's latitude, in radians  (-pi/2 to +pi/2)
%           lon    - input, user's longitude, in radians  (0 to 2*pi)
%           alt    - input, user's altitude above WGS-84 ellipsoid, in meters
%           elev   - input, user's elevation angle, in radians
%           tgeoid - input, geoid heights table (in meters) for a 19 by 36
%                    Latitude/Longitude grid; the latitudes go northward 
%                    from -90 to 90 degrees, and longitudes go eastward 
%                    from 0 to 350 degrees          
%           tropoc - output, tropospheric correction, in meters
%  Reference:
%           [1] Farrell, J., Barth, M., The Global Positioning System and 
%               Inertial Navigation. McGraw Hill, 1998, p. 156.
%  External Matlab macros used:  geoidh
%  Last update: 09/14/99
%  Copyright (C) 1999 by LL Consulting. All Rights Reserved.

function   tropoc = tropoc1(lat,lon,alt,elev,tgeoid)


%  Calculate MSL altitude (in meters)

altmsl = alt - geoidh(lat,lon,tgeoid);

%  Compute the tropospheric correction (in meters)

if (altmsl > 0.)
   temp = 2.4225 * exp(-altmsl/7492.8);
else 
   temp = 2.4225;
end

sinelev = sin(elev);
if (sinelev <= 0.)
   tropoc = temp / 0.026;
else 
   tropoc = temp /(sinelev + 0.026);
end

⌨️ 快捷键说明

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