Syntax

3D KSP Solar System Scale Model [Major Update: 05/20/2017]

Recommended Posts

still no showstoppers, but a couple more questions:

  • Any particular reason you chose to use Mm?
  • Why do Mun/Minmus have different equations for Conics as opposed to Tylo, Laythe and Vall? I'm thinking the one for the Joolean moons was a later development? Nope, I implemented UT update when the figure finishes loading and noticed Kerbin's location was way off. I used the Rotate(Circle(origin, F22, F20), π + F11, zAxis) equation instead and it's fixed now
  • KSPTOT gives me higher precision to use with True Anomaly than Mean Anomaly for a given UT. Dunno if that matters tho

Got my system all built and ready for JS implementation. But seriously screw that desktop app LOL. About the only saving grace is I can spread it across all three monitors and have a nice working environment

Click the image to play with the actual figure:

UC1B3Bc.png

Working features:

  • figure updates after load to show positions of bodies for current time, and is updated every second - not that it really matters at this scale but still, I have the one second update loop already so why not :P
  • planet details shown when clicked
  • figure declutters 2.5 seconds after loading
  • can only select planets
  • can re-clutter as much as you like
  • dynamically added Sorlon after loading!!! This is amazing because now I can just build one diagram for each body and dynamically load any vessels within its SOI from a database depending on the current UT
  • can show/hide individual planet nodes through the info window. These nodes stay visible regardless of the global nodes setting

Aaaannnddd... yea. That's pretty much feature complete after a  5hr marathon coding session! @Syntax my next step is to create planetary system figures for all the bodies. Is there anything special I need to do when working at that smaller scale?

If I get bored in the future I will use the empty lower-right corner to host an icon that will expand a dialog down there when clicked to let people play with time and animate the system forwards/backwards (have already tested and the animation works fine). For now tho things will stay locked to the current time

Also any idea on how a hyperbolic orbit might be represented? There are some orbits that will render partially outside SOI, but I'm talking specifically handling orbits with an eccentricity greater than or equal to 1. I suppose that would be plotted as an arc as opposed to an ellipse or circle

Edited by Drew Kerman

Share this post


Link to post
Share on other sites
On 7/14/2017 at 5:20 PM, Drew Kerman said:

Some questions/issues for you:

  • why is Pol's Foci colored red?

    • Some strange bug in GeoGebra was causing the value of Pol's Ap Radius minus Pe Radius to display incorrectly by 3x10^-14 in the spreadsheet. I had to do a manual correction, and highlighted it (orange) in the spreadsheet as an anomaly. I actually noted this in the object's caption :) In my version, it's only the spreadsheet cell that is coloured. Is the point itself coloured on your end? It's possible the colouring in the spreadsheet could be causing display issues in your implementation; I've found inconsistencies like that before in the different implementations of GeoGebra. Try removing the colour in spreadsheet.

  • why is sun's SOI radius colored red?

    • Same thing as above. I coloured the cell in the spreadsheet to highlight that it's a sort of anomaly. Reason is noted in the caption. Note that actual Sun SOI is infinite.

  • I added a gray background to the last row of cells since the white text didn't show and at first I thought they were all empty!

    • I did the same thing. Didn't display properly for you? *exasperated sigh*

  • Some of the column A "header" cells that defined the sections of values were off by one vertical cell

    • Bizarre! This happened to me many times as I changed things in the model and added/removed rows, but I thought it had been addressed, as it does not display this way in my version. I'm going to change the DL link to a dropbox file or something so none of my meticulous formatting gets removed :huh:

  • For some reason Vall and Bop or alternately just Vall have reference plane equations (no harm noted, just weird)

    • They should not, and do not, in my versions. Wish I could explain better than that.

  • I can't create new columns. I try to right-click the column header and select (Insert Right) but nothing happens. I found that selecting a cell and choosing the "Record to Spreadsheet" option will create a new cell, I just delete the recording. Have you found any easier way?

    • Right clicking on the column header should do the trick. I'm not sure why you're having that problem. You've downloaded the version I've marked as being customizable? Maybe try in the new file when I upload it. And remember to add new columns past Eeloo (column R).

  • in the wiki, on adding new bodies, "row 28, 30" should be "row 28, 32"

    • Right you are. Thanks for the note! Fixed.

  • Not sure what you mean by "adapt text in <angle></angle>"

    • I meant "adapt text in <angle brackets>" but the html encoding threw off the display :P Fixed!

  • Adding a new number to the list for the body selection caused it to disappear - took me a while to figure out it had switched off its visibility flag for some reason. Same happens to the phase angle selection boxes.

    • Wierd! :P

 

