[Top][All Lists]

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

[gpsd-dev] Where to apply scaling

From: Eric S. Raymond
Subject: [gpsd-dev] Where to apply scaling
Date: Thu, 24 May 2012 16:49:35 -0400 (EDT)

Christian Gagneraud <address@hidden>:
> Currently in driver_ais.c an offset is applied for certain message
> fields (IMO 236 and IMO289 met/hydro message), and a scaling is done
> conditionally in gpsd_json.c.
> I think it would be better to apply the offset and the scaling in
> gpsd_json.c. Do you have any objection on doing this?

Unfortunately, I thought of an objection. The shm interface.

Because some clients will be reading the AIS report structures
directly from the daemon via shared memory, all *lossless* preparation
of the data (in particular, offset applications) should be done in the
device driver.  This will reduce the number of magic constants that 
client software has to know about.

Lossy transformations (scaling) should continue to be done optionally 
in gpsd_json.c.  
                <a href="";>Eric S. Raymond</a>

The real point of audits is to instill fear, not to extract revenue;
the IRS aims at winning through intimidation and (thereby) getting
maximum voluntary compliance
        -- Paul Strassel, former IRS Headquarters Agent Wall St. Journal 1980

reply via email to

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