[Nut-upsdev] zero-prepended values - why oh why?

Niklas Edmundsson nikke at acc.umu.se
Tue Feb 28 22:52:33 UTC 2006


On Tue, 28 Feb 2006, Arjen de Korte wrote:

>> 0.7% of 120V is 0.84V, so showing a second decimal makes little sense.
>
> By your standards, Fluke might have gotten away with a 3 1/2 digit
> display, right? Now I wonder why they put in that extra digit... ;-)

That might be because it has much better accuracy when measuring DC :)

<snip>

> Even if the absolute value may be off by more than 2%, the relative values
> measured will still tell something. More often than not it is trends that
> matter and not the absolute value.

Ah, that's true. I seriously doubt that you'll be able to draw any 
conclusions from second-decimal-flapping though :)

<snap>

> I don't think we (as NUT developers) should worry about that and interpret
> whether the precision of a measured value is reasonable or not. If the UPS
> is outputting it, the driver should make that value available verbatim.
> Whether or not to display it like that is open to debate, but I really
> think we should stay away from making assumptions about the credibility of
> values received from the UPS. I already envision the questions we'll
> receive on ups-users from people complaining that the bundled Windows
> software with their UPS will display the mains voltage with milliVolt
> resolution, while NUT will only display Volts. Even though (and I agree
> fully with you here) the accuracy will be terrible and most of the time
> not relevant for operation anyway.

True. I was hoping to unify the output so upsstats et al would look 
reasonably coherent, now it tends to be "this UPS shows integers and 
that UPS gives me two decimals". This is fixable by making the clients 
parse the values where applicable though, and if people feel like 
that's the way to go I'll buy that.

However, getting rid of the 0-prepending-nonsense is a big step 
forward. Now let's just hope that people hacking away at that item 
test the drivers before committing so we don't end up with a bunch of 
drivers outputting nonsense because of mismatching int/float 
variables/format-strings ;)


/Nikke - who really should be sleeping instead ;)
-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  Niklas Edmundsson, Admin @ {acc,hpc2n}.umu.se      |     nikke at acc.umu.se
---------------------------------------------------------------------------
  -= Bajorans don't like it when you yank their chains =-
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=



More information about the Nut-upsdev mailing list