From 2c020d672b5c064412afec471672d05322611618 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Mon, 21 Dec 2009 15:16:44 +0000 Subject: Watch AIS message types 12 and 14. --- xgps | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'xgps') diff --git a/xgps b/xgps index 6c46d5de..5d3aff34 100755 --- a/xgps +++ b/xgps @@ -244,6 +244,21 @@ class AISView: if self.enter(ais, ais.shipname): self.store.prepend( (ais.type, ais.shipname, ais.callsign, ais.destination, "", ais.shiptype)) + elif ais.type == 12: + sender = ais.mmsi + if sender in self.named: + sender = self.named[sender].shipname + recipient = ais.dest_mmsi + if recipient in self.named: + recipient = self.named[recipient].shipname + self.store.prepend( + (ais.type, sender, "", recipient, "", ais.text)) + elif ais.type == 14: + sender = ais.mmsi + if sender in self.named: + sender = self.named[sender].shipname + self.store.prepend( + (ais.type, sender, "", "(broadcast)", "", ais.text)) elif ais.type in (19, 24): if self.enter(ais, ais.shipname): self.store.prepend( -- cgit v1.2.1