[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Support #RXO-990248]: [udunits] Removal of "bits" units at UNDUNITS-2

Hi Ian,

> Thanks for your reply, and for kickstarting the introduction of bits
> into UDUNITS2.
> We do really use bits, as follows.
> During Radio Occultation processing, we encode a "Product Confidence
> Data" integer, which equals
> 1*(something is true)
> +
> 2*(something else is true)
> +
> 4*(something else again is true)
> +
> and so on.  We therefore end up with something between 0 and 2^16 -1,
> from whose value we can infer the truth of all the somethings.  OK, we
> could call it "count", or "1", but "bits" seems to capture the flavour a
> lot better, I think: it warns the user to be on the lookout for a nerdy
> binary thing.

I hate to say it, but a bitmask (which is what you described) really isn't a 
good candidate for having a unit because the "value" really doesn't represent 
something that would be amenable to the usual arithmetic computations like, 
say, computing the mean (which one could do for temperature, angle, mass, 
etc.). Consequently, you're probably better off not specifying a unit at all.

I still intend to put the "bit" unit into UDUNITS-2 (assuming it won't cause 

> Thanks again,
> Ian.

Steve Emmerson

Ticket Details
Ticket ID: RXO-990248
Department: Support UDUNITS
Priority: Normal
Status: Closed