Planner: print icd information at 0.1 resolution

The gas fractions (in %) are now printed at a resolution of 0.1%
and not at 0.01% as previously.

The string in the info box that provides icd data is reformatted
so that the info-box is as narrow as possible.

Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
This commit is contained in:
Willem Ferguson 2018-01-24 21:50:35 +02:00 committed by Jan Mulder
parent 36cfab46bd
commit b9ac89574e
2 changed files with 9 additions and 10 deletions

View file

@ -178,11 +178,11 @@ void DiveEventItem::setupToolTipString(struct gasmix *lastgasmix)
name += tr(" (cyl. %1)").arg(internalEvent->gas.index + 1);
bool icd = isobaric_counterdiffusion(lastgasmix, mix, &icd_data);
if (icd_data.dHe < 0) {
put_format(&mb, "\n%s: %s=%+.3g%% %s=%+.3g%%%s%+.3g%%",
put_format(&mb, "\n%s %s:%+.3g%% %s:%+.3g%%%s%+.3g%%",
tr("ICD").toUtf8().constData(),
tr("ΔHe").toUtf8().constData(), icd_data.dHe / 10.0,
tr("ΔN₂").toUtf8().constData(), icd_data.dN2 / 10.0,
icd ? ">" : "<", -icd_data.dHe / 50.0);
icd ? ">" : "<", lrint(-icd_data.dHe / 5.0) / 10.0);
name += QString::fromUtf8(mb.buffer, mb.len);
}
*lastgasmix = *mix;