Jump to content

There are some values I cannot know


Recommended Posts

Hello. Oveer the last months I've been playing KSP more seriously, with math, because I love orbital mechanics and engineering and I want to be a rocket scientist one day. I even bought the book Spacecraft Mission Design by Charles D. Brown. But KSP brings some limitations if you want to play that way. Basically, my problem is that there is some orbital/astronomical information I cannot know: The direction of the Sun (for missions to Mars, to do the escape burn at the correct angle while in Earth orbit) and the flight path angle (the angle between the horizon and the velocity vector, useful for calculating the orbit of an object with its velocity and radius).

The flight path angle is less important, because I can aproximate it with the navball, but the direction of the Sun is very important.

Thank you for reading

Link to comment
Share on other sites

Do you need the exact angle (NASA would) or simply towards or away (like Jebediah Kerman)?  In KSP we go away from the Sun (burn when your ship is closest to the Kerbol) and towards the Sun (burn when you are furthest for Kerbol) to Eve.  I think we have to just eyeball anything more accurate, but there might be a mod to help you.

Flight path angle appears to be exactly what is on your Navball.  You might have to be more clear if you mean outside the atmosphere or not (it doesn't seem to have any meaning in orbit).

Link to comment
Share on other sites

I applaud your efforts to do it with math. I do it the lazy way with MechJeb. :)

I'm assuming you have your phase and ejection angles calc'd, but you can verify them with this: http://ksp.olex.biz/ The link to the tutorial is broken on that page, here is the correct link: http://forum.kerbalspaceprogram.com/index.php?/topic/16413-tutorial-interplanetary-how-to-guide/

Many people used to press a physical protractor to the screen in map view. You could still do that.

 

Alternate method that I've not seen used: Get your transfer craft LKO. Calculate your orbital period. Calc the time it will take for your craft to get from noon to your ejection angle. Have a sundial made with an antenna on the craft. When the antenna shadow disappears, you're at local noon. Set your transfer node ahead of yourself at the ejection angle time.

Also: The Protractor mod was just recompiled by Z-Key: http://forum.kerbalspaceprogram.com/index.php?/topic/75115-10x-protractor-continued-rendezvous-plugin-v251-may-15th-2015/&page=5

 

Link to comment
Share on other sites

10 hours ago, FélixBachiller said:

Basically, my problem is that there is some orbital/astronomical information I cannot know:

That is quite true.  KSP has an appalling lack of basic instrumentation given its subject matter.  But it's a game, not a simulation, with many, many simplifying assumptions glossing over the hard parts of rocket science.  It's intended to give you a general idea of how spaceflight works without you having to sweat the details.  Seriously, the stock game gives the player less information about his ship than a WW1 airplane gave its pilot, which is quite silly when you think about it.  But that silliness is sort of canon, with not-so-bright Kerbals doing crazy things by the seats of their pants, "MOAR boosters!", etc.  There are mods that can give you a lot more info, of course, but they can only go so far because KSP is much simpler than real life.

So, you basically have a choice.  You can accept KSP for what it is and live with its way of doing things (whether you mod it or not, you still hit its limitations), or you can play something else that set out to be a hard-core space simulation from the get-go instead of a game, such as Orbiter.  In such a game, you can immerse yourself in all the real-life math to your heart's content.  I myself played Orbiter for many years prior to discovering KSP but I found it more educational than entertaining.  And that education was depressing, convincing me we'll never get off this rock in meaningful way.  So when I found KSP, I kicked Orbiter to the curb because in KSP, I really can fulfill my space-related dreams, plus do all sorts of crazy stuff for laughs.

Link to comment
Share on other sites

I believe you can find all the orbital elements in the KSP Wiki.  I was also able to find quite a bit of data using a mod called Hyperedit.  Hyperedit allows you to change orbital data, so when to bring up the edit screen it displays many of the default settings.

Edited by OhioBob
Link to comment
Share on other sites

8 hours ago, FleshJeb said:

... Have a sundial made with an antenna on the craft. When the antenna shadow disappears, you're at local noon. Set your transfer node ahead of yourself at the ejection angle time

 

6 hours ago, Venusgate said:

Question: If you make the sun your target, won't the target indicator show up on your navball, which measures in degrees?

