Monterey Bay Aquarium Research Institute
GIS at MBARI

ArcNav Real-Time Extension (V1.0) for ArcView (V3.0a)

Users Guide

By Gerry Hatcher
Monterey Bay Aquarium Research Institute (MBARI)
October 1997

Contents

Introduction

The ArcView GIS  from Environmental Systems Research Institute (ESRI) Inc. provides a powerful data analysis, editing, and display environment for virtually all types of data the oceanographer is liable to use. At the Monterey Bay Aquarium Research Institute (MBARI) we've enhanced this already rich environment by creating an extension to ArcView which facilitates its use at sea during an oceanographic cruise.

 This extension to ArcView was developed to provide the ocean scientist with tool for using data while at sea in real-time.  The extension called “ArcNav” can track  multiple objects (the ship, an ROV, drifters, etc.) provided that the vehicle’s position information is available in digital NMEA format via a serial RS232 connection. These vehicles can be tracked in the context existing data layers providing a frame of reference  otherwise unavailable. Events such as sample collections can be easily logged and simple point and click operations are used to make measurements and locate features.

 

What you should already know

This document expects you to already be comfortable with the ArcView environment. If are new to ArcView then you should read through the books “Introducing ArcView” and “Using ArcView GIS.” that came with your purchase of ArcView. The tutorial in “Using ArcView GIS” is definitely worth going through.

 

If you are installing the system then you will be required to hook up the RS232 data feeds to the serial port(s) of the computer you are using and to ensure that the proper NMEA strings are being sent. A separate serial port is needed for each tracked object or “vehicle”.

 

How it all works

Point Lobos Setup

On the Point Lobos, navigation data are collected on a PC with the program WinFrog. The data are filtered, logged and then sent via RS232 serial ports to the PC running NMEA2AV.exe. There is one serial line for the ship and one for the ROV.  The program NMEA2AV.exe is a MS Windows program which reads the NMEA data strings from the serial port, temporarily stores the data in memory and then passes the data to the program ArcView for use with the ArcNav extension.

Generic Serial Data Transfer Setup

Navigation data in NMEA183 standard format such as that provided by most off the shelf GPS receivers can be used as input for the real-time GIS system by using the same PC windows program called NMEA2AV.exe.  The main limitation of the program NMEA2AV is that you can only have as many tracked objects as you have serial ports on your PC. The data streams from separate vehicles cannot be “multiplexed” on a single COM port.  This type of situation can be provided for only with custom software modifications. 

 

System Diagram

 

   

 The diagram above illustrates the interrelation of the various components of the system. Starting in the lower right and moving in clockwise order we start with the data source(s) which could be a hand held GPS, a PC running a program that supplies NMEA data, or any navigation device that can supply one or more of the supported NMEA position strings listed in appendix 1 using an RS232 serial data connection.

 The data stream is connected to an available COM port on the PC which will be running the program NMEA2AV (“PC One” in the diagram). This program is configured by the user to associate each separate COM port with one (and only  one)  vehicle.  NMEA2AV reads the data from the COM port(s), temporarily stores the data between updates, and makes it available to the network (and to the PC on which it is running called the “localhost”).

ArcView gets the real-time tracking capability when the “ArcNav” extension is loaded. This extension contains a number of Avenue scripts and requires dynamic link library (DLL) called “netnav.dll”. It is through netnav.dll that the data is transferred from NMEA2AV to ArcView.  Netnav.dll uses the TCP/IP network to communicate with NMEA2AV which means that even if you are not running on a network, the PC must be configured for one. If a network is not actually present then both NMEA2AV and ArcView must be running on the same PC (shown as PC One ) and the two programs will just communicate through the network adress “localhost” as mentioned above.

 The network data transfer method allows multiple PCs on the network to track the same real time data stream from only one running copy of NMEA2AV on the local area network. This type of remote data access is indicated by “PC Two” in the diagram. “PC Two” would communicate to the NMEA2AV program running on “PC One” by setting it’s navigation server name to the network name of  “PC One” for example a name something like “navpc.shipnet.edu”.  This is set through the “Set Navigation Server Name” item in the “Navigation” pulldown menu (See “New Menu Items, Buttons, Tools and Popups”).

 

“Helper” programs

NMEA2AV

NMEA2AV.exe is a Windows program which can read data from many types of navigation devices connected to directly to a serial port(s) and provide those data to ArcView on the same system or to others on the ship’s network. In order for the data to be readable it must be provided in standard NMEA183 sentences. Currently supported sentences (see appendix for description) are: DBS, GLL, HDT, RMC.

 This program can read multiple serial ports. Each tracked object can only be associated with data being provided on a single serial port but multiple NMEA data strings can be sent (e.g. one for heading, one for position, and one for depth) on each port as long as they arrive sequentially and don’t overwrite each other. This is exactly the type of data stream which is provided by the program WinFrog when an output NMEA device is created and “attached” to a Winfrog “vehicle”, please see the WinFrog manual for details.

 NMEA2AV.exe is a “multiple document interface” (MDI) windows program which has main application “Parent” window and zero or more “child” windows contained within it (ArcView is also an MDI program). Each child window displays the data from a single serial port. The controls on the child windows are used to set the vehicle name and communication parameters (baud rate, data bits, parity and stop bits) for the COM port associated with that child window. A COM port can only be associated with one child window.

 

