Getting AIS into Global Mapper

marky9074marky9074 Global Mapper UserPosts: 10
I thought I would share my solution for getting AIS into Global Mapper. Firstly some research was needed to find examples of the sentences that GM was supposed to support. I could only find $PRAVE and $PCDLI ($GPWGT does not see to exist, and I didn't readily find information on $HID sentences). Waypoint NMEA $GPWPL would require more formatting that I was prepared to do.

Example $PRAVE Sentence:
$PRAVE,0001,0001,3308.9051,-11713.1164,195348,1,10,168,31,13.3,3,-83,0,0,,*66

Example $PCDLI Sentence:
$PCDLI,1016,20120406,184012.50,29.8043519295,-95.56066857583,0.9,312.5,-0.5,1.5,-1.2, 2,8,1.1,9,005.5,309.1,0133,20.5,13.2*7F<cr><lf>

So, I had a standard AIS 38400 baud serial connection into the workstation. I then download and configured AISDecoder (http://www.arundale.com/docs/ais/ais_decoder.html). This took some work, as the string needs to be 'tagged' and reformatted. In the end I had the format set as 'GIS filtered' and 'Tagged'. Within the 'Output Tags' I selected the following:

lon_1_2
lat_1_2
mmsi_0_2
vesselname_0_2
receivedtime_0_2
heading_1_2
speed_1_2
course_1_2

To use the tagged format, one has to create a 'Tag Template File'. This was a lot of trial and error, but eventually I worked out the nomenclature and created a formatted string to output, saved as PCDLI.xml, then loaded into AISDecoder:

$PCDLI,[mmsi_0_2],,,[lat_1_2],[lon_1_2],,[heading_1_2],,,,,,,,,[course_1_2],,,

As a test I output to file, and tested the output using the GM 'Read From File (NMEA Format Only)' option. I was very surprised to find that this worked (even though I had seemingly broken the format description by placing the MMSI number in the ID field, which documentation implied was only four characters long). Also worthy of note, is that GM seemingly ignores missing fields, so it is not strict compliance (thankfully!).

Following this, I installed NMEARouter (http://www.arundale.com/docs/ais/nmearouter.html) and created a virtual serial port (configure/VCP/create), then configured AISDecoder to output to UDP (127.0.0.1 port 39421) and in turn configured a UDP input connection within NMEARouter (configure/connection/new). The next bit was a little trial and error.

I had to create a new connection, using the virtual COM port. I could see lots of new ports, but the one that worked was labelled CNCA <-> COM5 (I already had a physical COM4 from a USB to serial adapter). This 'Connection' needs to be set to Input/Output. Then within NMEARouter you need to configure a route (configure/route/new) which is literally pointing the input to the desired output.

All that remains is to hit 'Start' on both AISDecoder & NMEARouter, then configure GM to pick up on the virtual COM port (before this I tested in PuTTy just to make sure I was getting data incoming on the virtual serial port). To my surprise it all worked!!


Tagged:

Comments

  • marky9074marky9074 Global Mapper User Posts: 10
    And here is one of my 'Options' page within AISDecoder:


  • marky9074marky9074 Global Mapper User Posts: 10
    I have now edited the main template file, because I believe GM is decoding the wrong field for COG (so have removed it). GM seems to think that field is SOG (field 17).

    $PCDLI,[mmsi_0_2],,,[lat_1_2],[lon_1_2],,[heading_1_2],,,,,,,,,,,,
Sign In or Register to comment.