Jump to content

Distance in space


Recommended Posts

Hello, I've returned to KSP a few days ago and felt like learning some space math or whatever, so I wanted to calculate some things on my own, but the problem is I have no idea how to get a distance in space without some sort of a ruler.

Currently I do it by taking a picture from above and measuring in in a 3rd party software [manga studio in this example].

DDOIoSH.jpg

Knowing that the distance from Mun to Kerbin is 11.400.000 I simply deduct the distance from the top of my head, so yeah, it's not very reliable.

Is there a better way to do it? Obviously I want to know where the Mun is gonna be after a specific length of time.

Edited by Clythoris
Link to comment
Share on other sites

Angular velocity and trigonometry would get you the linear distance. If you know the radius of the orbit, and the angle turned in time T, then you can find the shortest line between the two Munar locations :) I apologise that my highschool maths lessons are rather far behind me, and I can't remember if it's sine, cosine, or tangent that you need :P

Alternatively, think of it as; Mun travels a distance of one orbital circumference (2*pi*orbitalradius) in its orbital period. If you describe your time period as a fraction of the orbital period (e.g. 1 hours = 0.05 orbits) then just multiply the circumference by 0.02 (number made up, do not use!).

Link to comment
Share on other sites

Well, you can save yourself some trouble and use the wiki which will tell you the apoapsis, periapsis, and a whole lot of other information. Now, the great thing about Kerbins Moon Mun is that it is a perfectly circular, perfectly flat, orbit. This means if you get into an orbit around Kerbin that is reasonible close (you can be of by as much as 5 degrees) you can plop a maneuver node on your orbit, pull prograde, and get captured by it (If your node is in the right spot. If it's not, move it around) You can set the Mun as your target and it will give you close approach nodes to help with this.

I'm curious why you want to calculate distance and what you are wanting to calculate at all. if you are trying to ind the dV to get from one place to another there are several handy charts floating around. If you're looking for some kind of transfer window calculator That's out there too.

Link to comment
Share on other sites

I wanted to calculate the distance because I always just pulled throttle in the direction of the body's orbit and after a while it would show me a prediction of when and where I would enter it's SOI. That handy tool suddenly disappeared on my new install and so I wanted to calculate it myself, I thought that by simply knowing the orbital altitude and velocity the calculation would be simple! Just some equation to fill up with my own numbers and voila! I am terrible at physics and math though :[.

Link to comment
Share on other sites

Set the mun as your target (can you even set targets with level1 building? I'm not sure) , you should (hopefully) get the closest approach marker close to your Ap. Mouse over it to get the distance. That's not going to be that accurate either since closest approach isn't likely to be at the Ap for close encounters and rapidly moving moons.

I'm guessing you're trying direct injection to moon from launch skipping the orbit Kerbin step?

Link to comment
Share on other sites

Oh! Upgraded to level Two and suddenly it's back! Thanks! I guess if there is no easy way to find out where it's gonna be in five hours, I can just use the prediction tool. Still, I am gonna keep this thread unanswered for a few hours and maybe someone will come up with something else.

Link to comment
Share on other sites

If you can measure the angle between the two points with Kerbin at the center you can calculate the distance with a bit of trig:

Straight-line distance:

d = 2*r*sin(0.5*a) where r is the orbit radius and a is the angle between the two.

Arc distance:

d = r*a/57.3 where r is the orbit radius and a is the angle in degrees.

Be careful with the radius, KSP ignores the planetary radius when calculating altitudes, so for Kerbin centered orbits you would add 600km.

Link to comment
Share on other sites

If you can measure the angle between the two points with Kerbin at the center you can calculate the distance with a bit of trig:

Straight-line distance:

d = 2*r*sin(0.5*a) where r is the orbit radius and a is the angle between the two.

Arc distance:

d = r*a/57.3 where r is the orbit radius and a is the angle in degrees.

Be careful with the radius, KSP ignores the planetary radius when calculating altitudes, so for Kerbin centered orbits you would add 600km.

Thanks! That is exactly what I was looking for!

And thanks to everyone who posted here, but this one is the easiest to understand! hehe

Edit: How do I make this thread "Answered"? Or does a moderator do it?

Edited by Clythoris
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...