Combination of these made me think of another simple way of triangulating your position by sight.

I don't think you can target the sun, but you can line up visually. First, target another craft (within the range that you see it marked on the screen, which is what, 75km or 100km?) or a visible moon. Switch to "locked" camera and turn your craft to face the target craft / moon. Move the camera around until the target is aligned with an easily identifiable part of your ship (edge of a fin, for example). Then turn to face the sun with exactly the same alignment and voila - you have your compass bearing on the navball.

Link to comment
Share on other sites

Thank you for all the answers!!! 

16 hours ago, wumpus said:

Do you need the exact angle (NASA would) or simply towards or away (like Jebediah Kerman)?  In KSP we go away from the Sun (burn when your ship is closest to the Kerbol) and towards the Sun (burn when you are furthest for Kerbol) to Eve.  I think we have to just eyeball anything more accurate, but there might be a mod to help you.

Flight path angle appears to be exactly what is on your Navball.  You might have to be more clear if you mean outside the atmosphere or not (it doesn't seem to have any meaning in orbit).

I'd like the exact angle, but I think that's just impossible in KSP.

 

9 hours ago, FleshJeb said:

I applaud your efforts to do it with math. I do it the lazy way with MechJeb. :)

I'm assuming you have your phase and ejection angles calc'd, but you can verify them with this: http://ksp.olex.biz/ The link to the tutorial is broken on that page, here is the correct link: http://forum.kerbalspaceprogram.com/index.php?/topic/16413-tutorial-interplanetary-how-to-guide/

Many people used to press a physical protractor to the screen in map view. You could still do that.

 

Alternate method that I've not seen used: Get your transfer craft LKO. Calculate your orbital period. Calc the time it will take for your craft to get from noon to your ejection angle. Have a sundial made with an antenna on the craft. When the antenna shadow disappears, you're at local noon. Set your transfer node ahead of yourself at the ejection angle time.

Also: The Protractor mod was just recompiled by Z-Key: http://forum.kerbalspaceprogram.com/index.php?/topic/75115-10x-protractor-continued-rendezvous-plugin-v251-may-15th-2015/&page=5

 

Thank you for the links!! I think the on-screen protractor is the best option (not very accurate, but still the most precise way).

7 hours ago, Geschosskopf said:

That is quite true.  KSP has an appalling lack of basic instrumentation given its subject matter.  But it's a game, not a simulation, with many, many simplifying assumptions glossing over the hard parts of rocket science.  It's intended to give you a general idea of how spaceflight works without you having to sweat the details.  Seriously, the stock game gives the player less information about his ship than a WW1 airplane gave its pilot, which is quite silly when you think about it.  But that silliness is sort of canon, with not-so-bright Kerbals doing crazy things by the seats of their pants, "MOAR boosters!", etc.  There are mods that can give you a lot more info, of course, but they can only go so far because KSP is much simpler than real life.

So, you basically have a choice.  You can accept KSP for what it is and live with its way of doing things (whether you mod it or not, you still hit its limitations), or you can play something else that set out to be a hard-core space simulation from the get-go instead of a game, such as Orbiter.  In such a game, you can immerse yourself in all the real-life math to your heart's content.  I myself played Orbiter for many years prior to discovering KSP but I found it more educational than entertaining.  And that education was depressing, convincing me we'll never get off this rock in meaningful way.  So when I found KSP, I kicked Orbiter to the curb because in KSP, I really can fulfill my space-related dreams, plus do all sorts of crazy stuff for laughs.

Yes, I know KSP is a game, but it has a lot of potential. kOS is very useful to know data that no mod could provide, but I still don't know how to find out many values, like geocentric inertial coordinates. I know that information is in the game (because the game displays the argument of ascending node) but still I don't know how to get to it. (Maybe I'm a bit obsessed, but for me it's really fun to calculate trajectories :D ).

6 hours ago, Venusgate said:

Question: If you make the sun your target, won't the target indicator show up on your navball, which measures in degrees?

Is impossible to set the Sun as target sadly, or any object you're orbiting.

27 minutes ago, OhioBob said:

I believe you can find all the orbital elements in the KSP Wiki.  I was also able to find quite a bit of data using a mod called Hyperedit.  Hyperedit allows you to change orbital data, so when to bring up the edit screen it displays many of the default settings.

