For the development of OMX (fork of Orbiter Multiplayer), I am creating a feature to restore a previous state: I unlocked the acceleration rate that was developed by @Face & fellows for OMP to start a scenario in the past and re-propagate until real time with time accelerations higher than x2... up to x1500. Sometimes, not always, Orbiter freezes. I could isolate the problem (bug?) and I'm pretty sure the problem comes from Orbiter's core, not from OMP, but no error message, nowhere.
Hence, my question: are there requirements on the time acceleration and its management from an addon's code? This topic may be related to a past discussion here
Tips:
Hence, my question: are there requirements on the time acceleration and its management from an addon's code? This topic may be related to a past discussion here
Tips:
- for those familiar with OMP code:
- the thread "DWORD WINAPI statustimer(DWORD sd)" is responsible for the freezing: if I skip the loop based on the acceleration rate, like
, the code works smoothly (accelerating and decelarating automagically until real-time) but Orbiter freezes as soon as the loop executes (acceleration < x2)Code:
while (threaddata->activation) { if (oapiGetTimeAcceleration() > 2) continue;... - OMP includes a function "get_clock_acceleration(...)" that computes an acceleration, based on a PID control loop, with Clock control parameter: Kp=1 Ki=0.5 Kd=0 Eps=0.5 -values by default) => @Face and fellows, were you motivated by some freezing already at the time? Would adjusting parameters be key?
- the thread "DWORD WINAPI statustimer(DWORD sd)" is responsible for the freezing: if I skip the loop based on the acceleration rate, like
- When decelerating to real time, if I "help" Orbiter by continuously pressing the "R" key (acc.decrease), time-acceleration keeps decreasing very progressively and Orbiter smoothly decelerates and adjusts to real time, then everything (including the connection to OMX server) goes back fine. Which makes me think that something in the cores' time-step adjustment is impacted by my code.