Screen Shot of NMEA2AV.exe with child windows resized and tiled.

 

 In the above screen shot the  controls are used to set the vehicle name. The user types the name and then clicks the “SetName” button to make the change take effect.  This name is critically important for the successful transfer of data to ArcView. In the script ArcNav.Startup (part of the ArcNav extention) vehicle’s parameters are defined such as its dimensions and name. The name is use by ArcView to request the data and by NMEA2AV to determine what data to pass back to the requester therefore the name (case insensitive) must be the same in both places.

If the user would like to write the NMEA data strings to the hard drive as they are processed they should check the  checkbox. Data will be saved in a file located in the program’s working directory the file will be named by combining the vehicle name with the current day and have the extension “gps” (i.e. SHIP10Nov1997.gps). In this way each tracked vehicle’s data will be saved in a separate file and each day a new file will be created.

  The controls  are used to set the COM port settings and view the current settings. In this case the window is associated with COM1 at 4800 baud, No parity, 8 data bits and 1 stop bit (the default). If changes need to be made the “COM Settings” button is clicked and the dialog shown below appears.

 

The check boxes and pull down menus can be used to set the COM port parameters to match those of the input data source and then the OK button should be pressed. The new settings will then be displayed in the text window of the COM Settings controls.

 

To activate monitoring of the COM port the  button should be clicked. The

button can be clicked to stop monitoring the port in order to “gracefully” disconnect data inputs.

 

The area of the child window shown below will continually update as new data arrives and provides a visual check that the data stream is active and that the data are correct.

 

 

This program handles network or local requests from ArcView for the data in a separate thread process which runs in the background invisible to the user. When a request arrives the vehicle name is checked and the latest data which have been collected for that vehicle are echoed back to the requesting program. Even if the  button has been pressed or no new data are arriving on the serial port  a request for data is answered with whatever data were last saved in the programs buffer. Therefore ArcView will not know if the data it receives is outdated or stalled. It is up to the operator to look at the child windows of the NMEA2AV program occasionally to ensure data is being updated. This is not really a problem because when you are using the system it becomes apparent very quickly when the vehicle icons stop moving and then a quick glance to the NMEA2AV program will confirm the situation.

 

NetNav.dll (libNetNav.sl)

NetNav.dll and it’s UNIX equivalent libNetNav.sl are a dynamic link library (DLL) and a shared library respectively. The both provide exactly the same capability but on different platforms (MS Windows and UNIX). These libraries enable ArcView to call a functions which queries NMEA2AV (described above) for the latest navigation data and returns those data to ArcView.

 

New Menu Items, Buttons, Tools and Popups

Menu Items

 The Navigation pull down menu provides the means to configure and  save options specific to local computer on which ArcView with the ArcNav extension will be run. The Navigation menu is added when the extension is loaded and is the only menu effected by the extension.

 Set Centering Vehicle - The Centering Vehicle is used for two purposes. First to enable the real-time tracking views to automatically follow any tracked vehicle. If the centering vehicle moves near the edge of the current view the view is automatically “panned” to center on the vehicle. The second use of the centering vehicle is to determine where “mark points” will be drawn on the view. When  a user clicks the mark button (see description below) all of the current navigation from each tracked vehicle is collected immediately and stored in a shape file. The icon indicating the mark on the screen is placed at the location of the Centering vehicle.  The centering vehicle can also be set to NONE in which case the view can be freely panned and zoomed and it will not automatically re-center.  Note however that if the centering vehicle is set to NONE and the user clicks the mark button the data for each vehicle will be saved in the shape file but no icon will be drawn on the view.

Set Redraw Delay - This sets the time between screen updates of real time vehicle position and orientation. The default is 5 seconds between updates. The update rate can be set as fast once per second but this will make it difficult on slower computers to interact with the program. This is because the program will be spending all of its time redrawing the screen and mouse clicks will be missed.  In many cases navigation data from the vehicles will be coming in at a much slower rate (maybe once every 15 sec) so it makes sense to slow down the update rate to reduce the load on the computer. 

lat/lon grid at Specified Values -  This allows the user to create a Lat/Lon grid overlay on any view at a specific grid spacing interval.  If the view is zoomed or panned the grid must be recreated to cover the new view extent.

Run Startup - This runs the script ArcNav.Startup which sets environment variables, specifies directory paths, sets up tracked vehicles etc. (see appendix).  ArcNav.Startup will check for the existence of  $HOME/arcnav.default.ave and if so run it instead. This is how the user would make changes to the arcnav.default.ave file take effect in the currently running session.

Add Comments With Marks/ (No Comments With Marks) - When either the “Mark” button or “Mouse Mark” tool are used  (see tools and buttons sections below) the user can optionally add a comment to the shape file. If multiple points are being taken just to create a course ship track for example the user may not want to include a comment with every mark (or fix) therefore this option can be turned off or on as needed. The pull down menu item text changes to reflect what will happen when that item is chosen (not what the current state is). For example if the user selects “Add Comments With Marks” then each time a mark function is chosen a message box will pop up for the user to enter there comment. If the user opens the navigation menu they will notice that the menu item text has changed to “No Comments with Marks” indicating the state which the system will enter if that item is selected.