1 hour ago, Drew Kerman said:
  • Any particular reason you chose to use Mm?
    • km was too small to be sensible for distant bodies and GM was to big to be sensible for properties like body radius.
  • Why do Mun/Minmus have different equations for Conics as opposed to Tylo, Laythe and Vall? I'm thinking the one for the Joolean moons was a later development? Nope, I implemented UT update when the figure finishes loading and noticed Kerbin's location was way off. I used the Rotate(Circle(origin, F22, F20), π + F11, zAxis) equation instead and it's fixed now
    • Yes, you've hit the nail on the head here. Geogebra draws circles in a rather strange way, and so I had to rotate them to make sure the planets and moons on circular orbits were starting at the appropriate spot. Now that I take another look at it, though, I can't think of why I didn't make that change to Tylo, Laythe, and Vall. I think I'll need  to go back and update that. Thanks, and good catch!
  • KSPTOT gives me higher precision to use with True Anomaly than Mean Anomaly for a given UT. Dunno if that matters tho
    • Really not sure what you mean about this. In the model, the position of bodies on their orbits is given by eccentric anomaly, which is determined based on mean anomaly at UT=0 and total elapsed time. If there's another way to do this, I'm open to ideas. Can you explain a little more what you're getting at.

 

Aaaannnddd... yea. That's pretty much feature complete after a  5hr marathon coding session! @Syntax my next step is to create planetary system figures for all the bodies. Is there anything special I need to do when working at that smaller scale?

  • Everything should be the same. Do be aware that GeoGebra can't zoom in infinitely and you'll eventually run into artefacts if you go too far, but using Mm instead of Gm should take care of that

If I get bored in the future I will use the empty lower-right corner to host an icon that will expand a dialog down there when clicked to let people play with time and animate the system forwards/backwards (have already tested and the animation works fine). For now tho things will stay locked to the current time.

  • Don't forget to link to this thread for due credit :wink:

Also any idea on how a hyperbolic orbit might be represented? There are some orbits that will render partially outside SOI, but I'm talking specifically handling orbits with an eccentricity greater than or equal to 1. I suppose that would be plotted as an arc as opposed to an ellipse or circle

 

  • Like 1

Share this post


Link to post
Share on other sites
7 hours ago, Syntax said:

I actually noted this in the object's caption :) In my version, it's only the spreadsheet cell that is coloured. Is the point itself coloured on your end?

whoops, totally missed noticing any notes in the caption. No, the color of the object wasn't red I just wasn't sure why the cell was red. You should probably add a "known issues" to the wiki for things like this

7 hours ago, Syntax said:

I did the same thing. Didn't display properly for you?

yea no, this and other weird things were happening with the spreadsheet. Yes, it was the customizable version that I downloaded

7 hours ago, Syntax said:

I think I'll need  to go back and update that.

don't forget the wiki, as that is what's telling people to just do the simple Circle() call

7 hours ago, Syntax said:

Really not sure what you mean about this. In the model, the position of bodies on their orbits is given by eccentric anomaly, which is determined based on mean anomaly at UT=0 and total elapsed time. If there's another way to do this, I'm open to ideas. Can you explain a little more what you're getting at

Yea, nevermind it's all good

7 hours ago, Syntax said:

Don't forget to link to this thread for due credit :wink:

Did you not check it out? The image doesn't link to a bigger image it links to the page where you can see all the features in action :P I'll make that clearer in the post. You're credited right below the figure

7 hours ago, Syntax said:

I didn't at all explore this side of things, but it shouldn't be too difficult. Try these pages to get you started:

Cool! I may have questions once I get around to digging into this aspect, but I of course don't consider you obligated to answer them

So happy I finally have this as part of my role play. Wheeeeeeeeeeeeeeeeeeeeeeeeeeeee

Edited by Drew Kerman

Share this post


Link to post
Share on other sites

ok, I got a Kerbin System model up using km instead of mm. I think the scale might still be a bit too small tho, so I may end up applying a scale factor to all the distance measurements to give things more room, but for now with just Kerbin and the moons without any orbiting vessels it looks good. If you click on Kerbin you can then hop over to the ground map.

Also, I made the reference line clickable and when you click it the view rotates back to X-Y topdown.

Will do the rest of the systems later tonight and tomorrow, as that's when this'll all be going public again

Oh yes, scaling works swell. Just added a scalefactor number and multiply all the distances by it in the spreadsheet so I could even change it on the fly through JS right in the browser if I wanted

I'd like to show the rings around Sarnus and Urlum - I don't suppose there's a way I could do that? I know I can show the extent of the ring plane, but I'm wondering of it's possible to also show the gap between the planet and ring somehow

Edited by Drew Kerman

Share this post


Link to post
Share on other sites
On 7/19/2017 at 6:56 AM, Syntax said:

I didn't at all explore this side of things, but it shouldn't be too difficult.

ok I took a look at the functions you listed for hyperbolas and yea - I have no clue. I honestly don't even know where to begin to get the two focus points needed. I never really made it past algebra in high school and didn't make it through college. So you'll have to either help me out or pass along even more references for me to work backwards further to learn what I need

Share this post


Link to post
Share on other sites
On 19/07/2017 at 11:15 PM, Drew Kerman said:

I'd like to show the rings around Sarnus and Urlum - I don't suppose there's a way I could do that? I know I can show the extent of the ring plane, but I'm wondering of it's possible to also show the gap between the planet and ring somehow

This should be do-able, but there's a chance the model will take a performance hit. I think what you need is a parameteically defined curve (google parametric equation for details). When I tried using them in my model, they made GeoGebra hurt. But I was trying to do all sorts of funny stuff with them. Ideally, I'd try to go with something else, but I'm not sure what that would be off the top of my head.

40 minutes ago, Drew Kerman said:

ok I took a look at the functions you listed for hyperbolas and yea - I have no clue. I honestly don't even know where to begin to get the two focus points needed. I never really made it past algebra in high school and didn't make it through college. So you'll have to either help me out or pass along even more references for me to work backwards further to learn what I need

I feel your pain. I did algebra in high school but nothing really beyond that. Google was a very good friend to me through this process. I would love to help you, but it will be at least a few weeks before I can really sit down with this and try to work it out. I'm in the midst of a renovation and a move. Next chance I get I'll take a look and let you know what I come up with, but I encourage you to keep at it in the mean time.

Keep posting updates and asking questions :) I love that I'm not the only one getting use out of this, and I quite like sharing what I've learned while making it.

  • Like 1

Share this post


Link to post
Share on other sites

I'm going to be moving real slowly on the hyperbolic orbits, because other than being able to show asteroids transiting the system (not a high priority as I publish 2D graphs for them ppl like already) I won't need them for a while. So if you find the problem worth your time in a couple of weeks, have at it. I will of course post any epiphanies I have before then. On a whole don't expect much else from me - now that I have pretty much everything implemented the way I want it, I will need to do some actual software engineering and re-factor my entire code base for the Flight Tracker/Crew Roster.

For the rings I think I'll just keep it simple, with an ellipse plane like the orbits but without a fully-transparent center, and then a second smaller plane with an opaque black color. Sure, it won't be see-through when you're close to the planet but I don't think it's a big deal to just flip the view over to look underneath

Share this post


Link to post
Share on other sites

welp, haven't put any time into hyperbolic orbits or ring displays but if anyone wants to play around with a more interactive web version I have my new Ops Tracker updated with a complete set of features for handling planet orbital display, selection and dynamic loading of vessels. Check it out here.

