orbitersim / orbiter

Open-source repository of Orbiter Space Flight Simulator
MIT License
1.6k stars 215 forks source link

Mars atmospheric model seems broken in 64bit build #353

Open riojax opened 1 year ago

riojax commented 1 year ago

Steps to reproduce

  1. Use a 64bit build
  2. Disable all perturbations (on Physics settings)
  3. Enable Complex flight model (on Vessel settings)
  4. Select scenario: Delta-glider -> Brighton Beach
  5. Select ship: GL-02
  6. Apply & Close
  7. Go to the cockpit and click on HROZ LVL button

P.S. This issue was happening before PR #243

n7275 commented 1 year ago

I won't be in front of a computer for a few days. Could you clarify what happens? Also, is this in the 64bit build, or the 32 bit build or both?

riojax commented 1 year ago

It only happens on 64bit build (32bit build seems ok)

I don't know what is the problem exactly, by that, please take this with a pinch of salt, by it seems like the momentum goes crazy with the ground collision, also later in the air the vector also seems erratic.

Maybe this is caused by the type size in 32 vs 64 bit, or problems in the table?

Anyway, thank you for your time and work :)

n7275 commented 1 year ago

Ahh okay. This is a known issue, #243 , to be exact. It's causes by Phobos and Diemos having 32 bit DLLs and not linking properly with 64 bit Orbiter. There are some efforts under way to fix the issue, but it not a simple fix because we don't have the source code for Mars and Uranus' moons.

Thank you for reporting this though. I can say with near certainty that this is unrelated to the new non-spherical gravity model (especially since you disabled perturbations), and since this has been noted by others since the 64 bit builds started. We'll get it fixed soon, until then the 32 bit builds are definitely a safer bet.

riojax commented 1 year ago

Interesting, but the problem only happens from the PR #239 I did a reset to the commit 80a6fdac439ca1da239b0ceff19a664055066798 and all works well on Mars using the x64 build (that is my latest commit)

n7275 commented 1 year ago

@riojax Have you tried loading a few times in the same scenario, sometimes the bug is a bit random. Phobos or Deimos need to show up in the list of gravity sources for it to cause problems.

This video I captured before my non-spherical updated was merged: https://www.youtube.com/watch?v=B3S6ZECeomk in the main branch, and with all perturbations turned off.

riojax commented 1 year ago

@n7275 nice finding, I was able to replicate it before your PR #239 It happened me only loading a state that was saved on a focused ship landed on Mars.

n7275 commented 1 year ago

Given that the source of this bug is know, and not caused by the new non-spherical gravity model, do you mind closing this issue?

riojax commented 1 year ago

Clearly the PR #239 is not breaking Mars, but the issue is still happening. I will edit it to reflect what we know.