Closest approach line

Altaïr

Space Stig, Master of gravity
Staff member
Head Moderator
Team Kolibri
Modder
TEAM HAWK
Atlas
Deja Vu
Under Pressure
Forum Legend
#1
Here is the mod that brings back the mythic approach line that was in SFS prior to version 1.5.


How to install it?

Please go to releases, and download the latest version of the ClosestApproachLine.dll file,
then copy it into Spaceflight Simulator Game/Mods. The mod will then be available ingame.

To easily access the Mods folder, launch the game, go into the mod loader menu and click "Open Mods folder".


What is that mod?

If you played SFS at the time of 1.35 or 1.4, you probably already know. When you select a target, this mod will display the closest approach line that shows the position on the orbit at which your ship will be the closest to the target. You can use this to modify your trajectory so that you get an encounter with the desired object:
20220716230002_1.jpg

20220716230443_1.jpg


The closest approach line is displayed in light blue to be easily distinguished from other informations. When the closest approach gets close to 0, the line gradually turns red to warn you about a collision risk:

adjusting.gif


impact2.gif



How do I make my own mod from it?

The source code is available here. You are free to modify the mod as you wish, but if you redistribute it, please credit me for the part you borrowed.
 
Last edited:

AxcelAbrego

Modder
Man on the Moon
Registered
#2
f you played SFS at the time of 1.35 or 1.4, you probably already know. When you select a target, this mod will display the closest approach line that shows the position on the orbit at which your ship will be the closest to the target. You can use this to modify your trajectory so that you get an encounter with the desired object:
wow i thought i would never come back, you made me a great day
 

Altaïr

Space Stig, Master of gravity
Staff member
Head Moderator
Team Kolibri
Modder
TEAM HAWK
Atlas
Deja Vu
Under Pressure
Forum Legend
#5
I made a new version of this mod, but as it's only lightly tested, it's unofficial for now.

This mod still features the closest approach line with some optimizations, it works the same as before, but I've added something new:
ClosestApproach_MultiTurns.png


See the two green lines? You're tired about time-warping endlessly until you find a random encounter? The green line is precisely there for this, now you can predict an encounter up to 20 turns in advance!

Note that the way it works is slightly different than the original approach line:
  • It doesn't calculate the "closest approach" strictly speaking, but the "approach at node" (the nodes being the points at which the orbits cross). This is why there are 2 lines displayed (incase you want to aim for a specific node), and this is why nothing appears if the orbits don't cross.
  • The best approach on several turns is calculated from the following turn and up to 20 turns. It means that the green line will disappear when the best approach occurs on the current turn (note that it will rather be recalculated at a later date in practice). This is not a bug. Since the best approach occurs on this turn, it is to let the more precise blue line guide you until the encounter.
  • The mod actually looks for a compromise between minimal approach and time-warp duration. In short, it means it won't make you time-warp during 10 additional turns for "only" a slightly better result. The result is a good trade-off in practice, but if you're not satisfied with the result, don't worry, be patient, the mod will find other opportunities.
  • Encounters planned on several turns require much cheaper burns, this mod will greatly help you if you try to optimize your navigation!
This is more of a beta right now, but from my tests it appeared to work accurately. Don't hesitate to report any bug and enjoy! :cool:
 

Attachments

Pink

(Mooncrasher)
Staff member
Team Valiant
Discord Staff
Voyager Quest
Man on the Moon
Forum Legend
#6
Ok, wow... Never thought of such an improvement, but now that it's here it is staggering.o_O
 

Altaïr

Space Stig, Master of gravity
Staff member
Head Moderator
Team Kolibri
Modder
TEAM HAWK
Atlas
Deja Vu
Under Pressure
Forum Legend
#7
Ok, wow... Never thought of such an improvement, but now that it's here it is staggering.o_O
Haha, even myself I thought about it recently. I made all the tools for it and I didn't think about that until now! :D
 

Altaïr

Space Stig, Master of gravity
Staff member
Head Moderator
Team Kolibri
Modder
TEAM HAWK
Atlas
Deja Vu
Under Pressure
Forum Legend
#15
sfs still broken for me
it doesn't load this mod
Yes, I remember about your problem. I'll try to help you, I've opened a private discussion, but since the problem is not related to a specific mod please avoid posting about your problem in unrelated threads.
 

Altaïr

Space Stig, Master of gravity
Staff member
Head Moderator
Team Kolibri
Modder
TEAM HAWK
Atlas
Deja Vu
Under Pressure
Forum Legend
#17
where is the updated version?
Follow the link given in the first post:

Please go to releases, and download the latest version of the ClosestApproachLine.dll file,
then copy it into Spaceflight Simulator Game/Mods. The mod will then be available ingame.
All releases are made available on a git repository, including the latest, so that link will always be valid.
 

Altaïr

Space Stig, Master of gravity
Staff member
Head Moderator
Team Kolibri
Modder
TEAM HAWK
Atlas
Deja Vu
Under Pressure
Forum Legend
#19
NEW UPDATE!!!

Version 2.4 is available, follow the link given in the first post as usual. That version mostly improves the existing stuff and brings some QoL improvements.

Change Logs:
  • Improved the algorithm to show the most relevant data to the player
  • Added a delta-V indicator to let the player know about the approach speed
  • Huge optimization work: the closest approach is more stable, more precise while requiring less processing time
  • Approach on several turns: reduced the number of turns from 20 to 12: the result is cleaner, and nobody would wait that much anyway
  • Better selection algorithm of the approach line on several turns: it makes it a little easier to use.
  • Removes the green line if it overlaps with the blue line to avoid readability issues
Here are a few pics:
Presentation.png


Presentation2.png


And of course, the traditional precision test :cool:
impact.gif
 

Altaïr

Space Stig, Master of gravity
Staff member
Head Moderator
Team Kolibri
Modder
TEAM HAWK
Atlas
Deja Vu
Under Pressure
Forum Legend
#23
I clearly don't have any ideas how to add mods

Because I'm Mobile

*in*
You can't add mods on mobile, mods are only for the PC version. Don't hesitate to read the FAQ to get that kind of informations.
 

Altaïr

Space Stig, Master of gravity
Staff member
Head Moderator
Team Kolibri
Modder
TEAM HAWK
Atlas
Deja Vu
Under Pressure
Forum Legend
#25
UPDATE!!!

Version 2.5 is out! This release is compatible with the latest version of SFS to date (V1.5.9.8).

This version also includes a preliminary version of a new tool, my custom version of the docking arrows. This is what it looks like:
VelAndDistArrows.gif


The blue arrow shows the relative velocity of the target while the red arrow shows you when and where will pass the targeted ship at its closest point. That arrow is replaced by a more conventional distance arrow when the closest point is passed.

This is very intuitive once you get used to it.
Burn in the direction showed by the red arrow to reduce the encounter distance:
DistanceArrow.gif


Then burn in the direction showed by the glowing blue arrow to reduce your relative velocity:
VelocityArrow.gif


This helps making your encounters very predictable. Unless you're a mad rocketeer that likes explosions of course! :cool:
impact.gif


To be fair, this is still a work in progress, I was forced to update the mod to restore the compatibility, but this is completely functional at that stage.

Don't hesitate to report any bug or make some suggestions!