Set Realtime tracking Views - One or more views can be used for real time tracking. This menu item finds all the view windows in the project and allows the user to select among them. This enables real time tracking to be done simultaneously on separate views displaying different data. Each additional view requires additional CPU time so there is a trade off between system performance and the number of real-time plotting views.

Set UTM zone - The Mouse location picker tool (see below) and several other scripts in the extension need to use the Universal Transverse Mercator (UTM) projection to make calculations. These calculations will only be correct if the user has set the proper UTM zone for there area of operation. The default is Zone 10 which is correct for Monterey California. If you will be operating in another area please use this menu item. A popup window will appear and present the user with a list of the zones and there geographic extent.

Set Data Directory - When the user clicks the “Mark” button or uses the “Mouse Mark” tool a shape file to store the information is created.  This file must be stored to disk somewhere and this option lets you specify that directory. A name with some significance is recommended (perhaps the name of the science project, or cruise).

Set Path to NetNav.dll - NetNav.dll or its UNIX Equivalent LibNetNav.dll is used to communicate via the local area network with the program providing the real time navigation “NMEA2AV”. This program is critical path for the real time data transfer therefore care should be taken when using this menu item.

Set Navigation Server Name - As described in the “Helper Programs” section of this document the ArcNav extension gets its real time data from a server program “ NMEA2AV” which is running either locally or somewhere on the network. The “Navigation Server Name” is the network name of the computer running the server program. If it is on the local machine than “localhost” without the quotes can be used otherwise it should be a network name such as “pl-mnav.mbari.org” again without the quotes.

Use Heading for Icon Rotation (Use TMG for Icon Rotation) - If the data are available the vehicle icon on the view window will be automatically rotated to reflect the current heading or Track Made Good (TMG). The menu item text reflects the state the system will be in if that menu item is chosen.  For example if the menu item text reads “Use Heading for Icon Rotation” then currently TMG is being used and if the item is selected the system will change to use Heading to rotate the vehicles. In this version all vehicles are set equally.

Save Settings As Default - This menu item creates (or overwrites) $HOME/arcnav.default.ave (see appendix for description of this file).  The file is created based on the current system settings except for the current vehicle definitions. The specifications must be changed by hand. This will be updated in the next version.

Buttons

 Lat Lon Grid - This button will place a latitude longitude grid on the active view. The grid spacing is automatically calculated to be “reasonable” in most cases for the current map extent of the view. If a specific grid interval is desired then the user should select the Navigation pull down menu and click on “lat/lon grid at Specified Values” (described in the previous section). The grid is drawn in the currently selected graphics color and can be changed via the symbol window (see ArcView help).

/ Stop/Start Real Time Tracking - This button shows an icon indicating what will happen when the button is pressed. If the stop sign is showing then when the button is pressed the real time tracking will be stopped, and the icon will change to the green triangle. Tracking will not stop immediately it will take up to the time you’ve set for the redraw delay (default 5 seconds) see previous section. When the green triangle is pressed tracking should start right away unless the navigation server program is not running (see Helper Programs ) or if the navigation server name is set incorrectly (see “Set Navigation Server Name” in the previous section). Note: on occasion (usually when opening an existing project with the ArcNav extension previously loaded) the icon will be a stop sign indicating that the real time tracking is on but in actuality real time plotting is not on. The state of tracking can be determined by just clicking the stop/start button twice and then the button is sure to match the state of the system.

The vehicle will be drawn to scale if the geographic extent is small enough that the dimensions of the vehicle are significantly large that it would be visible. If the view is of a larger extent then the vehicle icon is drawn to a percentage of the view window’s screen size. This is percentage and the vehicles properties are set in the file “arcnav.default.ave” see the appendix for a description of this file.

If the navigation server program cannot be found or is shut down while ArcView is attempting to do real-time tracking the system will be locked up for several seconds while the server is trying to be accessed and then a message box telling of an error will be displayed. To remedy this situation the user should click the stop real time tracking (stop sign ) and when control of the program is regained (this may take several seconds) the problem with the navigation feed should be determined.

Mark Point - When this button is clicked the current navigation information from all tracked vehicles is immediately collected the active view is searched for a file named “todays-date”markpoints.shp if it is found it is appended too. If it is not found in the view or on disk in the current “data directory”  (see previous section) then it is automatically created and added to the active view. If the “Add comments with Marks” option is set (again see previous section) the a message box will popup allowing the user to type in a string (256 character limit) to be saved with that record in the shape file. If the user clicks cancel on this message box the mark is still saved but without an associated comment. An Icon will be drawn on the active view wherever the Centering Vehicle was located at the time the button was pressed. If the centering vehicle is set to “NONE” then no icon will be drawn.

Tools

   Range and Bearing - The range and bearing tool enables the user to pick to points on a view with the mouse and have the range and bearing between the points reported automatically. To use the tool first select the tool by clicking on it and then move the mouse pointer to the part of the view where the start point is located. Then click with the left mouse button and hold the button down while you move the mouse pointer to the endpoint and release the mouse button. A message box should pop up with the range and bearing reported. These results can be cut and pasted from this window by selecting them with the mouse typing <control>c to copy them to the clip board and then paste them to another application (such as notepad ) with <control> v these are standard cut and paste keys for windows programs.

