Jump to content

[WIP][1.8.1, 1.9.1, 1.10.1, 1.11.0–2, 1.12.2–5] Principia—version ‎‎کاشانی, released 2024-05-08—n-Body and Extended Body Gravitation


eggrobin

Recommended Posts

hi, I'm in love with Principia!

Just asking: 

is there the opportunity to set the Principia GUI show on/off functionality via a keyboard hotkey? 

I find myself opening and closing the GUI pretty often since it's pretty big on screen, and also, I have the Principia plugin icon right down my list on the toolbar, which makes pretty slow to scroll, open and close it every time.

If not, are you able to provide a simple way to make me write down an MM patch or a C# function for it? 

thanks! 

Edited by SmugglingParts
Link to comment
Share on other sites

  • 2 weeks later...

Nvm I got it. This is a truly awesome mod, perhaps the best if I'm judging by the sheer technical/coding ability required to make one.

I'm playing with this mod in KSRSS, with BetterTimeWarp, and Kerbalism. Few questions I wanted to ask the good people here:

1) I managed to send a probe to Earth-Moon L2; and the orbit seems to be unstable? It requires course corrections roughly every 14 days... I remember reading that orbits around the Lagrange points are very stable orbits, so I'm not sure what gives? Is this a problem because of the rescale of the real solar system or is it because of something else?

2) The game seems to hang when I warp. It does so for a second or two and then returns to normal. Is this because of the vast (I presume) number of calculations going on the backend? I do have a fairly modern processor (12th gen i5) so I thought it should run smoothly... or is this to be expected?

3) When making a new flightplan and adding maneuvers; the framerate drops for ~30 seconds or so before returning to normal. Not sure what is causing this.

Again, not meant as a knock on the mod creators, I actually love this mod, but I just want to understand a few things.

https://imgur.com/a/0gQPIGi

https://imgur.com/a/cRtdGii

https://imgur.com/a/mmM9HFZ

Edited by DA299
Link to comment
Share on other sites

1 hour ago, DA299 said:

1) I managed to send a probe to Earth-Moon L2; and the orbit seems to be unstable? It requires course corrections roughly every 14 days... I remember reading that orbits around the Lagrange points are very stable orbits, so I'm not sure what gives? Is this a problem because of the rescale of the real solar system or is it because of something else?

Congratulation for discovering that orbits around L2 are unstable. I invite you to consult Wikipedia for details about this instead of trusting what you remember reading.

1 hour ago, DA299 said:

2) The game seems to hang when I warp. It does so for a second or two and then returns to normal. Is this because of the vast (I presume) number of calculations going on the backend? I do have a fairly modern processor (12th gen i5) so I thought it should run smoothly... or is this to be expected?

3) When making a new flightplan and adding maneuvers; the framerate drops for ~30 seconds or so before returning to normal. Not sure what is causing this.

Note that "12th generation i5" covers a broad variety of processors, including both desktops and laptops, so it's impossible to say if that's a good choice for Principia. In general the more cores, the better.  Also, we recommend destroying debris and disabling the asteroids as they burn CPU for little value.

Link to comment
Share on other sites

57 minutes ago, pleroy said:

Congratulation for discovering that orbits around L2 are unstable. I invite you to consult Wikipedia for details about this instead of trusting what you remember reading.

Note that "12th generation i5" covers a broad variety of processors, including both desktops and laptops, so it's impossible to say if that's a good choice for Principia. In general the more cores, the better.  Also, we recommend destroying debris and disabling the asteroids as they burn CPU for little value.

Thanks for the quick response. I apologize if my tone was rude or if I offended you. Its just been a while since I was into KSP. I have a i5-12450h laptop processor with around 8 cores.

Also, another thing I wanted to ask is does Principia model tidal effects. For example, in Earth orbit, a satellite which is very long (mass concentration like a cylinder) will tend to orient itself in the radial direction due to tidal effects. So, if I were to make such a satellite in KSP, and then turn SAS off in Earth orbit, would it also do the same over a long enough time-period?

If I understand correctly how Principia works, in that it models n-body gravitation on each of the parts making up a vessel; in theory it should be perfectly capable of modelling these tidal effects.

Edited by DA299
Link to comment
Share on other sites

1 hour ago, DA299 said:

If I understand correctly how Principia works, in that it models n-body gravitation on each of the parts making up a vessel; in theory it should be perfectly capable of modelling these tidal effects.

This is not how Principia works.  Gravitational forces are applied to the vessel, not to its parts.  Vessels can have hundreds of parts, the performance would be horrendous.

Consequently, there are no tidal effects.

Link to comment
Share on other sites

  • 2 weeks later...
Posted (edited)
On 4/23/2024 at 8:06 AM, DA299 said:

It requires course corrections roughly every 14 days...

14 days...You did well then with Earth-Moon L2...

also, if you come up with Principia saves that have an orbit which you find particularly interesting, to help others tinker & explore, you are welcome to share such save files over at the forum thread I mentioned in this earlier post:

https://forum.kerbalspaceprogram.com/topic/162200-wip181-191-1101-1110–2-1122–5-principia—version-‎‎کاشانی-released-2024-05-08—n-body-and-extended-body-gravitation/?do=findComment&comment=4301119

Edited by AloE
Link to comment
Share on other sites

On 5/8/2024 at 11:13 PM, AloE said:

14 days...You did well then with Earth-Moon L2...

I can report similar stability, basically tried to recreate the Queqiao L2 halo orbit, using an approach like in Fig.22 in NASA TN D-6365 from 1971.

