3030 StatusType ,
3131)
3232from terragraph_planner .common .constants import (
33- ELE_SCAN_ANGLE_LIMIT ,
3433 LOWER_BOUND_FOR_LOS_DISTANCE ,
3534 UPPER_BOUND_FOR_LOS_DISTANCE ,
3635)
@@ -515,6 +514,7 @@ def compute_los_batch(
515514 left_top_y : Optional [float ],
516515 max_los_distance : int ,
517516 min_los_distance : int ,
517+ max_el_scan_angle : float ,
518518 los_confidence_threshold : float ,
519519 use_ellipsoidal_los_model : bool ,
520520 fresnel_radius : float ,
@@ -549,7 +549,7 @@ def compute_los_batch(
549549 surface_elevation ,
550550 max_los_distance * (1 + DISTANCE_TOLERANCE_PERCENT ),
551551 min_los_distance * (1 - DISTANCE_TOLERANCE_PERCENT ),
552- ELE_SCAN_ANGLE_LIMIT + ELE_SCAN_ANGLE_TOLERANCE ,
552+ min ( max_el_scan_angle + ELE_SCAN_ANGLE_TOLERANCE , 90 ) ,
553553 carrier_frequency ,
554554 exclusion_zones ,
555555 los_confidence_threshold ,
@@ -559,7 +559,7 @@ def compute_los_batch(
559559 surface_elevation ,
560560 max_los_distance * (1 + DISTANCE_TOLERANCE_PERCENT ),
561561 min_los_distance * (1 - DISTANCE_TOLERANCE_PERCENT ),
562- ELE_SCAN_ANGLE_LIMIT + ELE_SCAN_ANGLE_TOLERANCE ,
562+ min ( max_el_scan_angle + ELE_SCAN_ANGLE_TOLERANCE , 90 ) ,
563563 fresnel_radius ,
564564 exclusion_zones ,
565565 los_confidence_threshold ,
@@ -831,6 +831,7 @@ def construct_topology_from_los_result(
831831 device_list : List [DeviceData ],
832832 device_pair_to_max_los_dist : Dict [Tuple [str , str ], int ],
833833 min_los_dist : int ,
834+ max_el_scan_angle : float ,
834835) -> Topology :
835836 """
836837 Construct a Topology instance for candidate graph from LOS result.
@@ -849,6 +850,8 @@ def construct_topology_from_los_result(
849850 A dict mapping a pair of device SKUs to the max los distance.
850851 @param min_los_dist
851852 An int for the min los distance.
853+ @param max_el_scan_angle
854+ An float for the max elevation scan angle.
852855 @return
853856 A Topology representing the candidate graph.
854857 """
@@ -868,6 +871,7 @@ def construct_topology_from_los_result(
868871 confidence_dict ,
869872 device_pair_to_max_los_dist ,
870873 min_los_dist ,
874+ max_el_scan_angle ,
871875 )
872876
873877
@@ -928,6 +932,7 @@ def add_links_to_topology(
928932 confidence_dict : Dict [Tuple [int , int ], float ],
929933 device_pair_to_max_los_dist : Dict [Tuple [str , str ], int ],
930934 min_los_dist : int ,
935+ max_el_scan_angle : float ,
931936) -> Topology :
932937 """
933938 Called by construct_topology_from_los_result, this function is to add links to
@@ -961,7 +966,7 @@ def add_links_to_topology(
961966 rx_site .device .device_sku ,
962967 )
963968 ]
964- and link .el_dev <= ELE_SCAN_ANGLE_LIMIT
969+ and link .el_dev <= max_el_scan_angle
965970 ):
966971 topology .add_link (link )
967972 return topology
0 commit comments