赞
踩
PSINS工具箱的函数:
vp = getgnssvp(ephs, obss, tp, isfig)
如上图,最后是绘图的标记“isfig”,但是实际这个标记没有用到,原函数内容:
function vp = getgnssvp(ephs, obss, tp, isfig) % see also findgpsobs. global ggps findgpsobs(obss); recPos = [0,0,0,0]'; if nargin<3, tp=-1; end for k=1:100 [obsi,tp] = findgpsobs(tp); if size(obsi,1)<=4, tp=tp+1; continue; end [satpv, clkerr, TGD, orbitp] = satPosVelBatch(obsi(1,1)-obsi(:,3)/ggps.c, ephs(obsi(:,2),:)); [pvt, vp, res] = lspvt(recPos, satpv, [obsi(:,3)+clkerr(:,2)*ggps.c]); break; end if nargin>=4 AzEl = satPos2AzEl(satpv, vp(4:6)); satplot(obsi(:,2), AzEl); end
我在函数末尾加上选择语句,按照习惯,当isfig == 0时,不绘图,isfig == 1时,绘图,修改后的函数如下:
function vp = EV_getgnssvp(ephs, obss, tp, isfig) % see also findgpsobs. global ggps findgpsobs(obss); recPos = [0,0,0,0]'; if nargin<3, tp=-1; end for k=1:100 [obsi,tp] = findgpsobs(tp); if size(obsi,1)<=4, tp=tp+1; continue; end [satpv, clkerr, TGD, orbitp] = satPosVelBatch(obsi(1,1)-obsi(:,3)/ggps.c, ephs(obsi(:,2),:)); [pvt, vp, res] = lspvt(recPos, satpv, [obsi(:,3)+clkerr(:,2)*ggps.c]); break; end if nargin>=4 && isfig == 1 AzEl = satPos2AzEl(satpv, vp(4:6)); satplot(obsi(:,2), AzEl); end
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。