Closed xparq closed 6 months ago
Just the record of some manual calcs. to check things... (All in meters.)
PLANET: (161.6 x Earth) X ; Y = -2,602,161 ; 9,432,115 VX ; VY = -0.1731978 ; 0.005617
MOON: (39.8 x Earth) X ; Y = 675,572,512 ; -12,564,107 VX ; VY = -0.703406 ; 0.02281
Distance = SQRT(672,970,351^2 + -3,131,992^2) = SQRT(452,889,093,325,063,201 + 9,809,373,888,064) = 672,977,639
F = 33,806,294,475,506,309,669,097,119 N (checked OK: 34,099,773,542,273,339,786,177,572) gP = F/M = 0.0352 m/s^2 gM = F/m = 0.1428 m/s^2
BTW, the Moon feels an even smaller g, and it would take ~5 days to fall into Earth if stopped orbiting. :)
OK, after using double
, fixing the sign bug, and then more digging, experimenting (a lot) more, plus double-checking some calcs. etc., it seems that real-life gravity really is just no fun! :) Things only happen on cosmic time scales...
Fixing the wrong exponent of
distance
, which has beenbut shoulda been
just results in virtually no gravity at all! :-o Spawning 100 densely packed objects just stand still.
Zoomed in, time accelerated 64x, and then finally there's some teeny-tiny movement. I'd imagine planet-sized bodies attracting each other a lot more than that, when they are very near. And I can see nothing like the usual accelerations of free-falling to Earth, even though some objects are many 100x times heavier than Earth!
Or is it still somehow what would happen IRL, and it would take gigantic stars, not planets, to actually be funny? (I've just seen a cool -- and very dynamic -- planet collision simulation about the birth of the Moon, for instance, but dunno if that was real-time.)
I've seen objects slowing down, approaching each other, depending(?) on time mode! :-o And according to the Object View HUD,
v
kept increasing, but the position still stopped changing! :-o That fact thatsuggested that it may be something else than a simple precision issue.
FTR, with 3 spawned bodies (+1 player) up close (and not moving),
a
was in this ballpark, during a full update batch (2 x 4! = 20 calc. cycles):Might still be a
float
precision issue!Anyhow, food for thought:
[x] Must try with
double
to confirm (which would be a gigantic effort (-> #528), but the hardcoded floats are a tech debt anyway...). -> Nothing! :-o[x] Actually, I've also found a sign error in the "half-loop", with the grav. accel. of the opposing body! :-o -> 6622408
UPDATE:
OK, after using
double
, fixing the sign bug, and then more digging, plus double-checking some calcs., it seems that real-life gravity really is just no fun! :) Things only happen on cosmic time scales...