/**
* Check to see if the coverage area (location) of an RF emitter is close
* enough to others in a group that we can believably add it to the group.
* @param location The coverage area of the candidate emitter
* @param locGroup The coverage areas of the emitters already in the group
* @param radius The coverage radius expected for they type of emitter
* we are dealing with.
* @return
*/
private boolean locationCompatibleWithGroup(Location location,
Set<Location> locGroup,
double radius) {
// If the location is within range of all current members of the
// group, then we are compatible.
for (Location other : locGroup) {
double testDistance = (location.distanceTo(other) -
location.getAccuracy() -
other.getAccuracy());
if (testDistance > radius) {
return false;
}
}
return true;
}
BackendService.java 文件源码
java
阅读 32
收藏 0
点赞 0
评论 0
项目:DejaVu
作者:
评论列表
文章目录