|Subject:||Re: [gpsd-dev] Scaled AIS JSON messages...|
|Date:||Wed, 22 Aug 2012 15:27:20 +0200|
i hopefully scale them from the nmea2000 to the AIS scale.
The conversion from double to int should be a job of the compiler.
The JSON output of gpsd seems to be correct, and i have no idea at the moment, how to handle the AIS special values.
But i push this version as soon as possible, so that we have a base for a discussion.
I think, the nmea2000 people had to decide, to be consistent with their own scale factors in the other messages, or switch for AIS to the AIS factors.
Von: Christian Gagneraud <address@hidden>
Betreff: Re: [gpsd-dev] Scaled AIS JSON messages...
Datum: Wed, 22 Aug 2012 11:43:42 +0200
On 22/08/12 10:21, Christian Gagneraud wrote:
> On 22/08/12 09:13, address@hidden wrote:
> Hi Reinhard,
>> as much as i understand, the course in the gpsd ais type 1 message is
>> scaled by ten, but the heading is not.
>> During test with the nmea2000 ais decoder, i see no difference for
>> the course value, it is scaled by ten regardless if scaled is true a
> You are right, in scaled mode the course is not scaled. This is a
> mistake in gpsd_json.c.
>> Should i insert the course value also only as a number between 0 and
> No, you should fill the structure with the raw course value (scaled by
I just had a quick look at your code in driver_nmea.c, and I noticed
that you're filling the AIS structure with double values. This is wrong
you should fill the structure with raw (unscaled, integer) values.
If you need help, let me know, i'll be happy to contribute.
>> Thank you
Embedded systems engineer.
1 Harbour road
Tel: + 353 (0) 1 236 5990
|[Prev in Thread]||Current Thread||[Next in Thread]|