diff --git a/floormap_editor.py b/floormap_editor.py index 778323e..5f3834a 100644 --- a/floormap_editor.py +++ b/floormap_editor.py @@ -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 diff --git a/floormaps/exp_room.pickle b/floormaps/exp_room.pickle index 9b269a6..14f60a2 100644 Binary files a/floormaps/exp_room.pickle and b/floormaps/exp_room.pickle differ diff --git a/libs/spacemap.py b/libs/spacemap.py index 7cdcd1c..c8e2727 100644 --- a/libs/spacemap.py +++ b/libs/spacemap.py @@ -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 diff --git a/syngen_floorplan_multipath.py b/syngen_floorplan_multipath.py index 3a5496d..1acd329 100644 --- a/syngen_floorplan_multipath.py +++ b/syngen_floorplan_multipath.py @@ -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 = [] diff --git a/tests/spacemap.py b/tests/spacemap.py index 863d383..4cafae9 100644 --- a/tests/spacemap.py +++ b/tests/spacemap.py @@ -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 = []