Sadly I didn't found the values I need in the orbital elements, but thanks anyway!!

Link to comment
Share on other sites

26 minutes ago, FélixBachiller said:

Yes, I know KSP is a game, but it has a lot of potential. kOS is very useful to know data that no mod could provide, but I still don't know how to find out many values, like geocentric inertial coordinates. I know that information is in the game (because the game displays the argument of ascending node) but still I don't know how to get to it. (Maybe I'm a bit obsessed, but for me it's really fun to calculate trajectories :D ).

I have heard of these two things:

"Longitude of ascending node."

"Argument of periapsis."

But never the combination of terms you just gave:

"Argument of ascending node."

What does that mean?

kOS can give you the "solarprimevector", which may help in finding what the longitude of the ascending node is, but I don't know what the argument of the ascending node is supposed to be.

If you want angles between two things in kOS, you can always get the two things as vectors and then do a VANG - just remember that VANG() always returns the "smallest" angle (i.e. an angle of 190 degrees comes back as 170 degrees the other way instead). If you want something that remembers the sign relative to the desired direction, you'll need to do some funky tricks with cross products to get it .

 

Link to comment
Share on other sites

59 minutes ago, FélixBachiller said:

I'd like the exact angle, but I think that's just impossible in KSP.

I'm sure the exact angle is available behind the scenes in the game, since MechJeb and KER both seem to use it.

For example in KER there are two values available under the "orbital" tab, "angle to prograde" and "angle to retrograde". I'm at a bit of a loss to understand what they are in fact referring to (definitely not any real "angle to prograde" that makes any sense since when I tried just now, "0°" was almost but not quite pointing at the sun and was not at Pe or Ap and had swung round from 111° on the launchpad...) but it would appear that you can derive the exact angle of your current position with reference to some sort of universal 2d grid...

And KER also gives you pitch angle and heading angle for your vessel. It would seem that "pitch" is the same thing as your flight path angle.

And if KER still doesn't give you the info you need, you could always drop a line to its author. This information must be available to the game somewhere, for the calculation of orbit, so KER or a similar tool should be able to tap into it.

Edited by Plusck
Link to comment
Share on other sites

44 minutes ago, Steven Mading said:

I have heard of these two things:

"Longitude of ascending node."

"Argument of periapsis."

But never the combination of terms you just gave:

"Argument of ascending node."

What does that mean?

kOS can give you the "solarprimevector", which may help in finding what the longitude of the ascending node is, but I don't know what the argument of the ascending node is supposed to be.

If you want angles between two things in kOS, you can always get the two things as vectors and then do a VANG - just remember that VANG() always returns the "smallest" angle (i.e. an angle of 190 degrees comes back as 170 degrees the other way instead). If you want something that remembers the sign relative to the desired direction, you'll need to do some funky tricks with cross products to get it .

 

Yes, I was referring to the longitude of ascending node (omega). My mistake. Thank you for the information!

24 minutes ago, Plusck said:

I'm sure the exact angle is available behind the scenes in the game, since MechJeb and KER both seem to use it.

For example in KER there are two values available under the "orbital" tab, "angle to prograde" and "angle to retrograde". I'm at a bit of a loss to understand what they are in fact referring to (definitely not any real "angle to prograde" that makes any sense since when I tried just now, "0°" was almost but not quite pointing at the sun and was not at Pe or Ap and had swung round from 111° on the launchpad...) but it would appear that you can derive the exact angle of your current position with reference to some sort of universal 2d grid...

And KER also gives you pitch angle and heading angle for your vessel. It would seem that "pitch" is the same thing as your flight path angle.

And if KER still doesn't give you the info you need, you could always drop a line to its author. This information must be available to the game somewhere, for the calculation of orbit, so KER or a similar tool should be able to tap into it.

I will suggest that to the mod developer.

Link to comment
Share on other sites

2 hours ago, FélixBachiller said:

Sadly I didn't found the values I need in the orbital elements, but thanks anyway!!

The orbital elements are what you use to compute the values you want.

Link to comment
Share on other sites

1 minute ago, OhioBob said:

The orbital elements are what you use to compute the values you want.

I mean that the orbital element that I need to calculate the rest of the orbital elements (the flight path angle) isn't. Of course I could use the data KSP provides at any time, but I like to calculate it.

Link to comment
Share on other sites

1 hour ago, FélixBachiller said:

I mean that the orbital element that I need to calculate the rest of the orbital elements (the flight path angle) isn't. Of course I could use the data KSP provides at any time, but I like to calculate it.

Hang on, is there any difference at all between KER's reported "pitch" and the flight path angle? It seemed to me, when I was playing around with it earlier, that this is the value (combined with "heading") that is used to draw the corresponding prograde/retrograde markers on the navball. You can easily configure KER to give only the pitch, velocity and altitude in a single window, and from that you can calculate everything you want about the characteristics of the orbit.

edit: oops... um we'll forget about this post shan't we.

Edited by Plusck
Link to comment
Share on other sites

46 minutes ago, Plusck said:

Hang on, is there any difference at all between KER's reported "pitch" and the flight path angle? It seemed to me, when I was playing around with it earlier, that this is the value (combined with "heading") that is used to draw the corresponding prograde/retrograde markers on the navball. You can easily configure KER to give only the pitch, velocity and altitude in a single window, and from that you can calculate everything you want about the characteristics of the orbit.

Do you mean the vessel pitch or the prograde pitch? If there is that value in KER how do I get it? Because I searched fot that and I didn't found it.

Link to comment
Share on other sites

15 minutes ago, FélixBachiller said:

Do you mean the vessel pitch or the prograde pitch? If there is that value in KER how do I get it? Because I searched fot that and I didn't found it.

Actually it is "vessel" pitch... so you need to align with prograde to get the result (or ask KER's author to include it in an update... that value must be stored somewhere as a variable to draw the markers on the navball with minimal overhead).

Sorry about that, I somehow convinced myself it was giving a flight angle that didn't depend on the vessel's alignment.

However, among the "surface" options you can list horizontal velocity and vertical velocity (which are by default also visible in the HUD), so getting your flight path angle from that should be a doddle.

 

Edited by Plusck
Link to comment
Share on other sites

2 minutes ago, Plusck said:

Actually it is "vessel" pitch... so you need to align with prograde to get the result (or ask KER's author to include it in an update...).

Sorry about that, I somehow convinced myself it was giving orbital pitch.

However, among the "surface" options you can list horizontal velocity and vertical velocity (which are by default also visible in the HUD), so getting your flight path angle from that should be a doddle.

I have already asked KER's developer to add this angle, I hope they add it. In the meantime I will approximate it, or make the two points method.

Link to comment
Share on other sites

3 hours ago, FélixBachiller said:

Yes, I know KSP is a game, but it has a lot of potential. kOS is very useful to know data that no mod could provide, but I still don't know how to find out many values, like geocentric inertial coordinates. I know that information is in the game (because the game displays the argument of ascending node) but still I don't know how to get to it. (Maybe I'm a bit obsessed, but for me it's really fun to calculate trajectories :D ).

Well, once you delve into kOS and try to make it tell you stuff you can't find out otherwise (which is what I'm doing with it now), you will quickly discover the vast morass that is KSP's multiple, highly variable, and rather unpredictable coordinate systems (aka frames of reference).  From what I can tell, kOS doesn't use direct data from KSP's systems, but substitutes its own systems, which are slightly more intuitive but stil contain a lot of the fuzziness of the underlying game.  It makes for some vexing math problems if you try to make it do stuff not contemplated when the game was designed.  You have been warned :)

But regardless of all that, KSP isn't structured to do what you're trying to do.  KSP was designed to be flown by eye using a simple point-and-click interface.  You create the trajectory by manipulating a maneuver node, then see how much dV that costs, which is kinda backwards to how it works in real life.  In addition, KSP uses only 2-body gravity so you only need worry about the parent body of the SOI you're in.  Further, gravity only affects the ship you're flying and those very close to it.  Everything else, from ships further away to the moons of planets, to planets going around the sun, runs on pre-ordained fixed rails without any regard for or need of gravitational forces.  Thus, KSP doesn't even have a lot of the variables and terms uses in real-world formulae.

Link to comment
Share on other sites

2 minutes ago, Geschosskopf said:

Well, once you delve into kOS and try to make it tell you stuff you can't find out otherwise (which is what I'm doing with it now), you will quickly discover the vast morass that is KSP's multiple, highly variable, and rather unpredictable coordinate systems (aka frames of reference).  From what I can tell, kOS doesn't use direct data from KSP's systems, but substitutes its own systems, which are slightly more intuitive but stil contain a lot of the fuzziness of the underlying game.  It makes for some vexing math problems if you try to make it do stuff not contemplated when the game was designed.  You have been warned :)