Coordinate Picker - This tool allows the user to easily determine the precise coordinates of map features by first selecting this tool then moving the mouse pointer over the feature of interest and then pressing the left mouse button. A message window will pop up with the coordinates reported in several different formats. The coordinates can be cut and pasted from this window using the standard select, <control>C, <control>V windows cut and paste shortcuts.

 Note: the UTM zone must be correctly set for the UTM coordinates to be reported correctly. This is done by selecting the Navigation pull down menu and selecting “Set UTM zone” see above section on Menus for more information.

Mouse Mark Point -  This tool was created to deal with the large positional errors often encountered with subsurface acoustic navigation systems such as those used with a submersible vehicle. The observer sees a pattern of fixes (a “shot gun pattern”) and knows intuitively about where they are in the pattern but if they were to try to save a mark point by clicking on the “Mark Point” button the chances of the navigation data being good at that instance are slim. This tool allows the user to place the mouse pointer on the active view at their best guess of where the vehicle is actually located and enter the mark point by clicking the left mouse button.  This will still gather the data from each tracked vehicle and append the record to the same shape file as the Mark Point button the only difference is that it draws the icon on the view at user picked location rather than at the location of the centering vehicle.

Popups

Popups are accessed by moving the mouse pointer over a view window and then pressing the RIGHT mouse button. The ArcNav extension adds two items to the default popup menu.

 

Remove Lat/Lon Grid - This popup simple removes all the graphics associated with the latitude longitude grid from the active view.

Zoom to Vehicles - When this popup menu item is selected the locations of all tracked vehicles are determined and the smallest box which will completely surround them all is calculated. Then the extent of the active view is then panned and/or zoomed to a box which is 20% bigger than the enclosing box.

Tutorial

This tutorial will demonstrate setting up the system for two different scenarios. One is the on the Point Lobos (MBARI’s research vessel) tracking both the ship and the Remotely Operated Vehicle (ROV) Ventana. In this configuration navigation data are provided by the program Winfrog via two serial lines one for the ROV and one for the Ship. The second scenario is  a setup where the only one vehicle is tracked and the data input is from a hand held GPS.

Point Lobos Example:

This example demonstrates the setup and operation of the system as it is operated on MBARI’s research vessel the Point Lobos.

Data Stream Setup

First the serial navigation data feeds must be in place. This requires setting up two output NMEA devices on the computer running the Winfrog Navigation program (see the Winfrog manual for detailed information).  To do this create two NMEA output devices, one should be named something informative like SHIPNMEA and the other could be ROVNMEA. Then the output device for created for the ship is added to the ships list of navigation devices (accessed by clicking the “Position” button on the vehicle window) and similarly the ROV’s device added to its list . Then the devices window is used to setup which NMEA strings are sent by  the NMEA output devices. You should check at a minimum the GLL strings (see supported NMEA strings in the Appendix). The output COM port must also be set for each output device to an empty port on the Digiboard.

Now that you have the output from Winfrog configured you must run two serial lines (one for the ships data and one for the ROVs) from the Winfrog PC’s Digiboard to the PC or laptop on which you will run ArcView. These will be null modem RS232 cables. The cable supplying the ship’s information should be plugged into COM1 on the ArcView PC and the ROV’s serial cable into COM2 to agree with default values in the program NMEA2AV.  When the lines are in place it is a good idea to look at the data with a terminal program such as “Hyperterminal” on the ArcView PC to make sure it is being

transferred correctly. It should look something like a steady stream of the strings shown below (depending on what strings you’ve selected to output) with new data arriving about once / second.

 $GPHDT, 34.1,T

$GPDBT,0.0,f,  10.1,M,0.0,F

$GPGLL,3648.1427,N,12147.2170,W,085416.20,V

$GPHDT, 36.1,T

$GPDBT,0.0,f,   9.9,M,0.0,F

$GPGLL,3648.1427,N,12147.2170,W,085416.20,V

If the data transfer is determined to be working correctly, exit any programs that are accessing the COM ports on the ArcView PC and start the program NMEA2AV.exe on that same PC. This program is written to read NMEA strings through the serial (COM) ports, display it, and make the data available to ArcView. When the program starts,  two vehicles are created by default “SHIP” and “ROV”. For the Lobos these names should be left alone and the only thing that the user needs to be concerned with is whether or not the correct COM port is associated with each vehicle(COM1 for the ship and COM2 for the ROV).

The COM port settings are changed by clicking the “COM Settings” button (as described in the “Helper Programs” section of this document). When you click on the “Start Monitor” button then you should see the data fields updating on a regular basis. Not all of the data fields may be filled in if the NMEA strings being supplied don’t contain the information. On the Point Lobos we will not be logging data with this program so don’t click the “Log Data” checkbox. You are now ready to start the program ArcView.

ArcView Setup

Start the ArcView program and then load the ArcNav extension by selecting the “extensions” item in the “File” pull down menu. A dialog box should pop up in which you can click the checkbox by the “ArcNav Extension” as shown below. Then click OK and the extension should load.

 

  Now that the extension is loaded you will have a new view titled  “RealTime” and you will see the new menu and tools described in the section “New menu Items, Buttons, Tools and Popups” of this document.

Tracking

