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: Christian Gagneraud
Subject: Re: [gpsd-dev] Where to apply scaling
Date: Tue, 29 May 2012 22:16:53 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20120421 Thunderbird/12.0

On 29/05/12 10:35, Eric S. Raymond wrote:
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.

OK, will do.

Chris


--
Christian Gagneraud,
Embedded systems engineer.
Techworks Marine
1 Harbour road
Dun Laoghaire
Co. Dublin
Ireland
Tel: + 353 (0) 1 236 5990
Web: http://www.techworks.ie/



reply via email to

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