Jump to content

Closest Point between two orbits Question


TriggerAu

Recommended Posts

Anyone ever used any of the below functions to determine when the closest point between two orbits is to occur. Looking for some help on what some of the parameters are:

  • Orbit.FindClosestPoints
  • Orbit.SolveClosestApproach
  • OrbitCloseEncountersTest.FindClosestPoints

Don't need all of them, just one obviously - I think I'm closest to working out the solveclosestapproach function, but "epsilon" and threshold are giving me some grief.

Link to comment
Share on other sites

I haven't looked into orbits but Epsilon is traditionally the allowable degree of error when comparing whether two floating point numbers are equal.

EDIT: Have you looked at the protractor mod? I believe that calculates closest approach.

Edited by EndlessWaves
Link to comment
Share on other sites

I haven't looked into orbits but Epsilon is traditionally the allowable degree of error when comparing whether two floating point numbers are equal.

EDIT: Have you looked at the protractor mod? I believe that calculates closest approach.

Thanks EndlessWaves, have looked at some other bits where people calculate this manually (including protractor) and I can do something similar. Have two challenges though - am looking to look multiple orbits in advance - and most of the ideas I have seen are very coarse (or very proc intensive) at that timeframe, and theres a function there already - would be nice to use it :huh:

Hopefully someone can help out with that other param (or one of the other functions), or I will need to do some maths - which is always fun...

Link to comment
Share on other sites

I was trying to use those functions when I created this plugin:

http://forum.kerbalspaceprogram.com/showthread.php/21111-PLUGIN-0-17-AdamKSP-Show-Phase-and-Ejection-Angle-DRAW-trajectory-on-map-v0-6

And they just seem to not work. I think that Protractor author also tried to use them, but failed.

But i just opened MONO Develop and it seems that they all use same approach like that in Protractor mod, which is using getPositionAtUT of bodies to get body position at give times (with dT step), and just looking for closest.

So i don't think that using your own strategy (like in protractor) would be slower.

Edited by adammada
Link to comment
Share on other sites

I was trying to use those functions when I created this plugin:

http://forum.kerbalspaceprogram.com/showthread.php/21111-PLUGIN-0-17-AdamKSP-Show-Phase-and-Ejection-Angle-DRAW-trajectory-on-map-v0-6

And they just seem to not work. I think that Protractor author also tried to use them, but failed.

But i just opened MONO Develop and it seems that they all use same approach like that in Protractor mod, which is using getPositionAtUT of bodies to get body position at give times (with dT step), and just looking for closest.

So i don't think that using your own strategy (like in protractor) would be slower.

Thanks Adammada, good to know I'm walking in other peoples steps and not just being dense :) Is a bit of a shame to write something that obviously has a function already in use, but if thats where it goes I'll just take it. Thanks for responding

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...