You still keeping tabs on this at all @Syntax?

Once the Ops Tracker is complete (hopefully by start of 2018) I plan to build a similar page but for the purpose of allowing anyone to load in orbits to show. So using URL parameters  you could visualize what your KSP orbits look like through import of SFS data, and also control time and stuff.

Share this post


Link to post
Share on other sites
3 minutes ago, Drew Kerman said:

welp, haven't put any time into hyperbolic orbits or ring displays but if anyone wants to play around with a more interactive web version I have my new Ops Tracker updated with a complete set of features for handling planet orbital display, selection and dynamic loading of vessels. Check it out here.

You still keeping tabs on this at all @Syntax?

Once the Ops Tracker is complete (hopefully by start of 2018) I plan to build a similar page but for the purpose of allowing anyone to load in orbits to show. So using URL parameters  you could visualize what your KSP orbits look like through import of SFS data, and also control time and stuff.

Awesome! When do you expect the "similar page" to be completed?

Share this post


Link to post
Share on other sites
1 minute ago, Mr. Quark said:

Awesome! When do you expect the "similar page" to be completed?

no idea. Could be weeks, could be months. I plan to aim for weeks, we'll see how it goes.

Share this post


Link to post
Share on other sites
4 minutes ago, Drew Kerman said:

no idea. Could be weeks, could be months. I plan to aim for weeks, we'll see how it goes.

Ah, okay. Good luck on the tracker thing (again haha)

Share this post


Link to post
Share on other sites
4 minutes ago, Mr. Quark said:

(again haha)

Ah there you are. :P

Edited by Drew Kerman

Share this post


Link to post
Share on other sites

Hey, lots of people, well i can speak for myself, find this mod very very useful and helpful.

waited along time for this to come around.

thanks to any and all that are working on / with this.

cheers.

  • Like 1

Share this post


Link to post
Share on other sites

just popping by to say, if anyone out there wants to get hyperbolic trajectory plotting working you would be my hero. That is all.

Actually also wanted to say still looking to make a dedicated page to put in orbital data and render out a figure but I'm way behind on what I would like to do right now :P

  • Like 1

Share this post


Link to post
Share on other sites
46 minutes ago, Drew Kerman said:

just popping by to say, if anyone out there wants to get hyperbolic trajectory plotting working you would be my hero. That is all.

Actually also wanted to say still looking to make a dedicated page to put in orbital data and render out a figure but I'm way behind on what I would like to do right now :P

Hey Drew. I have not abandoned this! I have not done any updates but have been using it myself for a project of my own. 

Point is, it's very much on my radar. As for hyperbolic trajectories, it's secondary to my interests but perhaps I could look into it when my own project gets wrapped up. What kind of functionality  are you looking for specifically? 

  • Like 2

Share this post


Link to post
Share on other sites
1 hour ago, Syntax said:

What kind of functionality  are you looking for specifically? 

pretty much the same as what's there for parabolic ones. I'd like to be able to plot them in the figure and show a point along them that is the current position of whatever is on that trajectory.  Here is an example orbit from an asteroid swinging by Kerbin:

SMA: -20601.2664 (km)
Ecc: 3.4136
Inc: 44.2831°
RAAN: 265.9142°
Arg: 239.4316°
True Anom: -61.8867°

Share this post


Link to post
Share on other sites
On 6/6/2018 at 11:26 AM, Drew Kerman said:

pretty much the same as what's there for parabolic ones. I'd like to be able to plot them in the figure and show a point along them that is the current position of whatever is on that trajectory.  Here is an example orbit from an asteroid swinging by Kerbin:

SMA: -20601.2664 (km)
Ecc: 3.4136
Inc: 44.2831°
RAAN: 265.9142°
Arg: 239.4316°
True Anom: -61.8867°

I've been futzing around a bit with your idea this week and I think I've got the beginnings of something you might be able to work with here. All I've added is some numbers and formulas in column S of the spreadsheet. 

One tricky thing with representing a hyperbolic orbit on a 3d plot is that we only want to see one of the branches (here, the one swinging by Kerbin). So right away the more obvious choices for commands to use in geogebra are ruled out: Hyperbola command, Conic command

So that leaves me with the Curve command, which uses parametric equations to plot a curve in a given range. I have not yet been able to figure out how to parameterise a hyperbola in 3 dimensions, so I tried plotting one in 2D that had your example's SMA and Ecc, and then tried to rotate that curve to the proper 3D orientation. I doubt I've managed to get it right on my first go. Take a look and tell me how it compares to your example. I can't test in KSP just now.

It would be more computationally efficient if we could represent the hyperbola in 3D right out of the gate, so that's another challenge. 

It will be up to you to define a range for the curve (given in cell S23) that you think is appropriate. But once you've done that, how do you define the asteroid's actual position on that arbitrarily sized curve? Perhaps it would be better, in the case of hyperbolic trajectories, to represent the trajectory shape and the asteroid position independently, as opposed to interwining them as I did for elliptical orbits.

But we have the beginning of something here. 

Share this post


Link to post
Share on other sites

Did a check and yea it doesn't look quite right. The curve seems to be ok but the orientation is off.

1 hour ago, Syntax said:

One tricky thing with representing a hyperbolic orbit on a 3d plot is that we only want to see one of the branches (here, the one swinging by Kerbin). So right away the more obvious choices for commands to use in geogebra are ruled out: Hyperbola command, Conic command

I'm not entirely concerned with depicting hyperbolic orbits the way they are in the game, where you only see the patch that is traveling through Kerbin's SOI. The graph can depict SOI bubbles, and the orbit lines will change from solid to dashed to show what part of the orbit is in or out - so if you're trying to constrain the rendering to show only the part of the orbit in the SOI, I don't see that as being necessary. Hopefully that's what you're saying here and things are a bit easier

Share this post


Link to post
Share on other sites

@Syntax I'm dedicating time to coding improvements in my Ops Tracker. Any chance you have some free time too? I'm still curious as to whether things are made easier by not having to chop off orbits with ecc<1 but that still extend outside of the body's SOI

Share this post


Link to post
Share on other sites
On 10/13/2018 at 11:40 AM, Drew Kerman said:

@Syntax I'm dedicating time to coding improvements in my Ops Tracker. Any chance you have some free time too? I'm still curious as to whether things are made easier by not having to chop off orbits with ecc<1 but that still extend outside of the body's SOI

Hi Drew, I take it you mean ecc>1?

The problem is not how to constrain the conic. It's how to represent the asteroid's position on that conic. For the closed ellipses of all the planets and moons, the orbiting body is represented by a point that is mathematically tied to that path. Not so easy with the open hyperbola. KSP must have a way of doing it, though... 

Share this post


Link to post
Share on other sites
1 hour ago, Syntax said:

I take it you mean ecc>1?

Derp.

Ok yea I missed you were talking about the position being shown. Do you at least know how to get hyperbolic orbit conics showing? I don't know if I could figure out the positioning but at least it would be closer to being figured out that I just might be able to work the maths from there myself with enough research...

Edited by Drew Kerman

Share this post


Link to post
Share on other sites
5 hours ago, Drew Kerman said:

Derp.

Do you at least know how to get hyperbolic orbit conics showing? I don't know if I could figure out the positioning but at least it would be closer to being figured out that I just might be able to work the maths from there myself with enough research...

I got one showing here: 

But I thought you had already seen that... I don't mind playing around a bit more with the math, but I can't promise results or give you much of an idea of when I'll get to do that, so I'd definitely encourage you to dig into it yourself.

I'd like to help here, though. I'll do what I can!

Share this post


Link to post
Share on other sites
1 hour ago, Syntax said:

I don't mind playing around a bit more with the math, but I can't promise results or give you much of an idea of when I'll get to do that, so I'd definitely encourage you to dig into it yourself.

Alright yea, I will poke at it. I do recall now that post with the beginnings of the hyperbolic workup. I just wanted to also let you know that if you do have any time and feel like working on it, I'm still around to make good use of it! :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now