Commit 7985eb25420144a35d6cb1ddc86c2436dcbc7842
1 parent
32a9f674
1 修改实时绘制用户轨迹以及历史轨迹查询的过滤精度为100米
Showing
3 changed files
with
8 additions
and
24 deletions
moudle_pedometer/src/main/java/com/cnlive/moudle/calorie/service/CalorieService.java
| @@ -228,9 +228,6 @@ public class CalorieService extends Service implements SensorEventListener { | @@ -228,9 +228,6 @@ public class CalorieService extends Service implements SensorEventListener { | ||
| 228 | if (mBatInfoReceiver != null) { | 228 | if (mBatInfoReceiver != null) { |
| 229 | unregisterReceiver(mBatInfoReceiver); | 229 | unregisterReceiver(mBatInfoReceiver); |
| 230 | } | 230 | } |
| 231 | - if (EventBus.getDefault().isRegistered(this)) { | ||
| 232 | - EventBus.getDefault().unregister(this); | ||
| 233 | - } | ||
| 234 | hasStepCount = 0; | 231 | hasStepCount = 0; |
| 235 | hasRecord = false; | 232 | hasRecord = false; |
| 236 | CURRENT_STEP = 0; | 233 | CURRENT_STEP = 0; |
| @@ -246,19 +243,6 @@ public class CalorieService extends Service implements SensorEventListener { | @@ -246,19 +243,6 @@ public class CalorieService extends Service implements SensorEventListener { | ||
| 246 | //接收事件 | 243 | //接收事件 |
| 247 | @Subscribe(threadMode = ThreadMode.BACKGROUND) | 244 | @Subscribe(threadMode = ThreadMode.BACKGROUND) |
| 248 | public void Event(MessageEvent messageEvent) { | 245 | public void Event(MessageEvent messageEvent) { |
| 249 | -// //暂停计步 | ||
| 250 | -// if (messageEvent.getMessageType() == Constant.SERVICE_STEP_COUNT_PAUSE) { | ||
| 251 | -// pauseFlag = true; | ||
| 252 | -// } | ||
| 253 | -// //继续计步 | ||
| 254 | -// else if (messageEvent.getMessageType() == Constant.SERVICE_STEP_COUNT_CONTINUE) { | ||
| 255 | -// pauseFlag = false; | ||
| 256 | -// } | ||
| 257 | - | ||
| 258 | - //更新锁屏步数 | ||
| 259 | - if (messageEvent.getMessageType() == Constant.COLL_SERVICE_STEP_COUNT_ONRESUME) { | ||
| 260 | - updateNotification(); | ||
| 261 | - } | ||
| 262 | 246 | ||
| 263 | } | 247 | } |
| 264 | 248 |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/model/Constant.java
| @@ -37,13 +37,13 @@ public class Constant { | @@ -37,13 +37,13 @@ public class Constant { | ||
| 37 | /*****************************************运营工具其他值,非标志位****************************************************/ | 37 | /*****************************************运营工具其他值,非标志位****************************************************/ |
| 38 | public static final double PASS_RATE = 0.7;//通过率70% | 38 | public static final double PASS_RATE = 0.7;//通过率70% |
| 39 | public static final int CHECK_ACCURACY = 50;//判断用户是否完成的精度范围 | 39 | public static final int CHECK_ACCURACY = 50;//判断用户是否完成的精度范围 |
| 40 | - public static final int LOCA_ACCURACY = 30;//定位过滤精度 | 40 | + public static final int LOCA_ACCURACY = 100;//定位过滤精度 |
| 41 | public static final int LOCA_END_POINT_ACCURACY = 20;//终点位置比较精度 | 41 | public static final int LOCA_END_POINT_ACCURACY = 20;//终点位置比较精度 |
| 42 | public static final int LOCA_START_POINT_ACCURACY = 20;//起点位置比较精度 | 42 | public static final int LOCA_START_POINT_ACCURACY = 20;//起点位置比较精度 |
| 43 | public static final int FENCE_OFFSET = 50;//围栏偏离距离 | 43 | public static final int FENCE_OFFSET = 50;//围栏偏离距离 |
| 44 | - public static final int FENCE_DENOISE = 20;//围栏去噪精度 | 44 | + public static final int FENCE_DENOISE = 20;//围栏去噪精度20 |
| 45 | public static final int TAKE_POINT_MAX_SIZE = 100;//最大打点数量 | 45 | public static final int TAKE_POINT_MAX_SIZE = 100;//最大打点数量 |
| 46 | public static final int COLL_GEORESULT_RADIUS = 20;//打点逆地理半径 | 46 | public static final int COLL_GEORESULT_RADIUS = 20;//打点逆地理半径 |
| 47 | public static final int WEBVIEW_FONT_SIZE = 40;//webview显示的网页文字大小 | 47 | public static final int WEBVIEW_FONT_SIZE = 40;//webview显示的网页文字大小 |
| 48 | - public static final int Need_ZOOM_IN_RADUIS = 80;//需要扩大精度范围 | 48 | + public static final int Need_ZOOM_IN_RADUIS = 100;//需要扩大精度范围 |
| 49 | } | 49 | } |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/utils/MyMapUtil.java
| @@ -501,12 +501,12 @@ public class MyMapUtil { | @@ -501,12 +501,12 @@ public class MyMapUtil { | ||
| 501 | //自动判断交通方式 | 501 | //自动判断交通方式 |
| 502 | processOption.setTransportMode(TransportMode.walking); | 502 | processOption.setTransportMode(TransportMode.walking); |
| 503 | // 设置精度过滤值(定位精度大于100米的过滤掉) | 503 | // 设置精度过滤值(定位精度大于100米的过滤掉) |
| 504 | - boolean isNeedZoomInRaduis= PhoneUtil.isNeedZoomInLoacRaduis(); | ||
| 505 | - if (isNeedZoomInRaduis){ | ||
| 506 | - processOption.setRadiusThreshold(Constant.Need_ZOOM_IN_RADUIS); | ||
| 507 | - }else { | 504 | +// boolean isNeedZoomInRaduis= PhoneUtil.isNeedZoomInLoacRaduis(); |
| 505 | +// if (isNeedZoomInRaduis){ | ||
| 506 | +// processOption.setRadiusThreshold(Constant.Need_ZOOM_IN_RADUIS); | ||
| 507 | +// }else { | ||
| 508 | processOption.setRadiusThreshold(Constant.LOCA_ACCURACY); | 508 | processOption.setRadiusThreshold(Constant.LOCA_ACCURACY); |
| 509 | - } | 509 | +// } |
| 510 | 510 | ||
| 511 | // 设置纠偏选项 | 511 | // 设置纠偏选项 |
| 512 | historyTrackRequest.setProcessOption(processOption); | 512 | historyTrackRequest.setProcessOption(processOption); |