However I was able to achieve up to 30 day correction intervals once I upgraded the relay to use the ion drive and limited thrust to 0.5% maximum and only a single tick on the thrust controller.

On the other hand the planned NRHO of the lunar gateway is stable for 3 to 6 months even though I completely messed up the approach and orbital parameters. Couldn't find a paper detailing the exact impulses for the planned mission.

On 5/8/2024 at 11:13 PM, AloE said:

also, if you come up with Principia saves that have an orbit which you find particularly interesting, to help others tinker & explore, you are welcome to share such save files over at the forum thread I mentioned in this earlier post:

At least in my case, I have such a mess of mods, most of them customized, that it's unlikely any spacecraft would survive loading the save elsewhere. Or is there a way to "sanitize" a messy save?

Link to comment
Share on other sites

On 5/10/2024 at 7:11 PM, jd284 said:

Or is there a way to "sanitize" a messy save?

Happy to continue the discussion over at my thread...I'd be delighted to try to take a look at a copy of your NRHO save & see if I can workout a decent 'sanitize a Principia save' process...easiest for me would be if you create a copy of that save then in that copy via tracking station remove all but the relevant craft (but is that is difficult I can also edit the copy of the original save directly at my side).  Having the actual .craft file as well would also enable me to ID the parts/mods I/others would need to load for that specific craft. 

Link to comment
Share on other sites

3 hours ago, jackoridd7 said:

Hi, is it possible to find the historical trajectory in the game files? (like the green trajectory shown). I wish to use it in a 3D plot / ephemeris data, Thankyou.

That trajectory is not stored in the save, it is reconstructed dynamically from the past burns.

Is what you want to do possible?  Certainly, after all Principia does it.  Is it easy?  Hell no, but if you are adventurous and proficient in C++, look at the PluginCompatibilityTest in the Principia code base: it reads saves and extract various pieces of information from them.  You'll want to see how it reads the class Vessel, and you'll want to focus on methods ReadFromMessage and Reanimate in that class.

Link to comment
Share on other sites

5 hours ago, pleroy said:

That trajectory is not stored in the save, it is reconstructed dynamically from the past burns.

Is what you want to do possible?  Certainly, after all Principia does it.  Is it easy?  Hell no, but if you are adventurous and proficient in C++, look at the PluginCompatibilityTest in the Principia code base: it reads saves and extract various pieces of information from them.  You'll want to see how it reads the class Vessel, and you'll want to focus on methods ReadFromMessage and Reanimate in that class.

Thankyou so much for your reply, I am in no way proficient in any type of coding so I will attempt to solve this trajectory by hand. I was hoping that perhaps the trajectory was saved as a simple txyz format but by looking in the persistent files I can also see that there is no such data.

Link to comment
Share on other sites

Is there a mod or in-game feature that lets me see coordinates (Earth inertial fixed or ICRF any is fine).  As I will be able to make a method for doing what I previously mentioned.

Link to comment
Share on other sites

9 hours ago, jackoridd7 said:

Is there a mod or in-game feature that lets me see coordinates (Earth inertial fixed or ICRF any is fine).  As I will be able to make a method for doing what I previously mentioned.

KerbNet (right click on probe and "KerbNet Access") can show where your cursor is located on Earth, and shows degrees and minutes (not seconds). Going into Flight Info (Cheats by Alt+F12 and under Console) will give you the decimal coordinates. If you want a mod, you can use MechJeb or KER. Both will show DMS or decimal.

Link to comment
Share on other sites

so ive been wondering for some time, is it possible that a version of principia could be made where it only adds the axial tilts like tilt'em did but for recent KSP versions? Apologies if this has been asked before.

Link to comment
Share on other sites

1 hour ago, Moth_Eris said:

is it possible that a version of principia could be made where it only adds the axial tilts like tilt'em did but for recent KSP versions?

Possible?  Sure, this is just software, you could fork Principia and remove everything except axial tilt.  Why anyone would want to waste time doing this is beyond me, though.  Note in particular that Tilt'Em never quite worked and there are deep reasons for that.  You cannot implement axial tilt without redoing a good chunk of the physics (which Principia does, of course).

Link to comment
Share on other sites

2 hours ago, pleroy said:

Possible?  Sure, this is just software, you could fork Principia and remove everything except axial tilt.  Why anyone would want to waste time doing this is beyond me, though.  Note in particular that Tilt'Em never quite worked and there are deep reasons for that.  You cannot implement axial tilt without redoing a good chunk of the physics (which Principia does, of course).

Or you could pull a party trick and fake the tilt so that it seems like everything is tilted, really i just want the effect of things looking tilted which seems somewhat simple, you basically just render everything as if it were tilted as the first pass so that reflecitons are consistent and go from there. From my understanding which may be (and likely is) minimal.

Link to comment
Share on other sites

6 hours ago, Moth_Eris said:

Or you could pull a party trick and fake the tilt so that it seems like everything is tilted...

You didn't read that post that I linked above, did you?

Link to comment
Share on other sites

11 hours ago, pleroy said:

You didn't read that post that I linked above, did you?

I did, im just wanting a mod that doesnt use N-body physics but also has axial tilt, i know its possible but it is unbelievably complicated if you want to keep stock physics, you would have to replicate it with axial tilts which ksp 1 devs didnt even think was possible. Who knows, someone might make one that works with modern KSP, not gonna be soon at all though.

Link to comment
Share on other sites

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