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

Output precision for different tools and files

Open carmichaelong opened this issue 1 year ago • 2 comments

  1. Define output precision needs for different tools and files
  2. Document what the goal is for each tool and file (either in a unified file or at the top of different files). For instance, perhaps states files can be full precision to satisfy a need for exact reproducibility so that you can continue an optimization.

carmichaelong avatar Dec 13 '23 00:12 carmichaelong

Hi, I was about to suggest a new feature in this regard. It would be great if you let users to set the output precision when writing files with STOFileAdapter and TRCFileAdapter. Compared to Storage output which has fixed 8-digit decimals, STOFileAdapter output may have up to 19 decimal digits. For example, a new argument like setPrecision in the write methods with a default value of -1, which means full precision.

But, it's great that STOFileAdapter ignores trailing zeros unlike Storage.

This feature would help reduce the size of the written files.

Thank you.

mrrezaie avatar Dec 14 '23 08:12 mrrezaie

@fcanderson Please confirm if this issue can be closed per your simbody changes. Thank you

aymanhab avatar May 02 '24 21:05 aymanhab