Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Hyperjump exit point is sometimes too close to White Dwarf #4479
The hyperjump exit point is sometimes too close to a White Dwarf.
Have a chance to survive.
Steps to reproduce
Jump to a White Dwarf e.g. Van Maanen's Star (0, -2, 0)
My pioneer version (and OS):
Van Maanen's Star has a surface gravity of 207186.972g. (for reference, Sun only has about 25-30g)
Maybe we could take both the star's radius AND the mass into consideration to calculate the exit point.
Also, this problem does not happen every time I jump to Van Maanen's Star, but it is not a single time occurance.
Erm, what stars did you jump from when testing, because I've had a variety of things happen.
Sometimes I miss the star and get flung out.
There's some randomness involved in exiting but it also depends on where you came from a bit.
I never really looked at the code, but I know that the orbital speed formula requires the mass of the star. That's how physics (should) work.
I've jumped to Van Maanen's Star system from Sol and Epsilon Eridani a few times, and that's it.
I've also jumped between lots of other star systems, but the worst case was the orbital velocity was a little too high and I got suborbital trajectories. (At least that's what the orbit display told me.)
So Van Maanen's Star is the only one that required me to panic immediately.
If you look at the line starting here: https://github.com/pioneerspacesim/pioneer/blob/master/src/Game.cpp#L523
You'll see that I'm not 100% certain of my calculations in this area
EDIT: line 539 is also self explanatory: https://github.com/pioneerspacesim/pioneer/blob/master/src/Game.cpp#L539