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

📄 hpro1014.m

📁 自己编写的kalman滤波算法的应用
💻 M
📖 第 1 页 / 共 4 页
字号:
function varargout = hpro1014(varargin)% HPRO1014 Application M-file for hpro1014.fig%    FIG = HPRO1014 launch hpro1014 GUI.%    HPRO1014('callback_name', ...) invoke the named callback.% Last Modified by GUIDE v2.0 16-Oct-2003 15:56:25if nargin == 0  % LAUNCH GUI	fig = openfig(mfilename,'reuse');	% Generate a structure of handles to pass to callbacks, and store it. 	handles = guihandles(fig);	guidata(fig, handles);	if nargout > 0		varargout{1} = fig;	endelseif ischar(varargin{1}) % INVOKE NAMED SUBFUNCTION OR CALLBACK	try		if (nargout)			[varargout{1:nargout}] = feval(varargin{:}); % FEVAL switchyard		else			feval(varargin{:}); % FEVAL switchyard		end	catch		disp(lasterr);	endend%| ABOUT CALLBACKS:%| GUIDE automatically appends subfunction prototypes to this file, and %| sets objects' callback properties to call them through the FEVAL %| switchyard above. This comment describes that mechanism.%|%| Each callback subfunction declaration has the following form:%| <SUBFUNCTION_NAME>(H, EVENTDATA, HANDLES, VARARGIN)%|%| The subfunction name is composed using the object's Tag and the %| callback type separated by '_', e.g. 'slider2_Callback',%| 'figure1_CloseRequestFcn', 'axis1_ButtondownFcn'.%|%| H is the callback object's handle (obtained using GCBO).%|%| EVENTDATA is empty, but reserved for future use.%|%| HANDLES is a structure containing handles of components in GUI using%| tags as fieldnames, e.g. handles.figure1, handles.slider2. This%| structure is created at GUI startup using GUIHANDLES and stored in%| the figure's application data using GUIDATA. A copy of the structure%| is passed to each callback.  You can store additional information in%| this structure at GUI startup, and you can change the structure%| during callbacks.  Call guidata(h, handles) after changing your%| copy to replace the stored original so that subsequent callbacks see%| the updates. Type "help guihandles" and "help guidata" for more%| information.%|%| VARARGIN contains any extra arguments you have passed to the%| callback. Specify the extra arguments by editing the callback%| property in the inspector. By default, GUIDE sets the property to:%| <MFILENAME>('<SUBFUNCTION_NAME>', gcbo, [], guidata(gcbo))%| Add any extra arguments after the last argument, before the final%| closing parenthesis.% global MG;% global MA;% global SG;% global SA;% global ST; % global MANNER;% MANNER=0;% size=get(0,'ScreenSize');% %errordlg(num2str(size));% set(0,'Position','[1 1 1024 768]');% set(handles.eastspeed,'Enable','off');% set(handles.eastspeedvalue,'Enable','off');% set(handles.northspeed,'Enable','off');% set(handles.northspeedvalue,'Enable','off');% %-------------------------------------------------------------------- %function varargout = figure1_CreateFcn(h, eventdata, handles, varargin)% --------------------------------------------------------------------function varargout = sgyrodrift_Callback(h, eventdata, handles, varargin)% --------------------------------------------------------------------function varargout = mgyrodrift_Callback(h, eventdata, handles, varargin)% --------------------------------------------------------------------function varargout = maccebais_Callback(h, eventdata, handles, varargin)% --------------------------------------------------------------------function varargout = saccebias_Callback(h, eventdata, handles, varargin)% --------------------------------------------------------------------function varargout = ok_Callback(h, eventdata, handles, varargin)%errordlg;%set(handles.mgyrodrift,'String','faint');% p1=get(handles.mgyrodrift,'String');% p2=get(handles.maccebias,'String');% p3=get(handles.sgyrodrift,'String');% p4=get(handles.saccebias,'String');% p5=get(handles.simutime,'String');% % % errordlg(p1);% % errordlg(p2);% % errordlg(p3);% % errordlg(p4);% % MG=str2num(p1);% MA=str2num(p2);% SG=str2num(p3);% SA=str2num(p4);% ST=str2num(p5);% v1=get(handles.evenspeed,'value');% v2=get(handles.accespeed,'value');% v3=get(handles.sway,'value');% v4=get(handles.sshape,'value');% v5=get(handles.circleshape,'value');% v6=get(handles.rest,'value');% % % if  v1==1%     style=1;% elseif v2==1%     style=2;% elseif  v3==1%     style=3;% elseif v4==1%     style=4;% elseif v5==1%     style=5;% elseif v6==1%     style==6;% else%     style=0;% end%%%%%%the following is inserted on 2003, 9,16vsmatch=get(handles.smatch,'Value');vamatch=get(handles.amatch,'value');varmatch=get(handles.armatch,'value');vspmatch=get(handles.spmatch,'Value');vsamatch=get(handles.samatch,'Value');vsarmatch=get(handles.sarmatch,'Value');switch 1case vsmatch,    %errordlg('smatch');    h_speed1017;    case vspmatch    %errordlg('spmatch');    h_speedposition1017;case vsamatch    h_speedattitudematrix1017;case vsarmatch    h_speedanglerate1017;case vamatch    h_attitudematrix1017;case varmatch    h_anglerate1017;end%%%%%%%%%end of 2003,9.16  % save para MG MA SG SA ST manner;errordlg;close ;% --------------------------------------------------------------------function varargout = cancel_Callback(h, eventdata, handles, varargin)%set(handles.cancel,'Callback''close');%errordlg;% MG=0;% MA=0;% SG=0;% SA=0;% ST=0;% manner=0;% % save para MG MA SG SA ST manner;close ;% --------------------------------------------------------------------function varargout = edit5_Callback(h, eventdata, handles, varargin)% % --------------------------------------------------------------------% function varargout = radiobutton1_Callback(h, eventdata, handles, varargin)% % % % % % --------------------------------------------------------------------% function varargout = radiobutton2_Callback(h, eventdata, handles, varargin)% % % % % % --------------------------------------------------------------------% function varargout = radiobutton3_Callback(h, eventdata, handles, varargin)% % % % % % --------------------------------------------------------------------% function varargout = radiobutton4_Callback(h, eventdata, handles, varargin)% % --------------------------------------------------------------------function varargout = evenspeed_ButtonDownFcn(h, eventdata, handles, varargin)%errordlg('evenspeed');% --------------------------------------------------------------------function varargout = evenspeed_Callback(h, eventdata, handles, varargin)%MANNER=1;value=get(handles.evenspeed,'Value');if(value==1)   set(handles.accespeed,'Enable','off');   set(handles.sshape,'Enable','off');   set(handles.circleshape,'Enable','off');   set(handles.sway,'Enable','off');   set(handles.rest,'Enable','off');else   set(handles.accespeed,'Enable','on');   set(handles.sshape,'Enable','on');   set(handles.circleshape,'Enable','on');   set(handles.sway,'Enable','on');        set(handles.rest,'Enable','on');endvalue=get(handles.evenspeed,'Value');if(value==1)    set(handles.eastspeed,'Enable','on');    set(handles.northspeed,'Enable','on');    %set(handles.eastspeedvalue,'Enable','on');    %set(handles.northspeedvalue,'Enable','on');     else    set(handles.eastspeed,'Enable','off');    set(handles.northspeed,'Enable','off');    set(handles.eastspeedvalue,'Enable','off');    set(handles.northspeedvalue,'Enable','off');endif(value==1)%     %%%%把匀速运动的参数失效%     set(handles.eastspeed,'Enable','off');%     set(handles.northspeed,'Enable','off');%     set(handles.eastspeedvalue,'Enable','off');%     set(handles.northspeedvalue,'Enable','off');    %%%%把匀加速运动得到有关参数失效;    set(handles.eastaccer,'Enable','off');    set(handles.northaccer,'Enable','off');    set(handles.eastaccervalue,'Enable','off');    set(handles.northaccervalue,'Enable','off');    %%%%把摇摆运动的有关参数失效    set(handles.pitch,'Enable','off');    set(handles.roll,'Enable','off');    set(handles.yaw,'Enable','off');    %          set(handles.pitchvalue,'Enable','off');     set(handles.rollvalue,'Enable','off');     set(handles.yawvalue,'Enable','off');%          set(handles.pitchfcy,'Enable','off');     set(handles.rollfcy,'Enable','off');     set(handles.yawfcy,'Enable','off');%          set(handles.pitchorigphase,'Enable','off');     set(handles.rollorigphase,'Enable','off');     set(handles.yaworigphase,'Enable','off');     %%%b把s行机动的参数失效     %set(handles.sshapenorthspeed,'Enable','off');     set(handles.sshapenorthspeedvalue,'Enable','off');     set(handles.sshapeyawvalue,'Enable','off');     set(handles.sshapeyawfcy,'Enable','off');     set(handles.sshapeyaworigphase,'Enable','off');     %%%%把圆形运动的参数失效     set(handles.circleshapevalue,'Enable','off');         else%     %%%把匀速运动的参数生效%     set(handles.eastspeed,'Enable','on');%     set(handles.northspeed,'Enable','on');%     set(handles.eastspeedvalue,'Enable','on');%     set(handles.northspeedvalue,'Enable','on');    %%%%把匀加速运动得到有关参数生效;%     set(handles.eastaccer,'Enable','on');%     set(handles.northaccer,'Enable','on');%     set(handles.eastaccervalue,'Enable','on');%     set(handles.northaccervalue,'Enable','on');%     %%%%把摇摆运动的有关参数生效%      set(handles.pitch,'Enable', 'on');%     set(handles.roll,'Enable', 'on');%     set(handles.yaw,'Enable', 'on');% %     %      set(handles.pitchvalue,'Enable','on');%      set(handles.rollvalue,'Enable','on');%      set(handles.yawvalue,'Enable','on');% %     %      set(handles.pitchfcy,'Enable','on');%      set(handles.rollfcy,'Enable','on');%      set(handles.yawfcy,'Enable','on');% %     %      set(handles.pitchorigphase,'Enable','on');%      set(handles.rollorigphase,'Enable','on');%      set(handles.yaworigphase,'Enable','on');%      %%%%%把s行运动的参数生效%      set(handles.sshapenorthspeed,'Enable','on');%      set(handles.sshapenorthspeedvalue,'Enable','on'); %      set(handles.sshapeyawvalue,'Enable','on');%      set(handles.sshapeyawfcy,'Enable','on');%      set(handles.sshapeyaworigphase,'Enable','on');%      %%%%%把圆形运动的参数生效%      set(handles.circleshapevalue,'Enable','on');     end set(handles.smatch,'Enable','off');set(handles.samatch,'Enable','off');set(handles.sarmatch,'Enable','off');set(handles.spmatch,'Enable','off');set(handles.armatch,'Enable','off');set(handles.amatch,'Enable','off');% --------------------------------------------------------------------function varargout = accespeed_Callback(h, eventdata, handles, varargin)%MANNER=2;value=get(handles.accespeed,'Value');if(value==1)   set(handles.evenspeed,'Enable','off');   set(handles.sshape,'Enable','off');   set(handles.circleshape,'Enable','off');   set(handles.sway,'Enable','off');   set(handles.rest,'Enable','off');else   set(handles.evenspeed,'Enable','on');   set(handles.sshape,'Enable','on');   set(handles.circleshape,'Enable','on');   set(handles.sway,'Enable','on');    set(handles.rest,'Enable','on');endif(value==1)    set(handles.eastaccer,'Enable','on');    set(handles.northaccer,'Enable','on');    %set(handles.eastaccervalue,'Enable','on');    %set(handles.northaccervalue,'Enable','on');    else    set(handles.eastaccer,'Enable','off');    set(handles.northaccer,'Enable','off');    set(handles.eastaccervalue,'Enable','off');    set(handles.northaccervalue,'Enable','off');    end

⌨️ 快捷键说明

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