22.06.2015 Views

A MatLab Waypoint Generator For The Cal Poly Flight Simulator.pdf

A MatLab Waypoint Generator For The Cal Poly Flight Simulator.pdf

A MatLab Waypoint Generator For The Cal Poly Flight Simulator.pdf

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

22<br />

end<br />

else<br />

cp.error = 'Unknown Error In Chase.m: push_TAdd_<strong>Cal</strong>lback';<br />

edit_Error_<strong>Cal</strong>lback(h, eventdata, handles, varargin);<br />

end<br />

% --------------------------------------------------------------------<br />

function varargout = edit_Error_<strong>Cal</strong>lback(h, eventdata, handles, varargin)<br />

% Stub for <strong>Cal</strong>lback of the uicontrol handles.edit_Error.<br />

global cp;<br />

beep;<br />

set(handles.edit_Error,'string',cp.error);<br />

set(handles.edit_Error,'BackgroundColor',[1 0 0]);<br />

pause(0.1);<br />

set(handles.edit_Error,'BackgroundColor',get(0,...<br />

'defaultUicontrolBackgroundColor'));<br />

pause(0.1);<br />

set(handles.edit_Error,'BackgroundColor',[1 0 0]);<br />

pause(0.1);<br />

set(handles.edit_Error,'BackgroundColor',get(0,...<br />

'defaultUicontrolBackgroundColor'));<br />

% --------------------------------------------------------------------<br />

function varargout = pushbutton_Clear_<strong>Cal</strong>lback(h, eventdata, handles, ...<br />

varargin)<br />

% Stub for <strong>Cal</strong>lback of the uicontrol handles.pushbutton_Clear.<br />

global cp;<br />

cp.error = 'No Error';<br />

set(handles.edit_Error,'string',cp.error);<br />

set(handles.edit_Error,'BackgroundColor',get(0,...<br />

'defaultUicontrolBackgroundColor'));<br />

% --------------------------------------------------------------------<br />

function varargout = push_CreateFile_<strong>Cal</strong>lback(h, eventdata, handles, ...<br />

varargin)<br />

% Stub for <strong>Cal</strong>lback of the uicontrol handles.push_CreateFile.<br />

global cp;<br />

cp.path = get(handles.edit_FPDesc,'string');<br />

if isempty(cp.ic.x | cp.ic.y | cp.ic.alt | ...<br />

cp.ic.head | cp.ic.speed | cp.ic.bank) % Check for I.C.<br />

cp.error = 'All Initail Conditions Must Be Set';<br />

edit_Error_<strong>Cal</strong>lback(h, eventdata, handles, varargin);<br />

path_ok = 0;<br />

elseif isempty(cp.path) % Check for path desctiption<br />

cp.error = 'Path Description Required';<br />

edit_Error_<strong>Cal</strong>lback(h, eventdata, handles, varargin);

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!