GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — codeInBlogs/online_loc.m at master · wangxm006/codeInBlogs

Expand file tree

/

online_loc.m

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
28 lines (26 loc) · 1013 Bytes
/

online_loc.m

Copy path

File metadata and controls

28 lines (26 loc) · 1013 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
function predictions = online_loc(offline_rss, offline_location, online_rss, type)
%模拟在线定位
%offline_location和offline_rss是离线指纹库,每行为一组指纹
%online_rss为在线RSS,每行为一个RSS向量
predictions = zeros(size(online_rss, 1), size(offline_location, 2));
disp(type);
if type == 'knn_reg' %常用的knn定位
tic;
lasttime = 0;
for i = 1:size(online_rss, 1) %分别对每个RSS向量进行定位
curtime = toc;
if curtime - lasttime > 1
fprintf('进度:%f%%\n', i / size(online_rss, 1) * 100);
lasttime = curtime;
end
% knn回归
prediction = loc_knn_reg(offline_rss, offline_location, online_rss(i, :));
predictions(i, :) = prediction;
end
end
% knn分类器(label仅仅是名字,作为网格的标号,不作为数值型)
if type == 'knn_cls'
k = 40;
predictions = loc_knn_cls(offline_rss, offline_location, online_rss, k);
end
end
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.