In order for tracking to take place you must have netnav.dll on the ArcView computer and the ArcView environment variable _NETNAVDLL set to the path name of this file. This should be set correctly by default but if needed it can be changed with the “Set Path to Netnav.dll” item in the “Navigation” pull down menu. You must also have the ArcView environment variable _NAVSERVER set to “localhost” (without the quotes). This also should be set correctly by default but may be checked or changed with the “Set Navigation Server Name” item in the “Navigation” pull down menu. Please note that if you make any changes and want them to be saved so that they automatically take effect each time you load the ArcNav extension then select the “Save Settings as Default” menu item from the “Naviagation” pull down menu.

 

Before tracking is started you should load the data coverages in the view which are of interest for the cruise (see the ArcView Users Guide for more information about coverages and views). Then click on the  button which is visible when a view is the active window. The green triangle will become a red octagon and within a second or two you should see a rough outline of the ship in red and the ROV in blue on the view titled “RealTime”. One of the vehicles must be specified as the “centering vehicle” this is the ship by default and can be changed by selecting the “Set Centering Vehicle” item from the “Navigation” pull down menu. See the description of this option in the “New Menu Items, Buttons, Tools and Popups” section of this document.

 

The user can zoom and pan on the RealTime view while tracking is taking place. However, if the vehicle which has been set as the centering vehicle goes out of the view then the next time the view is updated it will automatically pan so that it is centered on the vehicle’s current location. This feature can be controlled with the “Set Centering Vehicle” option in the “Navigation” pull down menu. If you set the centering vehicle to be “NONE” then the window will not automatically pan to any vehicle and the user is free to move through their data. The automatic panning will not occur if real time tracking is not taking place. Note that if the centering vehicle is set to NONE and you store a cruise event with the MARK function then you will not get an icon drawn on the screen.

 

The vehicle’s icon is drawn at a percentage of the screen size when the actual dimensions of the vehicle are very small compared with the map extent of the view and when the view is “zoomed in” to where the dimensions of the vehicle are significant compared with the view then the vehicles are drawn to scale. The vehicle sizes are set in ArcNav.Default.Ave and are in units of meters. Please see appendix 2 for more information about this file.

 

As the vehicle moves a trail of dots (“bread crumbs”) are left behind to show the recent movment history.

By default the last 60 positions are displayed. This can be changed by editing the vehicles dictionarys in ArcNav.Default.Ave.

 

There are other options and tools that can be used when tracking in real time and the user is advised to read through the “New Menu Items, Buttons, Tools and Popups” section of this document and experiment with them.

 

Of particular interest is the “mark”  button which can be used to create a “digital notebook” of cruise events. When something of interest occurs then the operator can click this button and the navigation data for the lobos and ROV are instantly grabbed, a  message box is then popped up which allows the user to type in a comment (up to 255 characters) describing the event. This information is then stored in an ArcView shapefile and a marker is drawn on the screen at the location of the centering vehicle at the moment the button was pressed.  The name of this shape file is created automatically from the date and changed with each day. The files are stored in the directory which is pointed to by the “_DATADIR” directory which can be set with the “Set Data Directory” item of the “Navigation” pull down menu.

 

A related tool is accessed by clicking . This enables the user to create cruise events which are stored in the same shapefile as the “mark” button described above but the location of the marker on the view is determined not by the location of the centering vehicle, but rather by where the user clicks the mouse. The navigation information for the ship and rov are still stored as before in separate fields of the shapefile however.

 

The mark events can be used as any other shape file and the user should work through the tutorials supplied with ArcView for ideas on how queries can be made on the data and how data can be transferred to other systems.

 

 

Shutdown

To stop real time tracking click the  button. It may take several seconds for the tracking to stop and the user should wait until a message box pops up to inform the user that the tracking has stopped as shown below.

 

The ArcView program can then be stopped and the project saved if it is likely that the same data coverages and views will be used in the future.

 

The program NMEA2AV is most gracefully exited by clicking on the “Stop Monitor” button of each vehicle window and then exiting the program with the “Quit” item of the “File” pull down menu. It should not cause problems to just exit the program if you are in a hurry however.

 

PLEASE NOTE: This version of NMEA2AV.exe does not provide the option to save the configuration if

you exit the program. So if you are using other than the default options you must reset the program each time it is restarted. This option will be added with the next version of this program.

 

Hand Held GPS Example:

This example describes the connection of the output from a GPS  to a PC running windows95 or NT with ArcView 3.0a, the ArcNav extension, and NMEA2AV installed. The GPS must be providing NMEA0183 standard “GLL” strings (see “Supported NMEA Sentences” in the appendix) for position.

 

Setup

The first step is to connect the output from the GPS to a COM port on the computer and ensure that the NMEA strings are being sent by using a terminal program such as HyperTerminal to view the data. Once you have established that the data connection to the GPS is working, shutdown any programs using the COM port and then start the program NMEA2AV. When NMEA2AV is first started it will it will appear as shown below.

 

 

By default this program is setup to track both an ROV and a surface SHIP. The first thing to do is to close the ROV windindow since we will not be using it. Next is to set the vehicle’s name if needed. This is done by changing the word “Ship” in the white edit box to something more meaningful such as the name of the ship on which you are working. The name however, should be less than 10 characters because of a limitation in field name lengths in ArcView tables.  For this example the name will be not be changed from “SHIP”.

 

