opensim-gui icon indicating copy to clipboard operation
opensim-gui copied to clipboard

Preserve rates as ints rather than doubles to make header parsing robust

Open aymanhab opened this issue 2 years ago • 4 comments

Fixes issue #1344

Brief summary of changes

Write frameRate, cameraRate etc. as ints to avoid confusing the parser built into MarkerData class (GUI doesn't have its own parser). Ideally we switch to the TimeSeriesTable to avoid duplicity but those need work to be usable by the GUI.

Testing I've completed

Tested workflow suggested in issue and it all worked.

CHANGELOG.md (choose one)

  • no need to update because...
  • updated...

aymanhab avatar Apr 21 '22 21:04 aymanhab

Is it possible that any of these values can take non-integer values? Or do they get converted to ints when passed to the MarkerData class?

Otherwise, LGTM.

nickbianco avatar Apr 22 '22 17:04 nickbianco

@nickbianco In practice I've never seen rates that are non-ints, the MarkerData class uses doubles internally but reads/prints using custom simmIO class that's likely not robust and the long term plan should be to retire it altogether.

aymanhab avatar Apr 22 '22 17:04 aymanhab

Okay, sounds good. Seems like this a find stop-gap solution until replace the simmIO class later.

nickbianco avatar Apr 22 '22 18:04 nickbianco

Okay, sounds good. Seems like this a find stop-gap solution until replace the simmIO class later.

Agreed, will wait on more testing before merging. Thanks again @nickbianco

aymanhab avatar Apr 22 '22 18:04 aymanhab