Jump to content

[1.10] Tilt'Em (Planetary axial tilt)


Dagger

Recommended Posts

10 hours ago, Dagger said:

Yeah also the TiltX and TiltZ should be relative to the ecliptic and at this moment they are relative to the unity "world" axis so they must be worked on... Hopefully I will get into this once I manage to fix the bug described below :)

Well, α and δ are relative to the celestial equator, not the ecliptic; the ecliptic is rarely used in modern astronomy, see Capitaine and Soffel (2015), On the definition and use of the ecliptic in modern astronomy, arXiv:1501.05534 [astro-ph.EP].

You should probably follow the usual astronomical convention (right ascension and declination of pole), to make it easy to supply tilt for real-world bodies.

 

Regarding your general vessel rotation woes, it seems that below the inverse rotation threshold, you are doing exactly what we do (tilt the universe around the main body). Since you don't actually own the physics of everything, it means you must chase down the various bits of the universe to tilt them (which seems to be the bug at hand), whereas our approach (we own the orbit of everything, whether it is packed or not, as soon as it leaves the ground) makes it easier to just tilt the whole universe at once.

Both variants however will run into the issue of the vessels themselves being rotated, even if their orbits are fine (Principia issue #1639), so to answer @Phineas Freak, this mod should have the same issue, just at the inverse rotation threshold instead of the SOI boundary.

@Phineas Freak: note that we do plan to do something about #1639 eventually; it is a bit tricky, but with the Principia approach of keeping an authoritative record of the position of everything, it should be feasible, see

At the moment we are working on extended geopotential models (mascons, etc.) however.

Link to comment
Share on other sites

14 hours ago, eggrobin said:

Well, α and δ are relative to the celestial equator, not the ecliptic; the ecliptic is rarely used in modern astronomy, see Capitaine and Soffel (2015), On the definition and use of the ecliptic in modern astronomy, arXiv:1501.05534 [astro-ph.EP].

You should probably follow the usual astronomical convention (right ascension and declination of pole), to make it easy to supply tilt for real-world bodies.

 

Regarding your general vessel rotation woes, it seems that below the inverse rotation threshold, you are doing exactly what we do (tilt the universe around the main body). Since you don't actually own the physics of everything, it means you must chase down the various bits of the universe to tilt them (which seems to be the bug at hand), whereas our approach (we own the orbit of everything, whether it is packed or not, as soon as it leaves the ground) makes it easier to just tilt the whole universe at once.

Both variants however will run into the issue of the vessels themselves being rotated, even if their orbits are fine (Principia issue #1639), so to answer @Phineas Freak, this mod should have the same issue, just at the inverse rotation threshold instead of the SOI boundary.

@Phineas Freak: note that we do plan to do something about #1639 eventually; it is a bit tricky, but with the Principia approach of keeping an authoritative record of the position of everything, it should be feasible, see

At the moment we are working on extended geopotential models (mascons, etc.) however.

Yes, you're probably right about the naming convention as to be honest my math/astronomy knowledge is quite limited. Your mod is awesome btw it's complexity is just as if KSP+Principia is a totally different game! I wish I developed my career around C++ instead of C# as sometimes I feel it's limitations and I would be better suited to understand your code :)....

Regarding the orbits I'm investigating what could be the issue, perhaps I'll have to play with the orbit driver transform... Will see what I get...

About the tilting of the vessels, this mod suffers the same issue as yours, my idea is to add a callback to 

GameEvents.onRotatingFrameTransition

And once that's called, get the tilt of the planet, run trough all the vessels in the game and call the vessel.SetRotation... If I manage to succeed on that I'll let you know as you can probably use it aswell
 

Link to comment
Share on other sites

On 11/12/2018 at 2:56 PM, SnailnamedSnail said:

Do you plan to cooperate with the author of the RSS in the next update of Tilt'Em and together make it (RSS) for 1.5.1?

Next version will be integrated in kopernicus so that will help them

On 11/12/2018 at 7:07 PM, Jesusthebird said:

Ooo cant wait till the major bugs are squashed. Ive always wanted tilt rotation for planets. Launching to polar orbits..or specific inclinations will be much more...interesting :) this combined with KK statics by omega will be a phenomenal boost to my game immersion.

Still stuck with the orbits issue :/ I hope I can find a solution soon....

Edited by Dagger
Link to comment
Share on other sites

On 11/7/2018 at 10:06 AM, Dagger said:

Does someone know what could be happening with the orbit vector? For that particular case I had to apply a rough correction of:


tilt = new Vector3d(tilt.x - 4, -10, tilt.z - 2);

To the planet tilt when applying it to the planetarium here but it doesn't make any sense and I only got those numbers by trial and error and the might be different if the planet tilt varies or perhaps even if the vessel orbit is different.

Do *NOT* get your hopes up too much because I'm super rusty on this stuff but I *MAY* know what your problem is. I'm going to poke around your code tonight, tomorrow, and/or this weekend and I may have some questions and/or ideas.

Link to comment
Share on other sites

3 hours ago, 5thHorseman said:

Do *NOT* get your hopes up too much because I'm super rusty on this stuff but I *MAY* know what your problem is. I'm going to poke around your code tonight, tomorrow, and/or this weekend and I may have some questions and/or ideas.

Well at least I can say I was right. I'm so rusty on this I simply can't follow it. However I did find one thing that I hope will help. I changed Kerbin's TiltX to 45 from 23 so it would be not only more dramatic but also evenly divisible into a full rotation. When I click "Toggle Rotating Frame" Kerbin rotates 45 degrees on one axis (shown purple below), and all the ships' orbits rotate on another (shown red below). Assuming Z is N/S on a non-rotated Kerbin, it looks like they're rotating on X and Y.

tilt45.jpg

 

Link to comment
Share on other sites

@5thHorseman Exactly. The issue is that when you're not in a rotating frame (this means that the PLANET is tilted and the planetarium is not tilted) the orbit looks fine and everything is nice :)

The problem is that when you tilt the planetarium (it happens automatically when below 100k meters) then the planet must be tilted back as how it was before as otherwise you would have a tilted planetarium + a tilted planet and that's not good.

So the issue here is that the vessel must be moved around to the equivalent position and also it's orbital data, that's where I'm stuck as I don't know how to move the vessel to where it should be :( I think that I must play around with the celestialframe, orbitdriver and orbit classes but I'm still stuck and this week I didn't had time to have a look at it

Link to comment
Share on other sites

31 minutes ago, theonegalen said:

Why is it necessary to tip the planetarium once you go below 100 km? I imagine it has something to do with how KSP handles aircraft and that good old swap between PQS and scaled space?

It's how KSP works. If you don't do it, the planet rotates below you and it's impossible to land without exploding, it also has to do with the PQS stuff.

With the mod you can try it, just press the "Toggle Rotating Frame" once you're below 100k meters, be sure that the planetarium is not tilted and you will see what I mean. The thing is that you must land in a "static" planet instead of a rotating one, otherwise there are lots of issues

Edited by Dagger
Link to comment
Share on other sites

OIC, it's a frame of reference problem because of the way the physics work.

The only thing I can think of would be to brute force it with mathematics, or maybe storing the positions/orbits of the orbiting bodies in a secondary, exterior .DAT file, and then reloading and moving them to those positions when going back to the Space Center scene, or any flight scene above 100 km? Just thinking of the number of possible ships, though, that sounds like it would create insane slow down anytime you changed between the two reference frames.

I'm shooting in the dark, so I imagine that's a stupid idea, but it's the only one that I have. I apologize if I am very much not helping. :-)

 

Link to comment
Share on other sites

Will try to explain this with images and hope somebody can help me out on this...

Here my active vessel is in a suborbital trajectory and the planetarium is NOT tilted, therefore, we tilt the planet and everything is nice and cool

s0AVbDB.png

Now I force tilting the planetarium (it will happen anyways when I'm below 100K meters) and as you can see, all the OTHER orbits that are not the active are tilted "correctly" (or that's what I think). Bear in mind that when tilting the planetarium I must put the planet with 0 tilt as otherwise we would have a tilted planetarium + a tilted planet and that's not good)

WpGHSMH.png

The problem is that on my active vessel the orbit is not moved (as I'm in track physics mode) so basically my vessel should be MOVED to do something like this:

rL4953v.png

So, you can say: "well, just pack your active vessel or put the orbit driver in "update" mode for 1 frame and it will be unpacked on the next frame" but even with that solution, there are still some errors.

In this case I'm in a vessel that is in a stable orbit and look how the orbit of that unloaded vessel that is in a ballistic orbit produces an error when tilting the planetarium:

bm8Bmo3.png

 

If someone has some knowledge on how the orbits are calculated inside KSP and it's celestial frames please contact me :) I'm preety sure that we can solve this issue

Edited by Dagger
Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...
  • 2 weeks later...
17 minutes ago, SnailnamedSnail said:

how about 1.6 update and two coordinates of incluation?

Its generally good etiquette to not pester mod authors for updates, they have lives of their own, and the 1.1 version runs Kopernicus which itself was only recently updated to 1.6 as a dependancy. There's also a link to the 1.1 version with 2 inclination axes on the previous page.

Link to comment
Share on other sites

  • 2 weeks later...
On 1/2/2019 at 12:53 PM, SnailnamedSnail said:

how about 1.6 update and two coordinates of incluation?

It seems to work fine in 1.6 (At least the "dev" version does)

How does one use this mod? Is it simply a plug, play, and fly, or is there something the average user needs to keep an eye out for?

@Eaten by Black Hole What values do you have to change for the EVE clouds? I'm using Astronomer's pack, so I'd like the clouds and auroras to line up correctly.

Link to comment
Share on other sites

  • 4 weeks later...

@Dagger

You may try to get ahold of the creator of kopernicus to help you solve your issue. I don't think he comes on the forum but you can probably get ahold of him on github or maybe through the realism overhaul channels. Really excited for this mod :)

Link to comment
Share on other sites

  • 2 weeks later...

@Dagger I really don't know how KSP internal calculations work. But I do have a suggestion for you.

Is it possible for you to get what rotation is being applied to the planetarium when it's tilted? A quaternion or an axis and an angle? 

If you can get that, you can apply the same rotation to the whole orbit object of the active vessel. 

Or if it isn't possible to get the planetarium rotation directly, you could try calculating the rotation from the change in the inactive vessel's orbit. You probably already know how to calculate these rotations, if not, take a look at kOS rotation functions (you can find them in direction/vector mathematics). 

Link to comment
Share on other sites

  • 3 weeks later...
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...