UmbralRaptor changed the topic of #kspacademia to: https://gist.github.com/pdn4kd/164b9b85435d87afbec0c3a7e69d3e6d | Dogs are cats. Spiders are cat interferometers. | Космизм сегодня! | Document well, for tomorrow you may get mauled by a ネコバス. | <UmbralRaptor> egg|nomz|egg: generally if your eyes are dewing over, that's not the weather. | <ferram4> I shall beat my problems to death with an engineer. | We can haz pdf
egg|laptop|egg has quit [Read error: Connection reset by peer]
<galois>
title: Xsux-IME/read_sign_list.py at 815b49e87c172645ece40bd60cbc4dd90b5f16d0 · eggrobin/Xsux-IME · GitHub
<whitequark>
in too much pain to read
<raptop>
:(
<egg|laptop|egg>
:-/
<WeylandsWings>
hey egg|laptop|egg how does principa do n-body and time warp
<egg|laptop|egg>
what do you mean
<WeylandsWings>
like wouldnt the math kinda fall apart / lead to weird results if you just increased the delta t
<egg|laptop|egg>
we do not increase the time step (indeed that would break symplecticity, which is only a thing for fixed-step methods)
<egg|laptop|egg>
but there is no requirement for the time step of the integration to be related to the time step of the game
<WeylandsWings>
ao you just run more calcs on the backend which arent shown to the user?
<WeylandsWings>
(except as an averaged motion?)
<egg|laptop|egg>
in fact the time step of the celestial bodies in RSS is 10 min
<egg|laptop|egg>
yeah, or fewer (and we have interpolation/approximation methods to evaluate at arbitrary points)
<WeylandsWings>
interesting
<egg|laptop|egg>
at timewarp below 30 000 we do less than one celestial body step per game step
<WeylandsWings>
me and ZLSA are discussing what a better KSP might look like (and how it would need a custom engine and what not)
<egg|laptop|egg>
(the vessel steps are 10 s, so that threshold is 500, not that this threshold is very meaningful; it’s not like anything relies on it, you just have a thing that computes points and constructs interpolation, and on the other side a thing that evaluates a continuous trajectory)
<egg|laptop|egg>
ZLSA?
<raptop>
person in another channel
ZLSA has joined #kspacademia
<WeylandsWings>
one sec
<WeylandsWings>
there he is
<WeylandsWings>
he had initially asked have n number would be a good one to do and i said 3 for earth orbit (Earth Moon Sun)
<ZLSA>
oh nice, the smart people channel!
<WeylandsWings>
and then we got into how do you do n body and timewarp
<egg|laptop|egg>
as has previously been discussed on the fora and elsewhere, the n-body gravitation part has never been the difficult bit
<ZLSA>
the initial context is: there's a scale between KSP (2-body keplerian) and reality; where would you expect a game to fall on that scale?
<egg|laptop|egg>
(arguably the extended-body stuff is hard to implement, but that is a different matter)
<ZLSA>
AIUI, n-body is mathematically nearly trivial, but making it efficient and usable is the big burden
<egg|laptop|egg>
no
<ZLSA>
wait, wrong terminology
<egg|laptop|egg>
that is a completely well-understood problem and it was done in a day
<egg|laptop|egg>
the difficulty, and the reason why we have been at this madness for five years, is to provide the player with the tools to make sense of this new environment
<WeylandsWings>
i do wonder if you just calculated a mass/distance ratio for all bodies and just grabbed the top 3/4 to actually run the gravitational potential off of how close you would be to reality
<egg|laptop|egg>
(and that is also where you do end up with some more interesting performance issues: predicting the trajectory as you burn requires a fairly fast computation, although you can afford to be less precise and use a nonsymplectic adaptive method)
<egg|laptop|egg>
> i do wonder if you just calculated a mass/distance ratio for all bodies and just grabbed the top 3/4 to actually run the gravitational potential off of how close you would be to reality
<ZLSA>
WeylandsWings: that's exactly the shortcut I planned on. In fact I would expect principia does that already
<egg|laptop|egg>
you are trying to solve a problem that is not here, in a way that does not help
<egg|laptop|egg>
the costly thing is computing the distance
<WeylandsWings>
i would think that would be trivial because it is just vector math to the datum of the overall system
<WeylandsWings>
vector addition ^
<WeylandsWings>
whereas the full force requires multiplication
<ZLSA>
WeylandsWings: but it needs to be done a ridiculous amount of times though, and I don't expect KSP has this info nicely laid out in memory
<WeylandsWings>
yeah i have no idea how ksp stores stuff
<egg|laptop|egg>
OK no, I’m sorry, you are both completely missing the forest for the trees here
<egg|laptop|egg>
1. Computing the evolution of the solar system on the timescales we care about is fast enough that it is irrelevant, because other things are much slower
<egg|laptop|egg>
2. Those other things are spacecraft, because those can do fast things (and you still have to give them a constant timestep, because you want symplecticity so they don’t drift in energy)
<ZLSA>
oh, principia does true n-body with all spacecraft?
<egg|laptop|egg>
no
<egg|laptop|egg>
3. The costly thing (as in, the thing that limits timewarp rate) is therefore computing the trajectory of your spacecraft (with a 10 s timestep) in your *precomputed* solar system
<egg|laptop|egg>
WeylandsWings: note that what KSP has in memory is completely irrelevant; we have our own data structures and our own opinon of where everything is, which is authoritative; we dictate to KSP where it puts things
<WeylandsWings>
was the symplecticity issue the cause of craft spinning up/ out of control after warp in earlier versions of principa?
<egg|laptop|egg>
nono that is a recent effort about persistent rotation
<WeylandsWings>
okay i think that makes sense
<egg|laptop|egg>
we have always had symplecticity because I knew from university that it was what you wanted for this kind of application
<egg|laptop|egg>
so now, when you compute the trajectory of your spacecraft in a precomputed ephemeris, fetching the polynomial for your planet from memory and evaluating it is costly
<egg|laptop|egg>
we have *very heavily* optimized the evaluation of those polynomials
<egg|laptop|egg>
because that is the thing that matters
<galois>
title: Change Log · mockingbirdnest/Principia Wiki · GitHub
<WeylandsWings>
what order are the polynomials?
<egg|laptop|egg>
We use X. X. Newhall’s method for approximating ephemerides, I think we go to degree 9? I forget
<egg|laptop|egg>
typically lower, but if you are looking at Io or Phobos or whatever you will hit high degrees
* X
is used.
<egg|laptop|egg>
X: not you, you you Newhall :-p
* X
doubles upon himself in the new hall.
<WeylandsWings>
egg|laptop|egg: would it be correct to say that the fact you are displaying the results in KSP is completely irrelevant from a principa standpoint and that the computational issue would persist even if you were to be doing it for a totally different game?
<egg|laptop|egg>
yeah, KSP is just a graphics/UI front-end for us :-p
<WeylandsWings>
also thank you for making me have to go look at the Чебышёв polynomials again
<egg|laptop|egg>
(also it deals with local physics/collisions etc., though now we deal with rigid body rotation of the whole)
<WeylandsWings>
there is a reason i didnt do a pure math or physics degree dammit
<egg|laptop|egg>
(physics engines typically do not know how to do rigid body rotation)
<ZLSA>
you know it's scary when the names are Cyrillic
<WeylandsWings>
Chebyshev ZLSA
<ZLSA>
honestly I'm amazed that KSP has gotten this far
<WeylandsWings>
it being romanized doesnt make it much better
<egg|laptop|egg>
Tschebyschoff if you are German
<WeylandsWings>
at least this isnt another Euler method
<ZLSA>
I'm not formally trained, so fancy names scare me until I understand the principle
<egg|laptop|egg>
admittedly doing rigid body rotation right (by solving Euler’s equation formally) took us a year, starting with implementing state-of-the-art elliptic integrals, so I understand why most people don’t go there
<ZLSA>
well, the most complex physics simulation I've ever made was 2D and it didn't work right, so I'm going to have to do a ton of research now lol
<WeylandsWings>
and most people dont go there because video games dont NEED that level of fidelity
<ZLSA>
I still remember ferram's quasi-rants on KSP's aerodynamics
<egg|laptop|egg>
well, most don’t but if you have a game involving freely-rotating bodies in a vacuum it starts getting relevant
<egg|laptop|egg>
(see the Principia users suddenly realizing that they built their spacecraft in such a way that their intended spin-stabilization axis is unstable)
<WeylandsWings>
as in the T bar spinning is space unstable?
<WeylandsWings>
egg|laptop|egg: you are now making me wonder how STK or Freeflyer do it as those are higher fidelity
<egg|laptop|egg>
> as in the T bar spinning is space unstable? << yes
<egg|laptop|egg>
that is a thing that you can compute formally using elliptic integrals; so when you have this kind of setup in KSP+Principia and timewarp, it will keep flipping forever without drift
<WeylandsWings>
i forget the name of that phenomenon
<ZLSA>
rotation inversion/improper rotation. there are like a half dozen synonyms for it
<galois>
title: про эффект Джанибекова -- (ОБЯЗАТЕЛЬНО загляните в описание под видео !!) - YouTube
<WeylandsWings>
now i am wondering what happens if you start spinning it around the axis of the intermediate rotation
<ZLSA>
WeylandsWings: just get yourself into space and try it
<WeylandsWings>
hey i am moving one step closer
<ZLSA>
IIRC Unity's physics engine does properly handle that, but obviously that's not a proper analytical solution
<egg|laptop|egg>
no it does not
<egg|laptop|egg>
we wasted a lot of time to find that out, but it does not even try
<egg|laptop|egg>
you can sort of recover it if you have multi-part vessels, because if you have lots of point masses bolted together that approximates a rigid body, and then Euler integrating that Euler integrates the Euler equation, but if you have a single book-shaped part it does not do anything interesting
<galois>
title: Spin-up on reentry under physics warp with FAR · Issue #2519 · mockingbirdnest/Principia · GitHub
<ZLSA>
oh ouch, that sucks.
<egg|laptop|egg>
WeylandsWings: mind you this is not relevant for most practical spacecraft purposes, because if it is spin-stabilized the engineer will have put the spin axis in the right place, and if it is not there is an ACS
<egg|laptop|egg>
this mostly matters IRL for an out-of-control spacecraft
<WeylandsWings>
well it also matters for recovery
<egg|laptop|egg>
so, say, if Салют 7 had been spinning around a different axis, things would have been a right mess
<WeylandsWings>
trying to figure out if your directional antenna is going to be pointing at you long enough to try to reestablish contact and control
<egg|laptop|egg>
be that docking or remote control
<WeylandsWings>
but granted that is why you put small omni anntennas on 2-4 surfaces
<WeylandsWings>
or on corners on the craft
<egg|laptop|egg>
yeah, but that won’t help you in the outer solar system
<ZLSA>
spacecraft engineers are absolute wizards
<WeylandsWings>
ZLSA: have you hear of gravity gradient stabilization?
<ZLSA>
WeylandsWings: yes
<ZLSA>
I think I first read about it in the Ars story about Columbia's potential rescue
<WeylandsWings>
ah
<WeylandsWings>
yeah that is a pretty crazy idea
<WeylandsWings>
although doesnt help with the roll around the nadir-zenith axis
<WeylandsWings>
radial was the word i was looking for
<WeylandsWings>
roll around the radial axis
e_14159 has quit [Ping timeout: 194 seconds]
e_14159 has joined #kspacademia
<WeylandsWings>
egg|laptop|egg: so crazy idea i kinda want to run the numbers on... how much dV and mass would you have to move from the asteroid belt to to give Mars a moon like Luna (same mass/distance ratio). probably best to start by boosting phobos and making it combine with diemos
<raptop>
All of it and then some?
<WeylandsWings>
really just get enough mass into a concentrated location in mars orbit to maybe start rewarming the core from tidal pull and maybe (hopefully) increase mar's magnetic field to slow/reverse atmo loss
<WeylandsWings>
raptop: i mean yeah it is probably some crazy amount
<ZLSA>
WeylandsWings: it's probably easier to nuke mars, even from a public approval standpoint
<raptop>
Can we just steal one of Saturn's moons instead?
<WeylandsWings>
or make and keep a 1-2 T artificial mag field at the Mars-Sun L2 point
<WeylandsWings>
raptop: that is why i said steal the mass from the asteroid belt... then you dont have to fight with Saturn's gravitational well
<WeylandsWings>
plus you can have the asteroid mining companies rejected asteroids/tailings
<WeylandsWings>
because you dont want to tuck away 16 psyche and all its sweet sweet precious metals
<raptop>
BOTE, you need two asteroid belts?
<raptop>
Unfortunately, the Jupiter Trojans are estimated at 1/5 the mass of the main belt
* raptop
wonders if it's easier to build a better human (and/or keep a meter of rock between the meat creatures and the sky
<raptop>
)
<egg|laptop|egg>
BOTE?
<galois>
BOTE: Back Of The Envelope
<egg|laptop|egg>
TIL there is a sign 𒄙𒄒 with the reading DURAN
<egg|laptop|egg>
𒄙𒄒𒄙𒄒
<raptop>
But do they sing about the quality of copper ingots?
<raptop>
!wpn -add:wpn durian
<galois>
Added wpn 'durian'
<raptop>
!wpn -add:wpn pomegranat
<galois>
Added wpn 'pomegranat'
<raptop>
!wpn -add:wpn ingot
<galois>
Added wpn 'ingot'
<WeylandsWings>
raptop: damn i thought the asteriod belt was more massive
<galois>
[WIKIPEDIA] List of Solar System objects by size | "This is a partial list of Solar System objects by size, arranged in descending order of mean volumetric radius, and divided into several size classes. These lists can also be sorted according to an object's mass and, for the largest objects, volume, density and surface gravity, insofar as these values..."
<WeylandsWings>
hrm so Haumea and makemake combined would be about the right mass
<WeylandsWings>
but bringing them in from the kuiper belt would be quite a chore