Next check the COM settings at the bottom of the child window. The text box shows the current settings which are to monitor COM port 1 at 4800 baud, no parity, 8 data bits and 1 stop bit (this baud rate, parity, data bits, and stop bit are NMEA default values). If you need to change any of the settings then click the button labeled “COM settings” and a dialog box will open allowing you to make the changes.

 

 

When you’re finished click the OK button to save the changes or Cancel to close without saving.

 

 At this point the program is not yet monitoring the serial port so the data fields are either blank or 0. To start monitoring you click on the button labeled “Start Monitor”. You should soon see the data fields begin to regularly update as the data is transferred from the GPS.

 

 

If you wish to save the NMEA navigation strings to disk then check the  box and the data will automatically be written to a disk file in the directory from where the program was launched and the name of the file will be a combination of the vehicles name and the current date (i.e. SHIP11Nov1997.gps). This will automatically change with each day and each vehicle will have a separate disk file. Please note that the date used to name the file is obtained from the computers time NOT the NMEA device so please check that your systems time is set accurately. This was done to ensure a new file is created even if none of the NMEA strings being monitored contain a date field.

 

 

Start ArcView & configure

Now that your data sources are set up you are ready to start ArcView and load the real time extension “ArcNav” (see the Lobos Example above).  Once the extension is loaded open the view “RealTime” to access the “Navigation” pull down menu (described in  “New Menu Items, Buttons, Tools and Popups”). The items you must set are: The Centering Vehicle, UTM zone, Data Directory,the path to NetNav.dll, and Navigation Server Name. After setting these items for your situation then choose  “Save Settings As defaults” to have these settings take effect each time you load the exension and to create the disk file “ArcNav.Default.Ave” which you will be editing in the next step.

 

Since you will only be tracking the ship you will need to edit the ArcNav.Default.Ave (created above) as shown in example 2 of Appendix 2 to remove the ROV vehicle.  Note: if you used a vehicle name other than “Ship” above then you must change the name in the vehicles dictionary from “Ship” to your vehicles name in arcnav.default.ave. The name is not case sensitive. Please refer to the appendix now and edit the file.  Once you have made the changes to the file then you make them take effect in the currently running ArcView session by choosing “Run Startup” from the “Navigation” pull down menu. At present there is no graphical user interface for editing and creating vehicles which is why the disk file must be edited by hand.

 

PLEASE NOTE: If you select “Save Settings as Defaults” from the “Navigation” pull down menu all edits to the disk file ArcNav.Default.Ave will be overwritten and changes to your vehicles will be lost.

This will be fixed in the next release but at this time it is a good idea to create a backup copy of this file after you make any changes.

Tracking

Real time tracking is the same as in the Point Lobos example and the reader is referred to that section of this document.

 Shutdown

Shutdown is the same as in the Point Lobos example and the reader is referred to that section of this document

Appendix

1 Supported NMEA Sentences

The National Marine Electronics Association (NMEA) is a non-profit association composed of manufacturers, distributors, dealers, educational institutions, and others interested in peripheral marine electronics occupations. The organization has set standard protocols for navigation instruments one of which is NMEA-0183 and the standard used most widely today by “off the shelf” navigation electronics and is the protocol expected by the program NMEA2AV. The ASCII data are transferred serially and the strings accepted by NMEA2AV are shown below. Empty fields are acceptable but all the commas should be present. For more information about the NMEA standard see the web page http://vancouver-webpages.com/peter/.

 

DBS - Depth below surface

 

              1   2 3    4  5   6 7

               |    |  |     |   |     |  |

 $--DBS,x.x,f,x.x,M,x.x,F*hh<CR><LF>

 

 Field Number:

  1) Depth, feet

  2) f = feet

  3) Depth, meters

  4) M = meters

  5) Depth, Fathoms

  6) F = Fathoms

  7) Checksum

 

GLL - Geographic Position - Latitude/Longitude 

 

              +-----------------------------------   1) Latitude

               |       +----------------------------    2) N or S (North or South)

               |        | +--------------------------   3) Longitude

               |        | |              +---------------   4) E or W (East or West)

               |        | |               | +-------------   5) Universal Time Coordinated (UTC)

               |        | |               | |                 +- 6) Status A - Data Valid, V - Data Invalid

               |        | |               | |                  | +7) Checksum

 $--GLL,llll.ll,a,yyyyy.yy,a,hhmmss.ss,A*hh<CR><LF>

 

 

 HDT - Heading - True

 

              1    2 3

               |     | |

 $--HDT,x.x,T*hh<CR><LF>

 

 Field Number:

  1) Heading Degrees, TRUE

  2) T = True

  3) Checksum

 

  RMC - Recommended Minimum Navigation Information

 1                  2 3       4 5            6 7    8   9       10 11 12

               |                   |  |        |  |              | |      |    |         |     |  |

 $--RMC,hhmmss.ss,A,llll.ll,a,yyyyy.yy,a,x.x,x.x,xxxx,x.x,a*hh<CR><LF>

 

 Field Number:

  1) UTC Time

  2) Status, V = Navigation receiver warning

  3) Latitude

  4) N or S

  5) Longitude

  6) E or W

  7) Speed over ground, knots

  8) Track made good, degrees true

  9) Date, ddmmyy

 10) Magnetic Variation, degrees

 11) E or W

12)    Checksum

 

