raptop changed the topic of #principia to: READ THE FAQ: http://goo.gl/gMZF9H; The current version is Fréchet. We currently target 1.5.1, 1.6.1, and 1.7.x. <scott_manley> anyone that doubts the wisdom of retrograde bop needs to get the hell out | https://xkcd.com/323/ | <egg> calculating the influence of lamont on Pluto is a bit silly… | <egg> also 4e16 m * 2^-52 is uncomfortably large
egg|laptop|egg has quit [Remote host closed the connection]
egg|cell|egg has quit [Read error: Connection reset by peer]
egg|cell|egg has joined #principia
egg|laptop|egg has joined #principia
egg|cell|egg has quit [Ping timeout: 190 seconds]
egg|cell|egg has joined #principia
Jesin has quit [Ping timeout: 204 seconds]
egg|laptop|egg has quit [Remote host closed the connection]
egg|laptop|egg has joined #principia
egg|laptop|egg has quit [Remote host closed the connection]
egg|laptop|egg has joined #principia
egg|cell|egg has quit [Ping timeout: 204 seconds]
Mike` has quit [Ping timeout: 204 seconds]
egg|cell|egg has joined #principia
Mike` has joined #principia
Jesin has joined #principia
egg|laptop|egg_ has joined #principia
egg|laptop|egg has quit [Ping timeout: 204 seconds]
egg|cell|egg has quit [Ping timeout: 378 seconds]
<discord-_>
AgustinCaniglia. — I think the rotation problem still persists. I mean I am not sure but entering atmosphere from space with my MK1 lander can began to spin with no aparent reason until I opened my parachutes. It was not a so violent spin but don't know why it did though... There was no obvious reason for the spin to happen.
<discord-_>
AgustinCaniglia. — maybe other user can test it too...
<discord-_>
AgustinCaniglia. — with a previously tested craft
egg|cell|egg has joined #principia
* discord-_
egg. — pokes @neph with a stick_
egg|laptop|egg_ has quit [Remote host closed the connection]
egg|cell|egg has quit [Ping timeout: 378 seconds]
egg|cell|egg has joined #principia
egg|cell|egg has quit [Read error: Connection reset by peer]
egg|cell|egg has joined #principia
<discord-_>
Stonesmile. — After some quick testing on my wac with the beta it seems as if the problem with increasing rotation on reentry is fixed, however i now notice oscillations during the whole flight, going to test some more
egg|laptop|egg has joined #principia
egg|laptop|egg has quit [Ping timeout: 190 seconds]
<discord-_>
neph. — Soon, in several hours
<discord-_>
neph. — Just woke up :)
<discord-_>
dkavolis. — @egg `PRINCIPIA_USE_SSE3=1` relative performance to clang default intrinsics with `/fp:strict`
<discord-_>
egg. — @dkavolis Yeah, clang is decent at generating the vector instructions, which MSVC is not, but note that even with PRINCIPIA_USE_SSE3=0, clang is being helped here: R3Element is defined using a union with intel types (and appropriate alignment), and that part is not gated behind PRINCIPIA_USE_SSE3
<discord-_>
egg. — (not sure whether it packs the struct in two registers by default, perhaps it would)
<discord-_>
egg. — also note that it looks like we didn’t do worse than it either :-p
<discord-_>
egg. — (but by using the intrinsics we are less at the mercy of the vagaries of the various optimizers)
<discord-_>
dkavolis. — gcc/clang do a good job at optimizing with intrinsics, only msvc is bad ad it
<discord-_>
dkavolis. — the main reason I try to avoid msvc
<discord-_>
egg. — slightly confused at what you mean by « with intrinsics »
<discord-_>
egg. — we use intrinsics, precisely to get fairly deterministic code generation
<discord-_>
egg. — do you mean « with vector instructions » ?
<discord-_>
dkavolis. — yeah
<discord-_>
Butcher. — Bring back Watcom C.
<discord-_>
egg. — twould be fun to try using AVX2 (since 2 < 3 < 4 this stuff should go much faster than SSE2)
<discord-_>
egg. — but the problem is AVX2 would raise the minimum requirements too high, in particular beyond the machines that we use for development
<discord-_>
dkavolis. — also using AVX2 also slows down cpu clock
<discord-_>
egg. — yes but if you have half the instructions that compensates
<discord-_>
egg. — it doesn’t slow it that much
<discord-_>
dkavolis. — another difference is using clang to vectorize math produces ~15% smaller benchmarks binary
<discord-_>
egg. — yeah that is probably related as well
<discord-_>
dkavolis. — Horner gets nothing from using AVX2
<discord-_>
dkavolis. — HornerEvaluator gets nothing from using AVX2 (edited)
<discord-_>
egg. — no but you cannot just switch the arch flag and call it a day
<discord-_>
dkavolis. — but it's the first step
<discord-_>
egg. — well, yes, except this tells you nothing
<discord-_>
egg. — you need to change R3Element so it is all in one __m256d, to align it properly, probably to override the allocator so that it aligns suitably because I think at this point you exceed the default alignment, etc.
<discord-_>
egg. — otherwise you are doing the same thing but in the bigger instruction set, which is going to probably just be slower unless you get lucky
<discord-_>
dkavolis. — ah, yeah
armed_troop has joined #principia
egg|cell|egg has quit [Read error: Connection reset by peer]
<discord-_>
dkavolis. — Changing alignment and adding a few _m256d instructions makes a difference for vectors
<discord-_>
egg. — you can expect that in principle: we operate on 3D vectors, two registers for xy & z0 in SSE2, two operations for whatever you do (one pd, one sd), becomes one xyz0 with one pd
<discord-_>
egg. — so roughly twice as fast is about right
egg|cell|egg has quit [Ping timeout: 204 seconds]
egg|cell|egg has joined #principia
<discord-_>
egg. — (there are select places where you could use an FMA too, because if you have AVX2 you have that too, but you have to know what you are doing; setting fp contract everywhere is dangerous in this codebase so this really ought to be done by hand)
<discord-_>
egg. — back to reviewing documentation
egg|laptop|egg has quit [Remote host closed the connection]
egg|laptop|egg has joined #principia
<discord-_>
PG. — I think I read somewhere that the ctd when staging/decoupling in certain situations is a principia bug, is that so (loading a save with a ctd-flight does work when principia is removed)? and is there a build that works/a workaround?
<discord-_>
neph. — @egg Testing now 🙂
<discord-_>
PG. — yea and boo at the same time 🙂
<discord-_>
PG. — yea for fix, boo for not now 😄
<discord-_>
egg. — I am slightly confused, you did not get an answer
<discord-_>
egg. — @neph was talking to me
<discord-_>
neph. — 🗣️ 🥚
<discord-_>
PG. — shit, sorry
<discord-_>
egg. — @PG not sure what you read somewhere, somewhere is a strange place where strange things are written; but since you mention decoupling, it might be related to https://github.com/mockingbirdnest/Principia/issues/2507
<discord-_>
egg. — @PG but whether a crash is due to principia or not is a thing you can determine for yourself, by seeing whether we leave a FATAL file
<discord-_>
egg. — as you can see in the FAQ
<discord-_>
egg. — which you must read
<discord-_>
egg. — lest thE WRATH OF THE EGG BE UPON YOU!
<discord-_>
egg. — :-p
<discord-_>
PG. — fear the eggu
<discord-_>
neph. — yes
<discord-_>
egg. — no but seriously, read the FAQ, figuring out if a crash comes from Principia is not hard, and confusion about that just wastes everybody’s time
<discord-_>
PG. — its on this forum is where 'somewhere'is 😄
<discord-_>
egg. — (also it can be a good idea to keep an eye on the issues if you want updates on what is happening to them, though that can admittedly be a bit overwhelming)
<discord-_>
egg. — so if you have a FATAL file and it says something about appending before the fork time there is a good chance it is #2507 (and you can read more about that issue there)
<discord-_>
egg. — @neph how are the sounding rockets?
<discord-_>
PG. — iam an a$$, wrong install 😛 Yes there are fatal logs
<discord-_>
egg. — dollar donkey
<discord-_>
PG. — F0419 12:16:28.649698 22552 discrete_trajectory_body.hpp:182] Check failed: this->is_root() || time > this->Fork()->time Append at -1.52115025275412798e+09 s which is before fork time -1.52115025004163218e+09 s
<discord-_>
egg. — yup, 2507
<discord-_>
egg. — btw, did you upgrade RO recently or install new part mods or do anything that made this issue start showing up?
<discord-_>
PG. — timetravel issues ? 😄
<discord-_>
egg. — the issue had been lying around in Principia for ages, and now all of a sudden everyone finds it
<discord-_>
PG. — new install havent played since 1.3
<discord-_>
PG. — its kinda wierd because most vessels seem fine... some insta ctd and some ctd sometimes.
<discord-_>
lpg. — I started hitting it when I moved to a new 1.8.1 install from 1.7
<discord-_>
lpg. — (which pretty much means upgrades of _everything_)
<discord-_>
egg. — so I guess covid so everyone who had not played for a while starts doing so, upgrades, and we get all the bug reports :D
<discord-_>
PG. — no alas, priority worker here 😦 no free time for me
<discord-_>
PG. — great time to start a RP1 playthrough 😄
<discord-_>
lpg. — my initial assumption was the new rotation magic was tickling the bug in a new way, since this was also my first use of frobenius
<discord-_>
neph. — Report:
<discord-_>
neph. — 1) 🎊 🥳 The mad spinning is no more. 🎊 🥳
<discord-_>
neph. — 2) There are some [new] strange wobbles, an intermediate-axis roll after burnout as you exit atmosphere.
<discord-_>
neph. — 3) There is the old mild roll on ascent. This has been tracked down to be PF's fault. To what extent it may also be responsible for point 2 is anybody's guess.
<discord-_>
neph. — Yeah, I noticed that in the notes. I was expecting about as much, but I was a bit surprised to see it on ascent, not descent. (edited)
<discord-_>
neph. — I would declare the fix a success.
<discord-_>
egg. — @neph can you record your observations in the issue?
<discord-_>
egg. — discord is not quite ephemeral but a pain to search
<discord-_>
lpg. — it ruined my boomerang rocket 😦 but yes, my 3 tests here also seemed to suggest the spin was fixed
<discord-_>
egg. — \o/
<discord-_>
neph. — It is no problem, will do.
<discord-_>
neph. — Out of curiosity, what was the cause? And what was needed to fix it?
<discord-_>
neph. — I see it was something about confusing the physics engine
<discord-_>
PG. — aright, thanks for your time gentlemen
<discord-_>
Stonesmile. — After some testing on my wac with the beta the problem with increasing rotation on reentry is fixed, however i now notice oscillations during the whole flight, would be nice to test against Frenet, but i haven't found a download of that version
<discord-_>
DRVeyl. — > Report:
<discord-_>
DRVeyl. — > 3) There is the old mild roll on ascent. This has been tracked down to be PF's fault. To what extent it may also be responsible for point 2 is anybody's guess.
<discord-_>
DRVeyl. — ... Oh?
<discord-_>
AgustinCaniglia. — I have decoupled with the beta and it didn't crash
<discord-_>
neph. — @DRVeyl My apologies, I'd assumed you'd seen discussion of it, but reviewing the backlog your participation is actually narrowly adjacent to all mentions of it.
<discord-_>
egg. — @neph
<discord-_>
egg. — > what was the cause? And what was needed to fix it?
<discord-_>
egg. — So, PhysX does things. In the presence of atmospheric forces it is hard to reason about those things, but let us go to deep space. You have a vessel freely spinning, no engines, no RCS, no nothing
<discord-_>
egg. — it is a bunch of rigid bodies linked by springs
<discord-_>
egg. — this is what PhysX deals with, and it integrates that system with a symplectic integrator
<discord-_>
DRVeyl. — Ah, I see.
<discord-_>
egg. — a symplectic integrator is one that preserves the symplectic form, which is not a very helpful definition. A property of a symplectic integrator is that first integrals (constants of motion) are *approximately* preserved by the integration
<discord-_>
egg. — so the angular momentum computed by PhysX will wobble about a constant value, the linear momentum likewise
<discord-_>
egg. — so the angular momentum of the solution computed by PhysX will wobble about a constant value, the linear momentum likewise (edited)
<discord-_>
egg. — now, because we know things about the system that PhysX does not (which forces are internal to the vessel and which ones are net), we can figure out what the total angular and linear momenta should be
<discord-_>
egg. — we had long been dealing with correcting the linear momentum
<discord-_>
egg. — correcting that is fine, because you just change the velocity of everything (to whatever Principia figures out the velocity of your vessel should be), and the laws of physics are the same if you go faster
<discord-_>
egg. — but to correct angular momentum is trickier
<discord-_>
egg. — we were simply imparting a change in angular velocity
<discord-_>
egg. — but that changes the system being integrated by PhysX
<discord-_>
egg. — so while we were constantly forcing L to be *exactly* constant, by constantly changing the differential equation under the feet of the integrator, we were making it drift away from a sane solution
<discord-_>
egg. — so while we were constantly forcing L to be *exactly* constant, by constantly changing the differential equation under the feet of the integrator, we were making it drift away from a plausible solution (edited)
<discord-_>
egg. — a freely-spinning capsule in space could end up spinning about another axis eventually
<discord-_>
egg. — a freely-spinning capsule in space would end up spinning about another axis eventually (edited)
<discord-_>
egg. — Now, we still want to enforce the conservation of L, we cannot just trust PhysX on that one
<discord-_>
egg. — the reason being *model errors*
<discord-_>
egg. — sometimes KSP forgets to account for some effects
<discord-_>
egg. — e.g., internal transfers of fuel should lead to internal forces and change the angular velocity
<discord-_>
egg. — they do not, and instead L changes
<discord-_>
egg. — Principia knows that no net torque occurred, so knows that L should not have changed
<discord-_>
egg. — this is how Frobenius allows you to spin/despin by moving fuel around
<discord-_>
egg. — but we now do most of that correction by reorienting the vessel
<discord-_>
egg. — this is motivated by the observation that, on a freely-spinning body, L as computed by PhysX wobbles about the true value of L in direction, but is basically the same in norm
<discord-_>
egg. — so most of the correction can be done by reorienting the vessel
<discord-_>
egg. — the rest is done by changing the angular velocity, but that perturbs the system less because there is less of that
<discord-_>
egg. — then we need to be careful that we don’t flip the vessel around if it doesn’t spin very much, so in some cases we do everything by angular velocity. Finding a good way to define "in some cases" took me a while.
<discord-_>
neph. — That makes sense! Thank you for the explanation
<_whitenotifier-d13c>
[Principia] nepphhh commented on pull request #2533: A more stable angular momentum correction. - https://git.io/JfTCm
<discord-_>
egg. — now, I notice that the correction in L that we impart is much larger in the atmosphere
<_whitenotifier-d13c>
[Principia] nepphhh edited a comment on pull request #2533: A more stable angular momentum correction. - https://git.io/JfTCm
<discord-_>
egg. — so my assumption is that we disagree with PhysX on the effect that a torque should have on the total angular momentum, leading to an error
<_whitenotifier-d13c>
[Principia] nepphhh edited a comment on pull request #2533: A more stable angular momentum correction. - https://git.io/JfTCm
<discord-_>
egg. — (thus larger corrections, thus some weird oscillations, albeit less than usual)
<_whitenotifier-d13c>
[Principia] nepphhh edited a comment on pull request #2533: A more stable angular momentum correction. - https://git.io/JfTCm
<discord-_>
egg. — in deep space I would expect the thing to be completely stable at this point, it is almost all done by reorientation which is safe
<discord-_>
egg. — @neph note that reorientation of the vessel to align L is safe from the "confusing PhysX" viewpoint because the laws of physics are the same in all directions, like the change of velocity to correct p
<discord-_>
egg. — but the distinction is that reorienting can only correct the direction of L, not its norm, whereas a change of velocity can fully correct p
<discord-_>
DRVeyl. — @neph Do you duplicate that #3 with a proc fairing base that has 2+ PF sides (instead of a single round node) ?
<discord-_>
DRVeyl. — @neph Do you duplicate that #3 with a proc fairing base that has 2+ PF sides (instead of a single round part that is offset) ? (edited)
<discord-_>
neph. — I don't believe so. Do you want me to boot & test taht?
<discord-_>
neph. — I don't believe so. Do you want me to boot & test that? (edited)
<discord-_>
DRVeyl. — Yes, because the difference between the two is a balanced CoM (with 2+ parts) versus an apparent part mass that is offset (the entire fairing mass is not at the center of the fairing base)
<discord-_>
DRVeyl. — Yes, because the difference between the two is a balanced CoM (with 2+ parts) versus an apparent part mass that is offset (the entire fairing mass is not at the center of the fairing base), and Principia isn't currently looking at part.CoMoffset. (edited)
<discord-_>
neph. — Sure thing. I think I tested it in the past but I can't remember for sure.
<discord-_>
DRVeyl. — We tested this in relation to the issues with FAR, I don't recall in the context of this additional spin.
<discord-_>
dkavolis. — @neph If you upload the craft file I can check what FAR does
<discord-_>
neph. — @egg Could there be any worth in sometimes politely giving PhysX a correction torque to apply, rather than setting velocity directly?
<discord-_>
egg. — no, that would just do the same thing
<discord-_>
neph. — @DRVeyl Yup, I tested it on my own because I figured it'd be related to the changes you made to fairing wall CoMs
<discord-_>
neph. — I might have to walk back that second point. This time it was not the case. Might be unrelated; it had seemed consistent prior to putting two nodes on. Will test it once more....
egg|cell|egg has quit [Ping timeout: 189 seconds]
<discord-_>
neph. — Third attempt: barely any fubini oscillations, matching the first attempt's behavior.
<discord-_>
neph. — Happy to help, let me know if there's anything else I can do 🙂
<discord-_>
Stonesmile. — Is there a way to obtain a copy of Frenet to test if the oscillations i'm seeing are because of Fubini or if they were damped in Frobenius?
<discord-_>
egg. — Frenet did not do anything that could cause oscillations, so I guess this is Fubini
<discord-_>
egg. — but you can find links to old versions by looking at the history of the readme
<discord-_>
Stonesmile. — Ah, will test just in case
egg|laptop|egg has quit [Remote host closed the connection]
egg|cell|egg has joined #principia
Jesin has quit [Quit: Leaving]
Mike` has quit [Ping timeout: 189 seconds]
Jesin has joined #principia
Mike` has joined #principia
<_whitenotifier-d13c>
[Principia] pleroy opened pull request #2539: Add a C# class PrincipiaTimeSpan to gather time formatting and parsing - https://git.io/JfTR5
<discord-_>
Pteropodidae. — A fascinating explanation of the spin bug. Thanks!
<discord-_>
Butcher. — @egg I had a spinning rocket descending earlier, then decoupled most of the mass leaving just a chute, command part and sample. When I decoupled (or close to) the spin accelerated by a couple of orders of magnitude. Is this the bug or expected behaviour?
<_whitenotifier-d13c>
[Principia] pleroy commented on issue #2519: Spin-up on reentry under physics warp with FAR - https://git.io/JfTuk