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

spacecraftLocation class incorrectly calculating rClose vector #644

Open
TinucciTUM opened this issue Mar 13, 2024 · 0 comments
Open

spacecraftLocation class incorrectly calculating rClose vector #644

TinucciTUM opened this issue Mar 13, 2024 · 0 comments

Comments

@TinucciTUM
Copy link

TinucciTUM commented Mar 13, 2024

Describe the bug
The spacecraftLocation class incorrectly calculates the closest vector rClose making it smaller than the celestial body's radius and thus not calculating the rest of the parameters after the if statement.

Right now the if statement is evaluating the closest distance to the bodies center from the "infinite" (parameter not clipped) line that joins the two satellites.

From what I understood of how the function works, the solution should just be to move the calculation of the rClose vector to after the clipping of the parameter value has been done, around line 190 of the file spacecraftLocation.cpp

To reproduce
Accessing the hasAccess values from the recorder of the spacecraftLocation of two satellites with orbital parameters (a, ecc, inc, Omega, omega, f) and with infinite range and without specifying any antenna in either satellite:

1, 8000, 0.0, 0.0, 0.0, 0.0, 0.0
2, 8020, 0.003, 0.0, 0.0, 0.0, 0.0

Expected behavior
There should be a clear line of sight between them

Screenshots

Desktop (please complete the following information):

  • OS: Windows
  • Version 2.2.2
  • Python version 3.9.18

Additional context
I have made the fix locally and the simulation now seems to work as expected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant