- Joined
- Oct 26, 2011
- Messages
- 1,226
- Reaction score
- 591
- Points
- 128
Next to this potential bug in Orbiter 2016 there is another problem with the implementation of accelerometers in NASSP.
Part of the acceleration calculation is taking the global velocity each timestep and use the difference to the previous timestep to get the global velocity difference per second.
First Timestep:
All subsequent timesteps:
This is only the few lines of code concerning the velocity. The problem is "dvel" seems to have a kind of oscillation in Orbiter 2016. It's not a steady change as in Orbiter 2010 and when the global velocity is changing a lot, like in Earth orbit, then this oscillation is severe enough to cause us some issues. Somewhere in cislunar space the global velocity doesn't change all that much per timestep and the effect is much weaker.
The code above is called in clbkPostStep and the "simdt" is from that function. Is simdt maybe not the exact time difference between the two velocities? In that case an oscillating framerate between e.g. 59.9 fps and 60.1 fps could already cause the issues.
The overall acceleration measurement seems to be fine. So the velocity change during a time period of let's say a minute is not really affected by the oscillation. But a few spacecraft systems have problems when there isn't a steadily measured acceleration.
Part of the acceleration calculation is taking the global velocity each timestep and use the difference to the previous timestep to get the global velocity difference per second.
First Timestep:
Code:
sat->GetGlobalVel(vel);
lastGlobalVel = vel;
All subsequent timesteps:
Code:
sat->GetGlobalVel(vel);
VECTOR3 dvel = (vel - lastGlobalVel) / simdt;
lastGlobalVel = vel;
This is only the few lines of code concerning the velocity. The problem is "dvel" seems to have a kind of oscillation in Orbiter 2016. It's not a steady change as in Orbiter 2010 and when the global velocity is changing a lot, like in Earth orbit, then this oscillation is severe enough to cause us some issues. Somewhere in cislunar space the global velocity doesn't change all that much per timestep and the effect is much weaker.
The code above is called in clbkPostStep and the "simdt" is from that function. Is simdt maybe not the exact time difference between the two velocities? In that case an oscillating framerate between e.g. 59.9 fps and 60.1 fps could already cause the issues.
The overall acceleration measurement seems to be fine. So the velocity change during a time period of let's say a minute is not really affected by the oscillation. But a few spacecraft systems have problems when there isn't a steadily measured acceleration.