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

📄 run_offset_sim.m

📁 Simple GPS Simulation with RINEX Data
💻 M
字号:
function varargout = run_offset_sim(varargin)%RUN_OFFSET_SIM M-file for run_offset_sim.fig%      RUN_OFFSET_SIM, by itself, creates a new RUN_OFFSET_SIM or raises the existing%      singleton*.%%      H = RUN_OFFSET_SIM returns the handle to a new RUN_OFFSET_SIM or the handle to%      the existing singleton*.%%      RUN_OFFSET_SIM('Property','Value',...) creates a new RUN_OFFSET_SIM using the%      given property value pairs. Unrecognized properties are passed via%      varargin to run_offset_sim_OpeningFcn.  This calling syntax produces a%      warning when there is an existing singleton*.%%      RUN_OFFSET_SIM('CALLBACK') and RUN_OFFSET_SIM('CALLBACK',hObject,...) call the%      local function named CALLBACK in RUN_OFFSET_SIM.M with the given input%      arguments.%%      *See GUI Options on GUIDE's Tools menu.  Choose "GUI allows only one%      instance to run (singleton)".%% See also: GUIDE, GUIDATA, GUIHANDLES% Edit the above text to modify the response to help run_offset_sim% Last Modified by GUIDE v2.5 05-May-2005 11:04:27% Begin initialization code - DO NOT EDITgui_Singleton = 1;gui_State = struct('gui_Name',       mfilename, ...                   'gui_Singleton',  gui_Singleton, ...                   'gui_OpeningFcn', @run_offset_sim_OpeningFcn, ...                   'gui_OutputFcn',  @run_offset_sim_OutputFcn, ...                   'gui_LayoutFcn',  [], ...                   'gui_Callback',   []);if nargin && ischar(varargin{1})   gui_State.gui_Callback = str2func(varargin{1});endif nargout    [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});else    gui_mainfcn(gui_State, varargin{:});end% End initialization code - DO NOT EDIT% --- Executes just before run_offset_sim is made visible.function run_offset_sim_OpeningFcn(hObject, eventdata, handles, varargin)% This function has no output args, see OutputFcn.% hObject    handle to figure% eventdata  reserved - to be defined in a future version of MATLAB% handles    structure with handles and user data (see GUIDATA)% varargin   unrecognized PropertyName/PropertyValue pairs from the%            command line (see VARARGIN)% Choose default command line output for run_offset_simhandles.output = hObject;% Show Plotsldr_min = str2num(get(handles.sldbr_min,'string'));sldr_max = str2num(get(handles.sldbr_max,'string'));xlimits = [sldr_min sldr_max];PRN_value = str2num(get(handles.PRN,'string'));plot_sim(0,xlimits,PRN_value);% Update handles structureguidata(hObject, handles);% UIWAIT makes run_offset_sim wait for user response (see UIRESUME)uiwait(handles.figure1);% --- Executes on button press in MPV.function MPV_Callback(hObject, eventdata, handles)% hObject    handle to MPV (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    structure with handles and user data (see GUIDATA)reduce = 1.5/20;set(handles.sldr_offset,'sliderstep',[0.033334 0.1]);sldr_offset_value = get(handles.sldr_offset,'value');if abs(sldr_offset_value) > 1.5  sldr_offset_value = sldr_offset_value * reduce;  set(handles.sldr_offset,'value',sldr_offset_value);end% Update Plotxlimits = [-1.5 1.5];PRN_value = str2num(get(handles.PRN,'string'));plot_sim(sldr_offset_value,xlimits,PRN_value);sldr_offset_value = num2str(sldr_offset_value);set(handles.sldbr_location,'string',sldr_offset_value);set(handles.sldr_offset,'min',-1.5);set(handles.sldr_offset,'max',1.5);set(handles.sldbr_min,'string','-1.5');set(handles.sldbr_max,'string','1.5');guidata(hObject, handles);% --- Executes on button press in WV.function WV_Callback(hObject, eventdata, handles)% hObject    handle to WV (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    structure with handles and user data (see GUIDATA)set(handles.sldr_offset,'sliderstep',[0.005 0.1]);sldr_offset_value = get(handles.sldr_offset,'value');% Update Plotxlimits = [-20 20];PRN_value = str2num(get(handles.PRN,'string'));plot_sim(sldr_offset_value,xlimits,PRN_value);sldr_offset_value = num2str(sldr_offset_value);set(handles.sldbr_location,'string',sldr_offset_value);set(handles.sldr_offset,'min',-20);set(handles.sldr_offset,'max',20);set(handles.sldbr_min,'string','-20');set(handles.sldbr_max,'string','20');guidata(hObject, handles);% --- Executes on slider movement.function sldr_offset_Callback(hObject, eventdata, handles)% hObject    handle to sldr_offset (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    structure with handles and user data (see GUIDATA)sldr_offset_value = get(hObject,'value');sldr_min = str2num(get(handles.sldbr_min,'string'));sldr_max = str2num(get(handles.sldbr_max,'string'));% Update Plotxlimits = [sldr_min sldr_max];PRN_value = str2num(get(handles.PRN,'string'));plot_sim(sldr_offset_value,xlimits,PRN_value);sldr_offset_value = num2str(sldr_offset_value);set(handles.sldbr_location,'string',sldr_offset_value);guidata(hObject, handles);% Hints: get(hObject,'Value') returns position of slider%        get(hObject,'Min') and get(hObject,'Max') to determine range of slider% --- Executes on button press in Change_PRN.function Change_PRN_Callback(hObject, eventdata, handles)% hObject    handle to Change_PRN (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    structure with handles and user data (see GUIDATA)sldr_offset_value = get(handles.sldr_offset,'value');sldr_min = str2num(get(handles.sldbr_min,'string'));sldr_max = str2num(get(handles.sldbr_max,'string'));xlimits = [sldr_min sldr_max];PRN_value = str2num(get(handles.PRN,'string'));plot_sim(sldr_offset_value,xlimits,PRN_value);% --- Executes during object creation, after setting all properties.function sldr_offset_CreateFcn(hObject, eventdata, handles)% hObject    handle to sldr_offset (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    empty - handles not created until after all CreateFcns called% Hint: slider controls usually have a light gray background, change%       'usewhitebg' to 0 to use default.  See ISPC and COMPUTER.usewhitebg = 1;if usewhitebg    set(hObject,'BackgroundColor',[.9 .9 .9]);else    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));end% --- Executes during object creation, after setting all properties.function sldbr_min_CreateFcn(hObject, eventdata, handles)% hObject    handle to sldbr_min (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    empty - handles not created until after all CreateFcns called% --- Executes during object creation, after setting all properties.function sldbr_location_CreateFcn(hObject, eventdata, handles)% hObject    handle to sldbr_location (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    empty - handles not created until after all CreateFcns called% --- Executes during object creation, after setting all properties.function sldbr_max_CreateFcn(hObject, eventdata, handles)% hObject    handle to sldbr_max (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    empty - handles not created until after all CreateFcns calledfunction PRN_Callback(hObject, eventdata, handles)% hObject    handle to PRN (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of PRN as text%        str2double(get(hObject,'String')) returns contents of PRN as a double% --- Executes during object creation, after setting all properties.function PRN_CreateFcn(hObject, eventdata, handles)% hObject    handle to PRN (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    empty - handles not created until after all CreateFcns called% Hint: edit controls usually have a white background on Windows.%       See ISPC and COMPUTER.if ispc    set(hObject,'BackgroundColor','white');else    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));end% --- Outputs from this function are returned to the command line.function varargout = run_offset_sim_OutputFcn(hObject, eventdata, handles)% varargout  cell array for returning output args (see VARARGOUT);% hObject    handle to figure% eventdata  reserved - to be defined in a future version of MATLAB% handles    structure with handles and user data (see GUIDATA)% Get default command line output from handles structure% varargout{1} = handles.output;close all;

⌨️ 快捷键说明

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