modelon-community / fmi-library

C library for importing FMUs
Other
113 stars 34 forks source link

FMI Api is giving Round off value #145

Open SudeepGhoshIN opened 4 hours ago

SudeepGhoshIN commented 4 hours ago

I am using bellow code to get real value from model description , it is returning round off value. like 90547.9884 --> 90547.99 I want actual value without round off

fmi2_import_real_variable_t* rv = fmi2_import_get_variable_as_real(var);                    
    fmi2_real_t StartValue = fmi2_import_get_real_variable_start(rv); 
PeterMeisrimelModelon commented 3 hours ago

Hi,

how are you printing it? You might need some extra formatting specifiers to get all decimals.

/Peter