nasa / trick

Trick Simulation Environment. Trick provides a common set of simulation capabilities and utilities to build simulations automatically.
Other
32 stars 16 forks source link

Repurpose the "Sim/Real Time" field on the sim control panel #1626 #1627

Closed alexlin0 closed 7 months ago

alexlin0 commented 8 months ago

Added calculations in the realtime sync monitor job to calculate the average sim/realtime ratio for the past 100 frames. This is saved to a new variable, actual_run_ratio. Changed the sim control panel to display the actual_run_ratio value.

coveralls commented 8 months ago

Coverage Status

coverage: 55.894% (+0.08%) from 55.818% when pulling 4b34003ddebdc548bcf9e19f764448cf57cf9b93 on 1626-sim-real-time-field into dafddff0a10e7d66e3939f9d47fe2dc4a0b11126 on master.

hchen99 commented 8 months ago

Thanks, Alex! We're saving this for the first thing after new year.

hchen99 commented 7 months ago

Just to verify:

What do you think if changing to only show rt_clock_ratio in Sim / Real Time Field especially for reflecting what is changed by user using Throttle when sim is not started?

alexlin0 commented 7 months ago

I believe that nobody uses rt_clock_ratio, sims are either run at 1.0x realtime or they are run non-realtime as fast as possible. It is a feature that could be deleted and no one would miss it.

I assume we want to keep the feature. In this case, I would not suggest using the field for two different values. If we want to show the actual sim/real ratio and the rt_clock_ratio set by the user, then we should have 2 fields on the sim control panel. I did think about this, but I was lazy to add another field and determined using the unused field was easier.

hchen99 commented 7 months ago

I believe that nobody uses rt_clock_ratio, sims are either run at 1.0x realtime or they are run non-realtime as fast as possible. It is a feature that could be deleted and no one would miss it.

I assume we want to keep the feature. In this case, I would not suggest using the field for two different values. If we want to show the actual sim/real ratio and the rt_clock_ratio set by the user, then we should have 2 fields on the sim control panel. I did think about this, but I was lazy to add another field and determined using the unused field was easier.

Thanks for your inputs. Ok, made sense now. If that's the case, probably no need to add another field. Instead, probably we can update the Throttle dialog to keep what was selected previously so user has a place to check if they know where to change the ratio once this PR is merged.