Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skipping LOS betweens ground stations #131

Merged
merged 1 commit into from
Feb 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion paseos/visualization/space_animation.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,12 @@ def _get_los_matrix(self, current_actors: List[BaseActor]) -> np.ndarray:

for i, a1 in enumerate(current_actors):
for j, a2 in enumerate(current_actors[i + 1 :]):
if a1.is_in_line_of_sight(a2, local_time) is True:
# Skip LOS between groundstations (leads to crash)
if isinstance(a1, GroundstationActor) and isinstance(
a2, GroundstationActor
):
continue
elif a1.is_in_line_of_sight(a2, local_time) is True:
los_matrix[i, j + i + 1] = 1.0

# make los_matrix symmetric with diagonal entries equal to 0.5 to make colorbar nicer
Expand Down