%% Information about the code and its authors
% This program is designed for the project of course CSCE 5540@UNT, An
% introduction to sensor networks.
%
% The implementation is based on the paper by J. Jia, M. Liu and X. Li 2009:
% Accoustic Passive Localizatio Algorithm Based on Wireless Sensor
% Networks
% ------------------------
% | GUIDELINE TO THE CODE |
% ------------------------
% ------------------- ----------- ----------------
% | PARAMETER SETTING | ===> | CALCULATE | ====> | ERROR SIMULATE|
% ------------------- ----------- ----------------
% AcousticPassive_OpeningFcn| calculate_Callback | EEAM_Callback
% axes1_ButtonDownFcn | | |
% deploynetworks_Callback | |------- ALGO---------| |
% getArrayDistance | | | |
% radio10_Callback | V V |
% radio20_Callback | singleArray dualArray |
% radio30_Callback | _Execute _Execute |
% reset_Callback | |
%
% Univ&Dept: Department of Computer Science and Computer Engineering
% Author : Kevin Jung, Harsha Kandula, and Guangchun Cheng
% Date : FALL 2010
% Version : V1.0.0
%
% If there's any question, please contact the authors:
% Kevin Jung ([email protected])
% Harsha Kandula ([email protected])
% Guangchun Cheng ([email protected])
%%
function varargout = AcousticPassive(varargin)
% ACOUSTICPASSIVE M-file for AcousticPassive.fig
% ACOUSTICPASSIVE, by itself, creates a new ACOUSTICPASSIVE or raises the existing
% singleton*.
%
% H = ACOUSTICPASSIVE returns the handle to a new ACOUSTICPASSIVE or the handle to
% the existing singleton*.
%
% ACOUSTICPASSIVE('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in ACOUSTICPASSIVE.M with the given input arguments.
%
% ACOUSTICPASSIVE('Property','Value',...) creates a new ACOUSTICPASSIVE or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before AcousticPassive_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to AcousticPassive_OpeningFcn via varargin.
%
% *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 AcousticPassive
% Last Modified by GUIDE v2.5 01-Dec-2010 11:17:40
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @AcousticPassive_OpeningFcn, ...
'gui_OutputFcn', @AcousticPassive_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
%% Initialization of configuration data
% Executes just before AcousticPassive is made visible.
function AcousticPassive_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 command line arguments to AcousticPassive (see VARARGIN)
% Choose default command line output for AcousticPassive
handles.output = hObject;
eventhappensat.x = -1;
eventhappensat.y = -1;
set(handles.eventhappensat, 'userdata', eventhappensat);
eventestimatedat.x = -1;
eventestimatedat.y = -1;
set(handles.eventestimatedat, 'userdata', eventestimatedat);
networks = zeros(2,5,1); %2coordinate by 5arraysize by 1arraynumber
set(handles.figure1, 'userdata', networks);
errestimation = zeros(1,180,3); %1data by 180degree by 3distance
set(handles.axes2, 'userdata', errestimation);
maxVal = get(handles.radio10,'Max');
set(handles.radio10, 'Value', maxVal);
set(handles.axes1, 'ylim', [0 500]);
set(handles.axes1,'xlim', [0 500]);
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes AcousticPassive wait for user response (see UIRESUME)
% uiwait(handles.figure1);
%% --- Outputs from this function are returned to the command line.
function varargout = AcousticPassive_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;
% --- Executes on selection change in algorithm.
%% Selection of Algorithms, Single Array or Dual Arrays
function algorithm_Callback(hObject, eventdata, handles)
% hObject handle to algorithm (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: contents = cellstr(get(hObject,'String')) returns algorithm contents as cell array
% contents{get(hObject,'Value')} returns selected item from algorithm
val = get(hObject, 'Value');
options = get(hObject, 'String');
algo = options{val};
%% --- Executes during object creation, after setting all properties.
function algorithm_CreateFcn(hObject, eventdata, handles)
% hObject handle to algorithm (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: popupmenu controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
%% Input the number of arrays
function numberofarray_Callback(hObject, eventdata, handles)
% hObject handle to numberofarray (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 numberofarray as text
% str2double(get(hObject,'String')) returns contents of numberofarray as a double
numArrays = str2num(get(hObject,'String'));
%% --- Executes during object creation, after setting all properties.
function numberofarray_CreateFcn(hObject, eventdata, handles)
% hObject handle to numberofarray (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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
%% Input the size of each array, suppose each array are the same size
function sizeofarray_Callback(hObject, eventdata, handles)
% hObject handle to sizeofarray (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 sizeofarray as text
% str2double(get(hObject,'String')) returns contents of sizeofarray as a double
sizeArray = st

gccheng
- 粉丝: 1
最新资源
- 软考网络工程师全面复习笔记汇总.docx
- 路由交换技术课程设计任务书网络.doc
- 电力系统中并联型有源电力滤波器APF的Simulink仿真与Matlab建模——基于瞬时无功功率理论的ip-iq谐波检测算法
- 网络结构拓扑图.ppt
- 建设工程项目管理操作手册(11页-含图表).doc
- 网络推广方案示例.doc
- 巧克力网络营销在线推广策略.ppt
- 决策树算法研究.doc
- 文献管理软件Endnote及其新功能.ppt
- 2023年操作系统试题库综合题.doc
- python基础100练习题.doc
- 传感器试验程序MATLAB.doc
- 企划外包网络营销价格策略新知助业营销策划机构推.pptx
- 自动化专业生产实习报告.docx
- MATLAB-Carsim联合仿真:基于LQR的车辆横向控制模型(输入:前轮转角,输出:横向误差与航向误差) · CarSim
- 基于最大诚信原则的我国互联网保险法律风险问题研究.pdf
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



- 1
- 2
- 3
- 4
- 5
前往页