2 ArcNav.Default.Ave Description

The file ArcNav.Default.Ave gets created when the menu item “save settings as default” is chosen from the Navigation pulldown menu. This file is created in the users $HOME directory.  When the ArcNav extension loads it checks for the existence of this file and if so it is run instead of the default startup procedure.  It is an Avenue script so a user should be familiar with avenue before attempting to edit this file. A description of the avenue programming language is beyond the scope of this document and the reader is referred to the ArcView documentation for a treatment of that subject.  If compile errors occur the file will not be used and the system will fall back to default options. The file is overwritten each time the “save settings as default” menu item is selected so it might be wise to save  backup copy(s) of this file if different configurations need to be maintained. The default version of the file is shown below and a description follows.

 

' NAME: ArcNav.Default

' Script for shiptrack project

' This script for use with the arcview

' real-time GIS system

' V1.1 20-Oct-1997

' By Gerry Hatcher, MBARI

 

' Initialize global variables

_DISPLAYLIST={"REALTIME"}                           ' list of views for real-time plotting

_DATADIR="C:\ESRI\AVDATA\navdata\"            'Directory for data logging

_ICONDIR="C:\ESRI\ArcNav\icons\"                   'Directory where icon images are stored

_NAVSERVER="localhost"                                 'computer running navserver pgm

_NETNAVDLL="C:\ESRI\ArcNav\netnav.dll"         'dll for navigation communication

_DRIVER=false                                                  'Turns "Driver" on/off

_DELTA_T=5                                                    'Time to wait between Nav Updates

_ADD_COMMENT = true                                    'add comments to markpoints

_CENTER_VEHICLE="Ship"                               'Vehicle to center view window on

_CENTER_PERCENT=0.8                                 'Redraw screen when beyond this %

_DEBUG=false                                                   'Set true for verbose data listings

_DRIVER_RUNNING=false                                  'Set By "Driver"  when running

_TMG=false                                                       'Set whether Track Made Good (TMG) or

                                                                         'heading is used to rotate vehicle icon

 

'UTM coordinate setup

aRect = Rect.Make(-123@0,0@0)

' set the parameters of the projection

_UTMprj = TransverseMercator.Make(aRect)

_UTMprj.SetCentralMeridian(-123)

_UTMprj.SetReferenceLatitude(0)

_UTMprj.SetScale(0.9996)

_UTMprj.SetFalseEasting(500000)

_UTMprj.SetFalseNorthing(0)

