[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gpsd-users
Subject:    Re: [gpsd-users] AIVDM sentence buffering
From:       Jonathan Fewtrell <jfewtr () gmail ! com>
Date:       2012-02-28 8:23:57
Message-ID: 6092F719-B6B8-4103-A205-DEB59ABEB314 () gmail ! com
[Download RAW message or body]

Thanks for this.

The situation I have in mind is one where signals are being received from numerous \
vessels at the same time. In such a case, there could very well be more than one \
signal of a given type (particularly types 1/2/3 and 5) received within 2 seconds. My \
concern is that (say) a type 1 signal from Vessel B could shadow a type 1 signal from \
Vessel A received a fraction of a second earlier. Furthermore, if their transponders \
are reliably sending signals at a steady frequency, this shadowing could continue for \
some time, meaning that Vessel A might never be detected.

Is this a valid concern, or have I misunderstood?

For info, I am testing in Hong Kong. I consume reports every 1.5s and I regularly see \
more than 100 simultaneous live targets. Admittedly this is an extreme case, HK being \
perhaps the busiest port in the world, but arguably this is when AIS ought to be most \
valuable.


On 26 Feb 2012, at 15:24, Eric S. Raymond wrote:

> Jonathan Fewtrell <jfewtr@gmail.com>:
> > Reading the documentation (http://catb.org/gpsd/client-howto.html
> > and http://catb.org/gpsd/libgps.html), I am worried that if a read
> > picks up multiple AIVDM sentences only the most recent one will be
> > reflected in the ais_t struct.
> 
> Yes, this is a potential failure mode.  To avoid it, just consume 
> reports from the demon more often than once per 2 seconds.  That
> way the read buffer will never contain both a message and a later
> message of the same type that steps on it.
> 
> I'll add this advice to the client HOWTO.
> -- 
> 		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic