@@ -296,7 +296,6 @@ def __init__(
296
296
* args ,
297
297
generation_duration : float = 600.0 ,
298
298
initial_generation_duration : Optional [float ] = None ,
299
- access_dist_threshold : float = 4e6 ,
300
299
** kwargs ,
301
300
) -> None :
302
301
"""Construct an AccessSatellite.
@@ -307,15 +306,12 @@ def __init__(
307
306
`time_limit` unless the simulation is infinite. [s]
308
307
initial_generation_duration: Duration to initially calculate imaging windows
309
308
[s]
310
- access_dist_threshold: Distance bound [m] for evaluating imaging windows
311
- more exactly. 4e6 will capture >10 elevation windows for a 500 km orbit.
312
309
args: Passed through to Satellite constructor
313
310
kwargs: Passed through to Satellite constructor
314
311
"""
315
312
super ().__init__ (* args , ** kwargs )
316
313
self .generation_duration = generation_duration
317
314
self .initial_generation_duration = initial_generation_duration
318
- self .access_dist_threshold = access_dist_threshold
319
315
320
316
def reset_pre_sim (self ) -> None :
321
317
"""Reset satellite window calculations and lists."""
@@ -388,9 +384,15 @@ def calculate_additional_windows(self, duration: float) -> None:
388
384
times = r_BP_P_interp .x [window_calc_span ]
389
385
positions = r_BP_P_interp .y [window_calc_span ]
390
386
387
+ r_max = np .max (np .linalg .norm (positions , axis = - 1 ))
388
+ access_dist_thresh_multiplier = 1.1
391
389
for location in self .locations_for_access_checking :
390
+ alt_est = r_max - np .linalg .norm (location ["location" ])
391
+ access_dist_threshold = (
392
+ access_dist_thresh_multiplier * alt_est / np .sin (location ["min_elev" ])
393
+ )
392
394
candidate_windows = self ._find_candidate_windows (
393
- location ["location" ], times , positions , self . access_dist_threshold
395
+ location ["location" ], times , positions , access_dist_threshold
394
396
)
395
397
396
398
for candidate_window in candidate_windows :
0 commit comments