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
b2e4646d
Commit
b2e4646d
authored
Dec 08, 2016
by
jaehyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clear error-prone codes
parent
4b7aa107
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
22 deletions
+24
-22
src/main/java/com/skt/ehs/mbs/fpbuilder/blefpbuilder/BLEFpBuilder.java
.../com/skt/ehs/mbs/fpbuilder/blefpbuilder/BLEFpBuilder.java
+22
-21
src/main/java/com/skt/ehs/mbs/fpbuilder/blefpbuilder/BLE_Floor.java
...ava/com/skt/ehs/mbs/fpbuilder/blefpbuilder/BLE_Floor.java
+2
-1
No files found.
src/main/java/com/skt/ehs/mbs/fpbuilder/blefpbuilder/BLEFpBuilder.java
View file @
b2e4646d
...
...
@@ -21,39 +21,40 @@ public class BLEFpBuilder {
public
static
final
int
SAMPLE_BUILDING_ID
=
1
;
public
static
final
int
SAMPLE_FLOOR_ID
=
1
;
BLE_Floor
m
Floor
;
BLE_Floor
b
Floor
;
public
BLEFpBuilder
(
int
M
,
int
N
,
int
sizeOfCell
)
{
mFloor
=
new
BLE_Floor
(
M
,
N
,
sizeOfCell
);
bFloor
=
new
BLE_Floor
(
M
,
N
,
sizeOfCell
);
}
public
void
LoadCellID
()
{
for
(
int
x
=
1
;
x
<=
m
Floor
.
getM
();
x
++)
{
for
(
int
x
=
1
;
x
<=
b
Floor
.
getM
();
x
++)
{
int
id
=
0
;
int
id_x
=
1000
*
x
;
for
(
int
y
=
1
;
y
<=
m
Floor
.
getN
();
y
++)
{
for
(
int
y
=
1
;
y
<=
b
Floor
.
getN
();
y
++)
{
id
=
id_x
+
y
;
_ble_cell
bleCell
=
new
_ble_cell
(
id
);
m
Floor
.
setCell
(
x
-
1
,
y
-
1
,
bleCell
);
b
Floor
.
setCell
(
x
-
1
,
y
-
1
,
bleCell
);
}
}
m
Floor
.
showCellID
();
b
Floor
.
showCellID
();
}
public
void
LoadCellLocation
()
{
int
location_x
=
0
;
int
location_y
=
0
;
int
cell_size
=
m
Floor
.
getBle_cell_size
();
int
cell_size
=
b
Floor
.
getBle_cell_size
();
for
(
int
x
=
1
;
x
<=
m
Floor
.
getM
();
x
++)
{
for
(
int
x
=
1
;
x
<=
b
Floor
.
getM
();
x
++)
{
location_x
=
(
cell_size
*
x
)
-
(
cell_size
/
2
);
for
(
int
y
=
1
;
y
<=
m
Floor
.
getN
();
y
++)
{
for
(
int
y
=
1
;
y
<=
b
Floor
.
getN
();
y
++)
{
location_y
=
(
cell_size
*
y
)
-
(
cell_size
/
2
);
m
Floor
.
setCellLocation
(
x
-
1
,
y
-
1
,
location_x
,
location_y
);
b
Floor
.
setCellLocation
(
x
-
1
,
y
-
1
,
location_x
,
location_y
);
}
}
m
Floor
.
showCellLocation
();
b
Floor
.
showCellLocation
();
}
public
boolean
LoadDBConnectionPool
()
{
...
...
@@ -173,15 +174,15 @@ public class BLEFpBuilder {
int
campus_id
=
SAMPLE_CAMPUS_ID
;
int
building_id
=
SAMPLE_BUILDING_ID
;
int
floor_id
=
SAMPLE_FLOOR_ID
;
int
object_cell_size
=
m
Floor
.
getBle_cell_size
();
int
object_cell_size
=
b
Floor
.
getBle_cell_size
();
int
ble_cell_id
;
double
scale_pixel
=
readMapScale
(
campus_id
,
building_id
,
floor_id
);
// 수집시 사용한 지도의 축척정보
m
Floor
.
setMap_scale_pixel
(
scale_pixel
);
b
Floor
.
setMap_scale_pixel
(
scale_pixel
);
double
object_scale_pixel
;
if
((
object_scale_pixel
=
m
Floor
.
getMap_scale_pixel
())==
0
)
{
}
if
((
object_scale_pixel
=
b
Floor
.
getMap_scale_pixel
())==
0
)
{
}
System
.
out
.
println
(
"object_scale_pixel : "
+
object_scale_pixel
);
System
.
out
.
println
(
"object_cell_size : "
+
object_cell_size
);
...
...
@@ -189,24 +190,24 @@ public class BLEFpBuilder {
System
.
out
.
println
(
"ble_fp_builder process started .................... "
);
int
[]
rssi_dir_index
=
m
Floor
.
loadRSSIDir
();
int
[]
rssi_dir_index
=
b
Floor
.
loadRSSIDir
();
rssiDirBound
rssi_dir
;
for
(
int
i
=
0
;
i
<
rssi_dir_index
.
length
;
i
++
)
{
// 1.수집방향별로 세트를 구성
rssi_dir
=
normalizeRssiDir
(
rssi_dir_index
[
i
]);
for
(
int
m
=
0
;
m
<
m
Floor
.
getM
();
m
++)
{
for
(
int
n
=
0
;
n
<
m
Floor
.
getN
();
n
++)
{
// 2.격자별....
for
(
int
m
=
0
;
m
<
b
Floor
.
getM
();
m
++)
{
for
(
int
n
=
0
;
n
<
b
Floor
.
getN
();
n
++)
{
// 2.격자별....
ble_cell_id
=
m
Floor
.
getCell
(
m
,
n
).
get_id
();
ble_cell_id
=
b
Floor
.
getCell
(
m
,
n
).
get_id
();
System
.
out
.
printf
(
"floor_id : %d, building_id : %d, campus_id : %d, ble_cell_id : %d, lower_rssi_dir : %d, upper_rssi_dir : %d "
,
floor_id
,
building_id
,
campus_id
,
ble_cell_id
,
rssi_dir
.
get_lower_rssi_dir
(),
rssi_dir
.
get_upper_rssi_dir
()
);
System
.
out
.
printf
(
" ble_cell_location : ("
+
mFloor
.
getCell
(
m
,
n
).
get_location_x
()+
", "
+
m
Floor
.
getCell
(
m
,
n
).
get_location_y
()+
")"
);
System
.
out
.
printf
(
" ble_cell_location : ("
+
bFloor
.
getCell
(
m
,
n
).
get_location_x
()+
", "
+
b
Floor
.
getCell
(
m
,
n
).
get_location_y
()+
")"
);
System
.
out
.
println
();
int
cell_location_x
=
m
Floor
.
getCell
(
m
,
n
).
get_location_x
();
int
cell_location_y
=
m
Floor
.
getCell
(
m
,
n
).
get_location_y
();
int
cell_location_x
=
b
Floor
.
getCell
(
m
,
n
).
get_location_x
();
int
cell_location_y
=
b
Floor
.
getCell
(
m
,
n
).
get_location_y
();
int
coordinate_pixel_x1
=
(
cell_location_x
-
object_cell_size
/
2
)
/
(
int
)
object_scale_pixel
;
int
coordinate_pixel_y1
=
(
cell_location_y
-
object_cell_size
/
2
)
/
(
int
)
object_scale_pixel
;
...
...
src/main/java/com/skt/ehs/mbs/fpbuilder/blefpbuilder/BLE_Floor.java
View file @
b2e4646d
...
...
@@ -29,7 +29,8 @@ class BLE_Floor {
public
void
showCellID
()
{
for
(
int
j
=
0
;
j
<
bcm_N
;
j
++)
{
for
(
int
i
=
0
;
i
<
bcm_M
;
i
++)
{
System
.
out
.
printf
(
"%9d "
,
bcm
[
i
][
j
].
get_id
());
if
(
bcm
[
i
][
j
]
!=
null
)
System
.
out
.
printf
(
"%9d "
,
bcm
[
i
][
j
].
get_id
());
}
System
.
out
.
println
();
}
...
...
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