Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
fpbuilder_ble
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jaehyu
fpbuilder_ble
Commits
a491953f
Commit
a491953f
authored
Dec 02, 2016
by
jaehyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commited for homework
parent
0e058332
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
10 deletions
+34
-10
src/main/java/com/skt/ehs/mbs/fpbuilder/BLEFPBuilder.java
src/main/java/com/skt/ehs/mbs/fpbuilder/BLEFPBuilder.java
+34
-10
No files found.
src/main/java/com/skt/ehs/mbs/fpbuilder/BLEFPBuilder.java
View file @
a491953f
...
...
@@ -9,6 +9,7 @@ import java.util.ArrayList;
import
java.util.Arrays
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.stream.Collectors
;
public
class
BLEFPBuilder
{
...
...
@@ -16,8 +17,6 @@ public class BLEFPBuilder {
public
static
final
int
LENGTH_X
=
8000
;
public
static
final
int
WIDTH_Y
=
4000
;
Floor
mFloor
;
public
BLEFPBuilder
(
int
M
,
int
N
)
{
...
...
@@ -58,9 +57,9 @@ public class BLEFPBuilder {
}
private
static
double
readMapScale
()
{
int
iCampusID
=
1
;
// Todo
c
onsole 에서 받아옴
int
iBuildingID
=
1
;
// Todo
c
onsole 에서 받아옴
int
iFloorID
=
1
;
// Todo
c
onsole 에서 받아옴
int
iCampusID
=
1
;
// Todo
: C
onsole 에서 받아옴
int
iBuildingID
=
1
;
// Todo
: C
onsole 에서 받아옴
int
iFloorID
=
1
;
// Todo
: C
onsole 에서 받아옴
double
ret
=
0
;
try
{
...
...
@@ -131,8 +130,33 @@ public class BLEFPBuilder {
List
<
_ble_indicator
>
ble_list
=
get_aplist_in_coordinate_per_rssidir
(
rssi_dir
,
rssi_dir
,
coordinate_pixel_x1
,
coordinate_pixel_y1
,
coordinate_pixel_x2
,
coordinate_pixel_y2
);
// sample ble_list
List
<
_ble_indicator
>
sample
=
new
ArrayList
<>();
_ble_indicator
a
=
new
_ble_indicator
(
"aaaaa"
,
1111
);
sample
.
add
(
a
);
_ble_indicator
b
=
new
_ble_indicator
(
"bbbb"
,
2222
);
sample
.
add
(
b
);
_ble_indicator
c
=
new
_ble_indicator
(
"aaaaa"
,
3333
);
sample
.
add
(
c
);
_ble_indicator
d
=
new
_ble_indicator
(
"ccccc"
,
4444
);
sample
.
add
(
d
);
_ble_indicator
e
=
new
_ble_indicator
(
"aaaaa"
,
5555
);
sample
.
add
(
e
);
_ble_indicator
f
=
new
_ble_indicator
(
"cccc"
,
6666
);
sample
.
add
(
f
);
_ble_indicator
g
=
new
_ble_indicator
(
"bbbb"
,
7777
);
sample
.
add
(
g
);
// using collection.stream()
// calculate rssi_min, rssi_max, rssi_avg, rssi_std_dev, count per ap_id
// rssi_avg per ap_id
sample
.
stream
().
collect
(
Collectors
.
groupingBy
(
ble
->
ble
.
m_ap_id
,
Collectors
.
counting
()))
.
forEach
(
(
x
,
y
)
->
System
.
out
.
println
(
x
+
"\t"
+
y
));
// calculate mag_angle - 해당 cell의 각 수집방향에 대하여 수집된 지자기방향의 평균값으로 대표
// then insert into fp_ble_data table
...
...
@@ -144,13 +168,13 @@ public class BLEFPBuilder {
public
static
void
main
(
String
[]
args
)
{
BLEFPBuilder
bleFPBuilder
=
new
BLEFPBuilder
((
LENGTH_X
%
CELL_SIZE_BLE
==
0
)?
LENGTH_X
/
CELL_SIZE_BLE
:
LENGTH_X
/
CELL_SIZE_BLE
+
1
,(
WIDTH_Y
%
CELL_SIZE_BLE
==
0
)?
WIDTH_Y
/
CELL_SIZE_BLE
:
WIDTH_Y
/
CELL_SIZE_BLE
+
1
);
// mFloor
bleFPBuilder
.
LoadCellID
();
bleFPBuilder
.
LoadCellLocation
();
BLEFPBuilder
fp
=
new
BLEFPBuilder
((
LENGTH_X
%
CELL_SIZE_BLE
==
0
)?
LENGTH_X
/
CELL_SIZE_BLE
:
LENGTH_X
/
CELL_SIZE_BLE
+
1
,(
WIDTH_Y
%
CELL_SIZE_BLE
==
0
)?
WIDTH_Y
/
CELL_SIZE_BLE
:
WIDTH_Y
/
CELL_SIZE_BLE
+
1
);
// mFloor
fp
.
LoadCellID
();
fp
.
LoadCellLocation
();
if
(!
bleFPBuilder
.
LoadDBConnectionPool
())
{
if
(!
fp
.
LoadDBConnectionPool
())
{
//exit
}
bleFPBuilder
.
build
();
fp
.
build
();
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment