Replies: 2 comments
-
Thanks for the feedback. We'll take a look at this. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I've looked at this issue with a student here and we both agree you are correct. I'm including your elegant solution to a branch I'm about to push to |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi Basilisk team,
I have a Basilisk simulation that calls the spacecraftLocation module. The implementation of the line-of-sight solution is rather elegant compared to other solutions I came across. My humble attempt to summarized it here is the following:
Compute the shortest distance from the line passing through both (primary and secondary) spacecraft to the centre of the planet.
If the distance is shorter than the radius of the planet, then the planet masks the spacecraft from each other.
However, I believe there is a minor issue in the computation in certain boundary conditions: there is a check missing on the value of k*. From my understanding, if the value of k* is smaller than zero, then the planet is “behind” the primary spacecraft (assuming it is looking at the secondary spacecraft). Likewise, if the value of k* is larger than one, then the planet is behind the secondary spacecraft. In both cases, it does not mask the spacecraft from each other.
To illustrate this, consider two spacecraft when one is directly “below” the other. The line passing through both spacecraft also passes through the centre of the planet. Therefore, the minimum distance to the centre of the planet is nil. However, both spacecraft are in line-of-sight of each other.
I have attached a proposal to address these two boundary conditions, based on my understanding.
Please do not hesitate to highlight any flaws in my reasoning.
Thanks,
Thomas
Archive.zip
Beta Was this translation helpful? Give feedback.
All reactions