gpsd-dev
[Top][All Lists]
Advanced

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

Re: [gpsd-dev] Where to apply scaling


From: Eric S. Raymond
Subject: Re: [gpsd-dev] Where to apply scaling
Date: Tue, 29 May 2012 05:35:05 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

Christian Gagneraud <address@hidden>:
> Interpreting the AIS structures requires already lot of
> foreknowledge, there's plenty of enum values and magic constant
> (data not available).
> Enums are not part of the API, but the NOT_AVAILABLE are (def'ed in gps.h).
> 
> What about moving these 6 offset constants in gps.h beside their
> XXX_NOT_AVAILABLE? (FID31 needs only 1 constant not 5. I have one
> commit here for FID31 fixes). And while we are here, why not adding
> the scaling factors as well? This way, clients will have all the
> information to go from raw to interpreted data.
> 
> Another consequence of doing the offset in the driver is that the
> gpsd' version of the NOT_AVAILABLE values are different from the IMO
> standards (and from the ones documented in AIVDM.txt)

Hm. Your last paragraph makes a good point - that is confusing.  

I guess you're right and all the scaling ought to be done in one place,
with the scaling constants visible in gps.h.
-- 
                <a href="http://www.catb.org/~esr/";>Eric S. Raymond</a>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]