Round gas depth properly

The D in MOD, EAD, END, and EADD stands for "depth" and
as such these should be mm in int rather than double.

The intermediate fn2 and fhe2, however, as intermediate
value should not be rounded to an integer.

The upshot of this is a litle more numerical stability.
It should lead to more stable values in TestProfile
when run on architectures with different floating
point precision.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
This commit is contained in:
Robert C. Helling 2021-12-03 14:59:36 +01:00
parent cbe6d89767
commit 9fd531dcc5
7 changed files with 31237 additions and 31232 deletions

View file

@ -77,10 +77,10 @@ static void put_pd(struct membuffer *b, const struct plot_info *pi, int idx)
put_int(b, entry->o2sensor[2].mbar);
put_int(b, entry->o2setpoint.mbar);
put_int(b, entry->scr_OC_pO2.mbar);
put_double(b, entry->mod);
put_double(b, entry->ead);
put_double(b, entry->end);
put_double(b, entry->eadd);
put_int(b, entry->mod);
put_int(b, entry->ead);
put_int(b, entry->end);
put_int(b, entry->eadd);
switch (entry->velocity) {
case STABLE:
put_csv_string(b, "STABLE");