But regardless of all that, KSP isn't structured to do what you're trying to do.  KSP was designed to be flown by eye using a simple point-and-click interface.  You create the trajectory by manipulating a maneuver node, then see how much dV that costs, which is kinda backwards to how it works in real life.  In addition, KSP uses only 2-body gravity so you only need worry about the parent body of the SOI you're in.  Further, gravity only affects the ship you're flying and those very close to it.  Everything else, from ships further away to the moons of planets, to planets going around the sun, runs on pre-ordained fixed rails without any regard for or need of gravitational forces.  Thus, KSP doesn't even have a lot of the variables and terms uses in real-world formulae.

The upside of the 2-body physics KSP has is that the patched conics aproximation is much more precise. And in fact it isn't critical to have a reference frame, it just makes things more accurate.

Link to comment
Share on other sites

3 hours ago, FélixBachiller said:

I mean that the orbital element that I need to calculate the rest of the orbital elements (the flight path angle) isn't. Of course I could use the data KSP provides at any time, but I like to calculate it.

Computing flight path angle is relatively easy.  From the Pe and Ap distances you get semimajor axis and eccentricity, and from your current altitude you get the magnitude of your position vector.  Having the values of a, e and r, you can compute the true anomaly, from which you compute the flight path angle.

You can also get the orbital elements and the position vector of a vessel from the persistent.sfs file.  Of course those would be the values at the time of the last autosave.  If you want take a snapshot of the values at some particular time, you could probably do a quick save and then read the values from quicksave.sfs. 

Link to comment
Share on other sites

5 minutes ago, OhioBob said:

Computing flight path angle is relatively easy.  From the Pe and Ap distances you get semimajor axis and eccentricity, and from your current altitude you get the magnitude of your position vector.  Having the values of a, e and r, you can compute the true anomaly, from which you compute the flight path angle.

You can also get the orbital elements and the position vector of a vessel from the persistent.sfs file.  Of course those would be the values at the time of the last autosave.  If you want take a snapshot of the values at some particular time, you could probably do a quick save and then read the values from quicksave.sfs. 

I think that FélixBachiller is wanting to be a purist. Your angle, velocity and radius can be measured to some degree of accuracy with a couple of instruments. You can't "know" your SMA by measurement without doing half an orbit first...

Link to comment
Share on other sites

40 minutes ago, Plusck said:

I think that FélixBachiller is wanting to be a purist. Your angle, velocity and radius can be measured to some degree of accuracy with a couple of instruments. You can't "know" your SMA by measurement without doing half an orbit first...

Exactly! I want to be able to calculate all the elements with the data in just one point. Another way to do it is having the radius, velocity and true anomaly in two different points which don't have to be the periapsis and apoapsis.

Link to comment
Share on other sites

44 minutes ago, Plusck said:

I think that FélixBachiller is wanting to be a purist. Your angle, velocity and radius can be measured to some degree of accuracy with a couple of instruments. You can't "know" your SMA by measurement without doing half an orbit first...

If the current velocity and radius are known, and the gravitational parameter of the primary body is known, then the semimajor axis can be computed using the vis-viva equation.  No need to complete half an orbit. 

Link to comment
Share on other sites

2 hours ago, OhioBob said:

If the current velocity and radius are known, and the gravitational parameter of the primary body is known, then the semimajor axis can be computed using the vis-viva equation.  No need to complete half an orbit. 

Of course, yes, silly me. Doh. I was actually conflating several things at the same time.

Sure, if you know your absolute velocity then you can know the SMA. Then to know what sort of orbit you're on you need to wait a while and resample.

However from a purist's perspective - how do you know your absolute velocity? The only way to actually know that amounts to knowing your flight path angle.

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...