📄 hpe.m
字号:
% hpe.m
% Scope: This MATLAB macro computes the horizontal position error (range)
% when latitude and longitude for two points are given; WGS-84
constants are used.
% Usage: x = hpe(lat1,lon1,lat2,lon2)
% Description of parameters:
% lat1 - input, latitude of the first position point, in radians
% lon1 - input, longitude of the first position point, in radians
% lat2 - input, latitude of the second position point, in radians
% lon2 - input, longitude of the second position point, in radians
% xout - output, horizontal position error (range) between the two
% defined position points, in meters
% Remarks: 1) The macro wgs84con should be called before using the macro hpe
% in order to initialize the global variables used.
% 2) The computation accuracy is limited due to algorithm approxima-
% tions; it is recommended to be used when the range is less than
% 100 km.
% External Matlab macros used: wgs84con
% Last update: 01/07/01
% Copyright (C) 1996-00 by LL Consulting. All Rights Reserved.
function xout = hpe(lat1,lon1,lat2,lon2)
global a_smaxis eccentr2 % see macro wgs84.con
dlat = lat1 - lat2;
dlon = lon1 - lon2;
temp1 = sin(0.5*(lat1 + lat2));
temp1 = 0.5*eccentr2*temp1*temp1;
deltaN = dlat*a_smaxis*(1. - eccentr2)*(1. + 3.*temp1);
deltaE = dlon*a_smaxis*cos(lat1)*(1. + temp1);
xout = sqrt(deltaN*deltaN + deltaE*deltaE);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -