From 47b1d7626484aaeaf915edbf74a68980803c41c9 Mon Sep 17 00:00:00 2001 From: Mark Stephenson Date: Thu, 14 Dec 2023 15:04:42 -0700 Subject: [PATCH] Issue #0: Exclude ending windows from upcoming opportunities --- .../envs/general_satellite_tasking/scenario/satellites.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/bsk_rl/envs/general_satellite_tasking/scenario/satellites.py b/src/bsk_rl/envs/general_satellite_tasking/scenario/satellites.py index 1660b1bb..229003f4 100644 --- a/src/bsk_rl/envs/general_satellite_tasking/scenario/satellites.py +++ b/src/bsk_rl/envs/general_satellite_tasking/scenario/satellites.py @@ -493,7 +493,9 @@ def upcoming_opportunities(self) -> list[dict]: list: list of upcoming opportunities """ start = bisect.bisect_left( - self.opportunities, self.simulator.sim_time, key=lambda x: x["window"][1] + self.opportunities, + self.simulator.sim_time + 1e-12, + key=lambda x: x["window"][1], ) upcoming = self.opportunities[start:] return upcoming