bug fix
This commit is contained in:
parent
0907bda236
commit
7927e7241c
|
|
@ -28,7 +28,7 @@ def exproom():
|
|||
orientations = np.empty((64, 64), dtype=float) * float('nan')
|
||||
|
||||
wall_penetration = -30.0
|
||||
wall_reflection = -10.0
|
||||
wall_reflection = -15.0
|
||||
glass_penetration = -3.0
|
||||
glass_reflection = -3.0
|
||||
# walls
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -522,22 +522,20 @@ class SpaceMap():
|
|||
for path in self.endpaths:
|
||||
current_p = path
|
||||
target_p_found = None
|
||||
original_path_flag = True
|
||||
while current_p is not None:
|
||||
target_p = getPathFromRay(current_p, rx_loc, self)
|
||||
if target_p is None:
|
||||
break
|
||||
if (
|
||||
abs(target_p.getAngle() - current_p.getAngle()) <
|
||||
self.ray_trace_deg_tol * target_p.getTraveledDistance() and
|
||||
target_p not in rx_loc_paths
|
||||
):
|
||||
angle_diff = abs(target_p.getAngle() % (2 * np.pi) - current_p.getAngle() % (2 * np.pi))
|
||||
if angle_diff < self.ray_trace_deg_tol * max(target_p.getTraveledDistance(), 2):
|
||||
if target_p.getEndingPower() < NOISE_FLOOR:
|
||||
break
|
||||
continue
|
||||
target_p_found = target_p
|
||||
current_p = current_p.prev_ray
|
||||
if target_p_found is not None:
|
||||
original_path_flag = False
|
||||
if target_p_found is not None and target_p_found not in rx_loc_paths:
|
||||
rx_loc_paths.append(target_p_found)
|
||||
|
||||
# clean up for too nearby paths
|
||||
removeRedundantPaths(rx_loc_paths)
|
||||
return aggreatePower(rx_loc_paths), rx_loc_paths
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ def generateData(floormap, tx_locs, args):
|
|||
for power in powers:
|
||||
rss_vec = []
|
||||
starttime = int(time.time())
|
||||
tx_loc = SpaceBlock(0, 0)
|
||||
tx_loc = SpaceBlock(3.2, 3.2)
|
||||
floormap.traceRays(power, tx_loc)
|
||||
for j in range(0, rx_locs.shape[0], args.procnum):
|
||||
procs = []
|
||||
|
|
|
|||
|
|
@ -53,8 +53,8 @@ def test():
|
|||
|
||||
plotSpace(spacemap, cminmax=(-50, 0.0))
|
||||
|
||||
rx_locs = [SpaceBlock(3.2, 3.2), SpaceBlock(5.2, 4.3)]
|
||||
spacemap.traceRays(0.0, SpaceBlock(0.0, 0.0))
|
||||
rx_locs = [SpaceBlock(3.2, 3.3), SpaceBlock(3.2, 3.4), SpaceBlock(3.2, 3.5)]
|
||||
spacemap.traceRays(-40, SpaceBlock(3.2, 3.2))
|
||||
for rx_loc in rx_locs:
|
||||
rx_loc_rss, rx_loc_paths = spacemap.traceRay(rx_loc)
|
||||
multipaths = []
|
||||
|
|
|
|||
Loading…
Reference in New Issue