Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OMEdit export variables : time formatting precision inadequate #9664

Closed
Natopsi opened this issue Nov 6, 2022 · 0 comments · Fixed by #9667
Closed

OMEdit export variables : time formatting precision inadequate #9664

Natopsi opened this issue Nov 6, 2022 · 0 comments · Fixed by #9667
Assignees
Labels
COMP/GUI/OMEdit Issue and pull request related to OMEdit
Milestone

Comments

@Natopsi
Copy link

Natopsi commented Nov 6, 2022

Description

When exporting data as CSV from OMEdit GUI, time column format have a format reduced to 7 or 8 significant digits single precision thus doesn't allowing proper exploitation of data with fine time steps.
The data columns have a proper double precision compatible formatting.

Steps to Reproduce

Example:
Run Modelica.Electrical.Analog.Examples.Rectifier with equidistant time grid unchecked and CSV as output format
Export any variable as CSV with Export Variables from GUI

Lines 188 and 189 of Rectifier_res.csv generated by OM Simulator starts with:
0.001492868956501593,
0.001492869025532345,

Lines 188 and 189 of the exported csv starts with (I included the first exported variable to show the different precision)
0.00149287,517.3252174227919
0.00149287,517.3252151192146

Expected Behavior

Time column of a CSV export from OMEdit should have a formatting compatible with double precision data.

Screenshots

Version and OS

  • OpenModelica Version: 1.19.2 (64 bit)
  • OS: Windows 10, 64 bit
  • Modelica libraries 4.0.0

Additional Context

Looking at source code, in OMEdit/OMEditLIB/Plotting/PlotWindowContainer.cpp
Time is formatted with with QString::number(); while StringHandler::number() is used for the variables.
Maybe using StringHandler::number() can be sufficient.

@adeas31 adeas31 self-assigned this Nov 7, 2022
@adeas31 adeas31 added the COMP/GUI/OMEdit Issue and pull request related to OMEdit label Nov 7, 2022
adeas31 added a commit to adeas31/OpenModelica that referenced this issue Nov 7, 2022
@casella casella added this to the 1.20.0 milestone Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
COMP/GUI/OMEdit Issue and pull request related to OMEdit
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants