Jump to content

[WIP][1.8.1, 1.9.1, 1.10.1, 1.11.0–2, 1.12.2–5] Principia—version ‎‎Kronecker, released 2024-11-01—n-Body and Extended Body Gravitation


eggrobin

Recommended Posts

On 26/10/2017 at 12:22 AM, scimas said:

@eggrobin I had another question, when I click show manoeuvre on navball, does Principia create a single node and keep updating its values over time or does it constantly remove and add node according its calculations? I'm asking with kOS in mind, trying to write down a script that can execute nodes. The mod already has manoeuvre nodes defined and can get/set nodes in stock KSP. If Principia does create a single node, its really going to be fun playing around with flight plans that can be executed almost perfectly!

Alright, I tested some of this. It seems that Principia does create a single node. I was able to lock onto the node, the delta V vector and then execute it using standard kOS code! Although Principia's delta V vector keeps changing as opposed to the stock manoeuvre system, the time to burn remains same which helps a lot. But if that's a problem for someone, Principia provides 'inertially fixed' manoeuvres too. The only details I was manually providing was the burn time, but that can be calculated in the script itself too.

What I haven't tested is whether it creates a single node and updates it for every manoeuvre in the flight plan or creates a separate node for every manoeuvre. Either way it should be possible to execute a complete flight plan with a single run of a script, assuming that the nodes are reasonably distant from each other in time! :cool:

Link to comment
Share on other sites

On 10/27/2017 at 6:39 AM, scimas said:

Alright, I tested some of this. It seems that Principia does create a single node. I was able to lock onto the node, the delta V vector and then execute it using standard kOS code! Although Principia's delta V vector keeps changing as opposed to the stock manoeuvre system, the time to burn remains same which helps a lot. But if that's a problem for someone, Principia provides 'inertially fixed' manoeuvres too. The only details I was manually providing was the burn time, but that can be calculated in the script itself too.

What I haven't tested is whether it creates a single node and updates it for every manoeuvre in the flight plan or creates a separate node for every manoeuvre. Either way it should be possible to execute a complete flight plan with a single run of a script, assuming that the nodes are reasonably distant from each other in time! :cool:

Last time I clicked "Inertially fixed" for my 20-minute trans-cytherian injection, my craft ended up pitching 60 degrees from prograde when I had it follow the maneuver node marker.  I also had an issue where the maneuver node marker would shift wildly when my path would go from elliptical to hyperbolic.  This was using body-centric inertial frames of reference.

I haven't updated to Chasles yet.  Hope that fixes another bug Cesaro created where using Hyperedit to jump ahead in time would somehow cause any craft I launch to be rolled out to the middle of the Altantic, not the launchpad.

Edited by Nittany Tiger
Link to comment
Share on other sites

6 hours ago, Nittany Tiger said:

Last time I clicked "Inertially fixed" for my 20-minute trans-cytherian injection, my craft ended up pitching 60 degrees from prograde when I had it follow the maneuver node marker.  I also had an issue where the maneuver node marker would shift wildly when my path would go from elliptical to hyperbolic.  This was using body-centric inertial frames of reference.

Intended behaviour: inertially fixed means it keeps pointing in the same direction, regardless of what happens to the tangent vector after ignition (when it is not checked, the burn direction will follow the Frenet frame).

Inertially fixed manoeuvres can be used e.g. for spin-stabilized burns, where you do not have guidance to track the tangent vector; if you are able to guide your burn the non-inertially-fixed option is far more efficient on long burns.

6 hours ago, Nittany Tiger said:

I haven't updated to Chasles yet.  Hope that fixes another bug Cesaro created where using Hyperedit to jump ahead in time would somehow cause any craft I launch to be rolled out to the middle of the Altantic, not the launchpad.

Chasles probably does not fix that bug (but you should upgrade nevertheless!), see the change log for what it does. We tend to have long-standing compatibility issues with Hyperedit because by design it changes things that we manage, contradicting our expectations; that being said, bugs are even less likely to get fixed if you don't report them. :)

Link to comment
Share on other sites

Yeah, I figured the inertial was a fixed vector frame.  I assume it's the same as the stock maneuver nodes if you combine it with impulse calculations.  I do like the non-intertial tangent vector since it does allow for more efficient burns.  What I figured doing was to switch SAS from maneuver node tracking to stability assist when my velocity neared Earth's escape velocity so my ship would not turn wildly trying to chase after a wildly-varying maneuver node.

I did think of a possible cause.  My burn was 20 minutes, and about 17 minutes in, I would dump empty external tanks to conserve dV.  I know that Principia doesn't like mass changes during maneuvers according to the wiki (other than the obvious burning of fuel), so maybe that had something to do with it?  It doesn't seem logical to me, though.  I bet I could understand that more if I dust off my old classical mechanics books and see what math might be behind Principia. :wink:

As far as the Hyperedit issues, they're not big deals.  I did update, and it didn't fix the issue, but I can work around the issue by just making another save or quicksaving certain ways.  I only need Hyperedit to move the game's clock forward to 1985 (and back to March 21st for failed mission attempts), which would take quite a while with time warping (You have to warp 35 years).  Warping forward once doesn't seem to make the bug happen, and I could find other ways of moving the clock like editing the save file, so Hyperedit incompatibilities aren't something that's a dealbreaker for me when using this mod.  I'm clever enough to work around the bugs.

Edited by Nittany Tiger
Link to comment
Share on other sites

2 hours ago, Nittany Tiger said:

What I figured doing was to switch SAS from maneuver node tracking to stability assist when my velocity neared Earth's escape velocity so my ship would not turn wildly trying to chase after a wildly-varying maneuver node.

Abrupt changes are weird, this is just supposed to track the Frenet frame; can you provide more details about what you're doing?

2 hours ago, Nittany Tiger said:

I only need Hyperedit to move the game's clock forward to 1985 (and back to March 21st for failed mission attempts), which would take quite a while with time warping (You have to warp 35 years).  Warping forward once doesn't seem to make the bug happen, and I could find other ways of moving the clock like editing the save file, so Hyperedit incompatibilities aren't something that's a dealbreaker for me when using this mod.  I'm clever enough to work around the bugs.

I would like to point out here that this is a fundamental incompatibility: with Principia, you have to warp (i.e., to simulate the evolution of the solar system) to get an accurate and deterministic state of the solar system at a later date. Hyperedit-like editing that changes the orbits cannot work even in theory, since the orbits of the celestial bodies are highly non-Keplerian (see the precession of the Moon's orbit). In practice, since Hyperedit will break our assumptions this will result in particularly weird behaviour (your rollouts in the Atlantic being an example).

In particular, it is important to note that winding the clock back fundamentally breaks the assumptions of Principia; it may (and should) crash; at the very least it will behave extremely weirdly (even if it does not crash, it is no longer doing anything, and is waiting for the clock to go forward from its internal time).

If you do need an initial state later than RSS's default 1950 and do not want to warp (and save after warping, which should create a state from which you can resume), you should generate a config file for your chosen starting date, like https://github.com/mockingbirdnest/Principia/blob/master/astronomy/sol_initial_state_jd_2433282_500000000.cfg.

This requires sending a query to HORIZONS (similar to this one) via their email interface, receiving about a few dozen emails, parsing said emails with an awk script to generate text format protobufs, and using the generate_configuration tool to produce the cfg file. It is not for the faint of heart, and I would recommend you warp to your preferred initial date and keep a copy of the resulting save instead.

Link to comment
Share on other sites

7 minutes ago, eggrobin said:

Abrupt changes are weird, this is just supposed to track the Frenet frame; can you provide more details about what you're doing?

I'm trying to fly an opposition-class Mars mission with the Venus flyby occurring during the trip to Mars.  If you've ever read Voyage, then you'll know the mission.  This is my ship.

1F447FC49F328DF0A0E0FA18CA71D5E0EF64856D

So I want to burn to inject into an Earth-Venus-Mars trajectory.  During the burn, the two silver external tanks get depleted, so I jettison them mid-burn.

594FB1293E4A37CDF14F48DE91F380015DD56F31

When I set up the burn, I use either the Earth-Centered Inertial frame, Venus-Centered Inertial Frame, or Mars-Centered Inertial frame.  When doing the burn, I use the Earth-Centered Inertial frame.  I'm not sure if you have to stick to one reference frame when doing the planning and burning.  Would make it hard for me to do this flyby since I need to switch reference frames to see where I need to tweak my flight plan to fly by Venus and intercept Mars.

I'm also not certain if you have to set both the flight prediction frame of reference and flight planning frame of reference to the same frame when manipulating a maneuver node or doing a burn.  I always see a warning message when those two frames don't match, but when I have the frames match, I sometimes get nonsensical trajectories like burns that never exit Earth's SOI.

And for my mission, it has to start on or around March 21st, 1985, and that's why I need to advance the game past RSS's default start date of 1/1/1951.  I guess I'll just do what you recommended to get to the date I need and just warp there.

 

Link to comment
Share on other sites

Should I download from the green Clone or Download button? Is that the latest updated principia? even if it isn't the official it might have some improvements, right?

Ok, I think tha link is completely something else. I'll stay with clashes.  I just ran into a crash and am trying to fix my mod list...

Edited by Agustin
Link to comment
Share on other sites

I got to Minmmus, and landed. When I tried to go away from the surface, the game crashed.

Here is the glog archives: https://www.dropbox.com/s/yn3i35y8vkhn4cj/Principia.rar?dl=0

And here is the KSP.log https://www.dropbox.com/s/lq9jcl4o4m72yiw/KSP.rar?dl=0

Github Issue: https://github.com/mockingbirdnest/Principia/issues/1618

EDIT: Same crash happens sometimes when on space and in EVA, I try to enter the cockpit again. It freezes and then crash to desktop.

Edited by Agustin
Link to comment
Share on other sites

What I have noticed is someimes, when using SAS to point prograde or, normal or antinormal, etc, autopilot points somewhere else, maybe some degrees north, or a little bit off. Stability does work properly and I end up using manually, but sometimes it works, and sometimes it doesn't and it points a little off... Anybody having this issue as well?

Link to comment
Share on other sites

Just came upon a System.NullReferenceException bug, but I'm unable to reproduce it.

I had a vessel landed (flat on its side) on Mun. The only way to go was fire up engine and hope for the best. So I did. Within a second the particles for explosion showed up and KSP crashed to desktop with Principia logs showing NullReferenceException.

I do have the save file and the logs, though not sure whether to create an issue on github..

Also, not sure if its related or not to Principia taking control of vessel as it leaves surface, but sometimes (usually after quick load when ships bounce on surface,) KSP fails to recognize that the ship is in flight. If you don't allow that bounced ship to touch ground, its state remains 'Landed' until it does touch ground, and thereafter its state is tracked properly.

Link to comment
Share on other sites

11 minutes ago, scimas said:

Just came upon a System.NullReferenceException bug, but I'm unable to reproduce it.

I had a vessel landed (flat on its side) on Mun. The only way to go was fire up engine and hope for the best. So I did. Within a second the particles for explosion showed up and KSP crashed to desktop with Principia logs showing NullReferenceException.

I do have the save file and the logs, though not sure whether to create an issue on github..

This sounds like https://github.com/mockingbirdnest/Principia/issues/1618, do you have the same stacktrace? If so then it should be solved in 陈景润; otherwise open an issue.

Link to comment
Share on other sites

I'm not sure if anyone else is having this issue but every time I dock with my station to resupply or for crew transfers, after undocking the undocked spacecraft experiences a pretty consistent force of ~.45g and immediately after undock it gets dragged toward the earth. During this time I can't timewarp other than physical and I can't switch vessels. I'm pretty sure it's something with Principia because when I make a copy of everything and just remove Principia then the two craft stay by each other with no forces acting on either craft. 
I'm running 1.2.2 and the latest version of Principia

Link to comment
Share on other sites

I have also experienced the "vessel under acceleration" issue after undocking in 1.2.2 . I wasn't aware it was as high as 0.45g though.

Unfortunately I have just transitioned to 1.3.1 and not reached the point in my new game where I am in a position to perform docking manoeuvres, so unable to assist with logs.  

Edited by lawndart
Link to comment
Share on other sites

Not yet been able to reproduce the issue with a clean install and just Principia and KER added. We can rule out MechJeb as being the cause as I don't use it. 

I'll keep trying different orbital parameters and hopefully it will manifest itself.

From my old 1.2.2 heavily modded game: Lighter docked with fuel depot

8wpy722.jpg

 

The depot after undocking. Time acceleration works normally. Possibly because it has greater mass?

FUhMjFe.jpg

 

The Lighter. On undocking it seem to "fall off" the docking connector towards Gael. Note KER does not show the vessel as under acceleration. Quicksaving then reloading would usually fix the problem.

hkg14XO.jpg

Link to comment
Share on other sites

For the new moon (lunation number 221), the new release (陈景润) is out.

This release solves a longstanding issue (#228) with the way trajectories were stored, which caused spikes or loops in histories computed at high timewarp.

Again, we support three versions of KSP: downloads are available for 1.3.1, 1.3.0 and for 1.2.2. Make sure you download the right one (if you don't, the game will crash on load).

See the change log for more details.

Thanks to @awang for contributions (fixed a UI bug) during this lunation.

Link to comment
Share on other sites

Hello, I wanted to start to use principia mod, but after I start a new save I always get error report that principia.dll could not be loaded, unknown error. I used KSP 1.2.2 and tryed two latest releases. I definitely have the principia.dll in the right folder. I was looking for an answer in the FAQ and on the internet and I couldn't find anything. Any ideas?

Link to comment
Share on other sites

You're probably using the wrong 'version' for 1.2.2. The devs provide separate download for each of the latest version of KSP, ie one for 1.2.2, one for 1.3.0 and one for 1.3.1. If you mix it it up, KSP will crash on load. And Principia works only with the 64 bit version of KSP, so maybe you're using 32 bit.

Or maybe your download got corrupted..

Link to comment
Share on other sites

5 hours ago, scimas said:

You're probably using the wrong 'version' for 1.2.2. The devs provide separate download for each of the latest version of KSP, ie one for 1.2.2, one for 1.3.0 and one for 1.3.1. If you mix it it up, KSP will crash on load. And Principia works only with the 64 bit version of KSP, so maybe you're using 32 bit.

Or maybe your download got corrupted..

No, I am useing 1.2.2 KSP and pricipia for 1.2.2. My KSP does not crash, it just does not load principia. And I definetly have 64 bit version.

Link to comment
Share on other sites

Is there a known bug that would explain why my KSP crashes if I try to warp more than about 20 days at the KSC?

I am hoping there is, otherwise I am facing a fair amount of mod interaction investigation.

EDIT :

It seems the bug I have is a lot like `Crash when time accelerating #1561`. I have the latest version of Principia and that issue is closed though.

Are there particular logs or similar which may be useful?

EDIT 2 : I have a new error in glog,

Spoiler

Log file created at: 2017/11/19 17:57:40
Running on machine: JOHNFX
Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg
E1119 17:57:40.758240  7476 interface.cpp:662] Closed Timelike Curve: 471805.96446538 > 471761.21645963 plugin-universal=44.7480057499488

 

 

Edited by John FX
Link to comment
Share on other sites

13 hours ago, John FX said:

Is there a known bug that would explain why my KSP crashes if I try to warp more than about 20 days at the KSC?

I am hoping there is, otherwise I am facing a fair amount of mod interaction investigation.

EDIT :

It seems the bug I have is a lot like `Crash when time accelerating #1561`. I have the latest version of Principia and that issue is closed though.

Are there particular logs or similar which may be useful?

EDIT 2 : I have a new error in glog,

  Reveal hidden contents

Log file created at: 2017/11/19 17:57:40
Running on machine: JOHNFX
Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg
E1119 17:57:40.758240  7476 interface.cpp:662] Closed Timelike Curve: 471805.96446538 > 471761.21645963 plugin-universal=44.7480057499488

 

 

This is not a known bug.  We'll need you to open an issue on Github and give us your complete logs to investigate, as explained in the FAQs.

Don't read too much in the similarity to #1561, it's unlikely to be the same problem because the code has changed quite a bit.  Also, the glog message that you mention is innocuous.

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