_UTMprj.SetSpheroid(#SPHEROID_WGS84)

 

'set the list (_NavFieldlist) of navigation

'values for each vehicle. These Values correspond

'to the "items" that are requested from the

'program "MOSNAV" or "NMEA2AV" these items are also used as key values

'in the "navigation data" dictionary for each vehicle

 

_NavFieldlist = list.Make

_NavFieldlist.Add( "LON")

_NavFieldlist.Add( "LAT")

_NavFieldlist.Add( "HEAD")

_NavFieldlist.Add( "TMG")

_NavFieldlist.Add( "ALT")

_NavFieldlist.Add( "DEPTH")

_NavFieldlist.Add( "ISODATE")  ' use ISODDATE b/c Date is an arcview class

 

'Create the vehicle outlines as list of coordinates which create

'a polygon centered around 0,0. Dimensions are in meters

ShipList={

Point.Make(5,0),

Point.Make(5,-15),

Point.Make(5,-30),

Point.Make(-5,-30),

Point.Make(-5,-15),

Point.Make(-5,0),

Point.Make(0,10),

Point.Make(5,0)

}

RovList={

Point.Make(0.65,0),

Point.Make(0.65,-1.1),

Point.Make(-0.65,-1.1),

Point.Make(-0.65,0),

Point.Make(-0.65,0.8),

Point.Make(0,1.1),

Point.Make(0.65,0.8),

Point.Make(0.65,0)

}

 

'Create the _Vehicles dictionary.

'the fields of the dictionary are:

'"vehical Name",{"navigation data dictionary","location Hist","History Length",

'"vehical graphics set","vehicle color","scale Factor"})

 

_Vehicles = Dictionary.make(2)

_Vehicles.Set("Ship",

{

Dictionary.make(7), 'navigation data

list.make,          'Vehicle position history (for trail)

60,                 'starting size of trail position history

ShipList,           'Vehicle outline

Color.GetRed,       'Vehicle Color

0.005               'Scale factor for drawing outline

})

 

_Vehicles.Set("Rov",

{

Dictionary.make(7), 'navigation data

list.make,          'Vehicle position history (for trail)

60,                 'starting size of trail position history

RovList,          'Vehicle outline

Color.GetBlue,      'Vehicle Color

0.0004              'Scale factor for drawing outline

})

 

The first thing to realize is that if you try and edit this file and hopelessly botch it you can easily create a new one with the original default values simply by removing (or renaming arcnav.default.ave), starting a new arcview session, loading the ArcNav extension and choosing the Navigation menu option “Save Settings as Default”.

 

Hopefully the top part of this file where global variables down to _UTMproj is self documenting. Most of these items directly correspond to a menu item in the Navigation pulldown menu added by the extension and the others are set by scripts to indicate their status. A couple of exceptions are _NETNAVDLL which must be set to the complete path name to either netnav.dll (MSWINDOWS) or libnetnav.sl (UNIX) and _ICONDIR which must be the path to the directory where button icons created specifically for this extension reside.

 

The more interesting part of the setup file starts after the definition of _NavFieldlist. This variable should not be altered by the user because it’s fields directly correspond to the data that are expected from the network transfer from the “Helper Programs”. This list is used extensively by several scripts and if it is altered the extension most likely will not work.

 

The rest of the file may very well need to be altered by the user. First the outlines of the vehicle(s) or objects to be tracked are created. The outline is created as a point list which will be drawn in order and centered (and rotated) around the point (0,0). This list is ideally a rough scale outline of the vehicle in length units of meters. There should be somewhere between 4 and 24 points used to define the vehicle shape. This list will be attached to a vehicle “data dictionary” which is a conglomeration of several types of data (e.g. strings, lists and numbers). A unique outline may not be necessary for each vehicle if you plan to use color to differentiate among them.

 

Next the vehicle dictionary is defined. The vehicle dictionary in this case contains two members “Ship” and “ROV”. Both of the vehicles are themselves comprised of a dictionary, a list, a number, another list, a color, and a number. The first dictionary is where the most recent navigation data for that vehicle are stored, the first list is a position history used for drawing the ship trail, the 3rd field is the number of points to store in the history. The “vehicle graphics set” is the point list used to draw the vehicles outline, the 5th field is the color to use when drawing the vehicle.  The last field is a scale factor to use when drawing the vehicle if the geographic extent of the view is so large that if the vehicle was drawn to scale would be invisible. The smaller the scale factor the larger the vehicle will be drawn. If the geographic extent of the view is small enough the vehicle will be drawn to scale in the window.

 

 

If the user needs to create a new vehicle they should just copy and paste the definition of an existing vehicle and edit only the fields were necessary.  For example to create a 2nd ship called “Lobos” with the color yellow (see ArcView online help for predefined colors) and a different outline, the default setup file would be changed as follows: (changes are in red)

 

EXAMPLE 1

'Create the _Vehicles dictionary.

'the fields of the dictionary are:

'"vehical Name",{"navigation data dictionary","location Hist","History Length",

'"vehical graphics set","vehicle color","scale Factor"})

 

'Create the vehicle outlines as list of coordinates which create

'a polygon centered around 0,0. Dimensions are in meters

 

LobosList={

Point.Make(7,0),

Point.Make(7,-25),

Point.Make(7,-40),

Point.Make(-7,-40),

Point.Make(-7,-25),

Point.Make(-7,0),

Point.Make(0,10),

Point.Make(7,0)

}

 

ShipList={

Point.Make(5,0),

Point.Make(5,-15),

Point.Make(5,-30),

Point.Make(-5,-30),

Point.Make(-5,-15),

Point.Make(-5,0),

Point.Make(0,10),

Point.Make(5,0)

}

RovList={

Point.Make(0.65,0),

Point.Make(0.65,-1.1),

Point.Make(-0.65,-1.1),

Point.Make(-0.65,0),

Point.Make(-0.65,0.8),

Point.Make(0,1.1),

Point.Make(0.65,0.8),

Point.Make(0.65,0)

}

_Vehicles = Dictionary.make(3)

_Vehicles.Set("Lobos",

{

Dictionary.make(7),           'navigation data

list.make,                                'Vehicle position history (for trail)

60,                                           'starting size of trail position history

LobosList,                              'Vehicle outline

Color.GetYellow,                  'Vehicle Color

0.005                                       'Scale factor for drawing outline

})

 

_Vehicles.Set("Ship",

{

Dictionary.make(7),           'navigation data

list.make,                               'Vehicle position history (for trail)

60,                                           'starting size of trail position history

ShipList,                                 'Vehicle outline

Color.GetRed,                       'Vehicle Color

0.005                                       'Scale factor for drawing outline

})

 

_Vehicles.Set("Rov",

{

Dictionary.make(7),           'navigation data

list.make,                                'Vehicle position history (for trail)

60,                                           'starting size of trail position history

RovList,                                  'Vehicle outline

Color.GetBlue,                      'Vehicle Color

0.0004                                    'Scale factor for drawing outline

})

 

EXAMPLE 2

If the user only has one vehicle to track (only the ship for example ) then they could simply delete or comment out the lines defining the ROV. The bottom of the file would then become:

 

'Create the vehicle outlines as list of coordinates which create

'a polygon centered around 0,0. Dimensions are in meters

ShipList={

Point.Make(5,0),

Point.Make(5,-15),

Point.Make(5,-30),

Point.Make(-5,-30),

Point.Make(-5,-15),

Point.Make(-5,0),

Point.Make(0,10),

Point.Make(5,0)

}

 

'Create the _Vehicles dictionary.

'the fields of the dictionary are:

'"vehical Name",{"navigation data dictionary","location Hist","History Length",

'"vehical graphics set","vehicle color","scale Factor"})

 

_Vehicles = Dictionary.make(1)

 

_Vehicles.Set("Ship",

{

Dictionary.make(7),           'navigation data

list.make,                                'Vehicle position history (for trail)

60,                                          'starting size of trail position history

ShipList,                                'Vehicle outline

Color.GetRed,                       'Vehicle Color

0.005                                       'Scale factor for drawing outline

})