orbitersim / orbiter

Open-source repository of Orbiter Space Flight Simulator
MIT License
1.62k stars 220 forks source link

Bug fix patch #428

Closed jarmonik closed 10 months ago

jarmonik commented 10 months ago

Number of bug fixes:

n7275 commented 10 months ago

I ask mostly out of curiosity, but what was the cause of this? I wasn't able to exactly follow in the code.

jarmonik commented 10 months ago

There were multiples issues. First of all a star visual was incorrectly casted to vPlanet. (It kinda odd that it didn't crash right away). As a result of that the sun light color become NaN. I still need to do some testing by taking the DG in various other places.

n7275 commented 10 months ago

There were multiples issues. First of all a star visual was incorrectly casted to vPlanet. (It kinda odd that it didn't crash right away). As a result of that the sun light color become NaN. I still need to do some testing by taking the DG in various other places.

Oh wow. yeah, that would do it. If I have some time tonight, I'm more than happy to build this branch, and go on a little "grand tour" to test it out.

jarmonik commented 10 months ago

There are still at-least two bug those are both related to a bad surface reference. Strongest gravity source is not always the best reference and using the nearest body also causes problems.

n7275 commented 10 months ago

There are still at-least two bug those are both related to a bad surface reference. Strongest gravity source is not always the best reference and using the nearest body also causes problems.

Would something like "object with largest angular size" work?

jarmonik commented 10 months ago

Would something like "object with largest angular size" work? Probably not. One would need to be pretty close to Phobos until it's larger than Mars. Also the SOI of Io is very small inside Jupiter's gravity.

jarmonik commented 10 months ago

I changed the near body approximation to max of mass^0.33 / distance^2