You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to reduce the CPU load, the SatCrunchWorker is paused when the "StuffInSpace" window is backgrounded. The side effect of this, is that when the SatCrunchWorker is unpaused there will be a time drift.
We should add logic to address this issues. Likely, basing this on the time delta between pause and unpaused time.
The text was updated successfully, but these errors were encountered:
I don't think you need to figure out the time delta, just get the current time and resync with the worker.
If the delta between drawing frames is more than 500ms (definitely more elegant solutions later) then resync times. If the main thread realizes it hasn't been drawing frames then it passes the current time to the worker. When received by the worker it immediately stops the current propagation loop, syncs its current time, and then restarts the propagation. If you are only interested in running real-time, then you can just pass a boolean and have the worker make a new date object.
It is important that it stops propagation and restarts because there is no time element in the position/velocity buffers so they all need to be aligned to the same reference time.
In order to reduce the CPU load, the SatCrunchWorker is paused when the "StuffInSpace" window is backgrounded. The side effect of this, is that when the SatCrunchWorker is unpaused there will be a time drift.
We should add logic to address this issues. Likely, basing this on the time delta between pause and unpaused time.
The text was updated successfully, but these errors were encountered: