感谢严老师的无私奉献
avperrset——设置姿态、速度和位置误差
function davp = avperrset(phi, dvn, dpos)——'姿态、速度和位置误差设置,此函数的作用主要是将常用单位转化成国际标准单位'
% avp errors setting.
%
% Prototype: davp = avperrset(phi, dvn, dpos)
% Inputs: phi - platform misalignment angles. all in arcmin——'姿态误差单位:分'
% dvn - velocity errors in m/s——'速度误差单位:米/秒'
% dpos - position errors dpos=[dlat;dlon;dhgt], all in m——'位置误差单位:米'
% Output: davp = [phi; dvn; dpos]
%
% See also poserrset, vperrset, avpadderr, imuerrset, avpset, insupdate, avperrstd.
% Copyright(c) 2009-2014, by Gongmin Yan, All rights reserved.
% Northwestern Polytechnical University, Xi An, P.R.China
% 08/03/2014
global glv
davp = [rep3(phi)*glv.min;...——'将分转化成弧分,并将姿态误差转化成三行一列'
vperrset(dvn,dpos)];——'速度和位置误差设置'
function v31 = rep3(vxx)——'转化成三行一列向量'
% Repeat data to 3x1 vector.
%
% Prototype: v31 = rep3(vxx)
% Input: vxx - 1x1 or 2x1 vector input
% Output: v31 - 3x1 vector output
%
% See also norep, no0, avperrset, poserrset.
% Copyright(c) 2009-2021, by Gongmin Yan, All rights reserved.
% Northwestern Polytechnical University, Xi An, P.R.China
% 06/02/2021
v31 = vxx(:);
len = length(v31);
if len==1
v31 = [v31;v31;v31];
elseif len==2
v31 = [v31(1);v31(1);v31(2)];
end
v31 = v31(1:3);
function dvp = vperrset(dvn, dpos)——'速度和位置误差设置'
% vp errors setting.
%
% Prototype: dvp = vperrset(dvn, dpos)
% Inputs: dvn - velocity errors in m/s——'速度误差单位:米/秒'
% dpos - position errors dpos=[dlat;dlon;dhgt], all in m——'位置误差单位:米'
% Output: dvp = [dvn; dpos]
%
% See also avperrset, poserrset, avpadderr, imuerrset, avpset, insupdate.
% Copyright(c) 2009-2021, by Gongmin Yan, All rights reserved.
% Northwestern Polytechnical University, Xi An, P.R.China
% 06/02/2021
dvp = [rep3(dvn);...——'将速度误差转化成三行一列'
poserrset(dpos)];——'位置误差设置'
function dpos = poserrset(dpos0, dlon, dhgt)——'位置误差设置'
% position errors dpos=[dlat;dlon;dhgt] setting.
%
% Prototype: dpos = poserrset(dpos0)
% Input: dpos0=[dlat; dlon; dhgt], NOTE: dlat, dlon and dhgt are all in m.——'纬度、经度和高度误差单位:米'
% Output: dpos=[dpos0(1)/Re; dpos0(2)/Re; dpos0(3)], so dpos(1)=dlat,
% dpos(2)=dlon are in rad and dpos(3)=dhgt is in m.
%
% See also avperrset, vperrset, posset.
% Copyright(c) 2009-2014, by Gongmin Yan, All rights reserved.
% Northwestern Polytechnical University, Xi An, P.R.China
% 09/03/2014
global glv
if nargin==3——'输入三个变量,依次是纬度、经度和高度误差'
dpos0=[dpos0;dlon; dhgt];
end % dpos = poserrset(dlat, dlon, dhgt)
if nargin==2——'输入两个变量,纬度和经度误差相同'
dpos0=[dpos0;dpos0; dlon];
end % dpos = poserrset(dlat_dlon, dhgt)
dpos0 = rep3(dpos0);——'输入一个变量,将其转化成三行一列向量'
dpos = [dpos0(1:2)/glv.Re; dpos0(3)];——'将纬度和经度的单位转化成弧度'