Commit 37c85bdb authored by jaehyu's avatar jaehyu

added comments

parent 37b9dc06
......@@ -3,7 +3,6 @@ package com.skt.ehs.mbs.fpbuilder;
import com.skt.ehs.mbs.db.maria.DBManager;
import com.skt.ehs.mbs.db.maria.MariaConnectionManager;
import com.skt.ehs.mbs.db.maria.dao.FPBLEBuildDAO;
import com.sun.java.swing.plaf.windows.WindowsTreeUI;
import org.apache.ibatis.session.SqlSession;
import java.util.*;
......@@ -115,7 +114,6 @@ public class BLEFPBuilder {
double scale_pixel = readMapScale();
System.out.println("scale_pixel : "+scale_pixel);
mFloor.setMap_scale_pixel(scale_pixel);
// Todo access DB & calculate factor & build fp.
/*********************** Loop of loop here ... *************************************/
// 수집방향 맵 준비
......@@ -152,16 +150,19 @@ public class BLEFPBuilder {
new _ble_indicator("cccc", 6666),
new _ble_indicator("bbbb", 7777));
// transform list to map
Map<String,List<Integer>> transform = sample2.stream().collect(Collectors.groupingBy(_ble_indicator::get_ap_id,
Collectors.mapping(_ble_indicator::get_rssi,Collectors.toList())));
// prepare for insert value for storing
List<_fp_elem> fp_per_cell = new ArrayList<>();
// map traverse using set view
Set<Map.Entry<String, List<Integer>>> entries = transform.entrySet();
for(Map.Entry<String,List<Integer>> entry : entries ) {
List<Integer> rssi_list = entry.getValue();
// calculate statistics
final int count = rssi_list.size();
final double rssi_min = rssi_list.stream().mapToDouble(Integer::doubleValue).summaryStatistics().getMin();
final double rssi_max = rssi_list.stream().mapToDouble(Integer::doubleValue).summaryStatistics().getMax();
......@@ -178,7 +179,8 @@ public class BLEFPBuilder {
System.out.println(print_elem);
}
// calculate mag_angle - 해당 cell의 각 수집방향에 대하여 수집된 지자기방향의 평균값으로 대표
// then insert into fp_ble_data table
// insert rows to db.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment