A Windows Program for the Display, Capture, and Playback of NMEA data.
Current Revision 0.53 (June 11, 2009)
Please see the Revision History section for new features and changes. The documentation has not been updated.
Look here for description of the new dials.
And look here for description of the new Coastline Chart feature.
NavMonPc discussion group: http://tech.groups.yahoo.com/group/NavMonPc/
Serious Disclaimer: NavMonPc is a work in progress, and almost certainly contains bugs, errors, and omissions. It may or may not be useful to you. I make no promises that it will not cause your computer to explode, but if it does, be assured that it was accidental and I am very sorry. However, I won't be sorry enough to pay for any damages: direct, incidental, or imaginary.
NavMonPc is the sole property of Paul M. Elliott, and is offered on a limited basis free of charge for non-commercial use. I reserve the right to change the terms of this offer at any time.
NavMonPc, Copyright 2008, 2009, Paul M. Elliott and Dirk Lison
Please note that
your computer graphics adaptor must be set to 32-bit "color quality".
Due to a bug in the graphics library used in NavMonPc, the charts and dials will not display if the color quality is set to 16-bit.
This will install NavMonPc on your computer. This will create the following
C:\Documents and Settings\USERNAME\Application Data\NavMonPc
If the Windows environment variables point to a drive other than "C:", these directories will be created according to the environment variables.
The program file "NavMonPc.exe" will
be written to the C:\Program Files\NavMonPc directory.
The configuration file "NavMonConfig.txt" and the alarm soundfiles "Alarm1.wav" and "Alarm2.wav" will be written to the C:\Documents and Settings\USERNAME\Application Data\NavMonPc directory.
The setup program will also write several files to the system directory (usually
C:\WINDOWS\SYSTEM32). These files are:
"NSCEPictureBox.ocx", which provides graphics support tools.
"NSBComDlg.dll", which contains file management and other common Windows tools.
"NSBControls.dll", which contains the "listbox", used here for the on-screen logging.
"MSCEFILE.DLL", also contains file management tools.
"SerialXP.dll", which provides enhanced serial port support.
"cswskax5.ocx", which provides TCP/IP support functions.
The setup pogram will also install "Franson Serialtools", which provide virtual serial ports (useful for providing NMEA inputs to other programs).
I have seen the setup program fail during the initial installation, apparantly because it was unable to create a directory. If this happens, just run the install program again -- it should run OK.
When you run NavMonPc, it will first try to read the configuration file "NavMonConfig.txt" If this file does not exist, or if it is not in the proper format, NavMonPc will start in a default configuration. When shut down, NavMonPc will save its current configuration, overwriting "NavMonConfig.txt". It is possible to read an alternate configuration file, or save the current configuration to a different file, through the File/Get Config and File/Save Config menubar selections.
Once NavMonPc has started, the first thing to do is set up the NMEA input sources. These are configured by selecting File / Serial Port A, B and File / Serial Port C, D in the top menubar. This will bring up the Serial Connections or More Serial Connections window:
Serial Port Configuration Screens
You can select four different serial channels. NMEA data can be accepted from both ports. Note the AutoStart checkbox. When this is selected, NavMonPc will attempt to connect to the selected ports automatically at program start.
The serial port # and baudrate can be configured, while parity, # of data bits, and # of stop bits is fixed at "N,8,1"
Each serial port may be configured to transmit all NMEA data received on any NavMonPc input, by selecting the Echo NMEA box.
At the bottom of each of the input source configuration panels is a box that displays the data as received from the source.
Note that the RTS output of Serial Channel A may be selected to drive an external alarm during a NavMonPc alarm condition. The RTS output is normally low, and will be driven to a positive voltage during an alarm condition. The polarity may be optionally inverted.
Also note that the CTS input of Serial Channel A may be configured as a Man Over Board (MOB) alarm input. When this option is selected, any transition on this input will trigger the MOB alarm. For example, a pushbutton that connects between CTS and +12V may be used.
Once the data sources are configured, close the Serial Port window by clicking on the "X-box" in its upper right corner.
You should now see data displayed on the dials.
If the connection to these serial ports is lost, for example if a Bluetooth serial interface is disrupted, the program will attempt to reconnect until either the connection is restored or the user clicks the Disconnect button.
NavMonPc can also receive NMEA input from a network TCP/IP connection. Select File / TCP/IP to bring up the configuration window:
If the connection to the network port is lost, the program will attempt to reconnect until either the connection is restored or the user clicks the Disconnect button.
Finally, all received NMEA data can be echoed to as many as three "virtual ports". These ports are available to other programs (a charting program, for example):
Virtual Port Configuration
These settings will be saved when the NavMonPc is closed, and will be restored when the program is next started.
Logging NMEA Data
To log the NMEA data received by NavMonPc, select File/Logging in the top menubar. This will bring up the Logging window:
Click on the NMEA Log File button to select or enter the filename where the NMEA data should be written, then click Start Log. Click Stop Log to stop. Data will be appended to the logfile, so you can start, stop, and restart logging without losing previously-saved data.
NavMonPc will also create a comma-delimited spreadsheet (CSV) file, with selectable fields and sample rate.
Auto-Log option: This automatically creates a NMEA or CSV logfile, starting a new log at midnight (computer time). The location of this file is specified in the NavMonConfig.txt file on the "Logging" line:
'Logging, AutoLog, LogFileRoot,
AutoLog2, SsLogFileRoot, cbAlog2Interval.ListIndex, <sixteen
Logging, 0, C:\Documents and Settings\Elliott\My Documents\Log\, 0, C:\Documents and Settings\Elliott\My Documents\Log\, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0
In the example above, the "LogFileRoot" and "SsLogFileRoot" are specifying the "Log" directory in "My Documents". These automatically generated logfiles will be named with the current date (for example, "NmeaLog-2-9-2009.txt" and "SsLog-2-12-2009.csv")
GPS Time option: Selecting this option will cause the Auto-Log to use GPS time for the naming and creating of the daily log. Otherside, the computer's local time will be used.
Playing Back NMEA Data Files
To log the NMEA data received by NavMonPc, select File/Play File in the top menubar. This will bring up the Play File window:
Click the NMEA File button to select the NMEA file, then on Play to start the playback. The playback speed can be controlled with the 1X, 10X, 100X, and Pause buttons (these speeds are only approximate).
Pressing the Stop button will stop the playback. Pressing Play again will restart the playback from the beginning of the file.
NOTE: While the file is playing, NavMonPc will also still accept data from the normal input sources. This will often result in very confusing results, so you will probably want to disconnect the input sources (on the "Connections" window) before starting a playback. When playback is Paused, the processing of all NMEA data (including from the normal input sources) is also paused.
NavMonPc has other options, accessed through the Options/Options menubar selection:
The first three of these control the behavior of NavMonPc at startup and shutdown, and allow the program to accept NMEA data with missing or corrupt parity.
The Use True Bearings option determines the way bearings are displayed throughout the program. If this option is checked, the bearing mode is True, otherwise Magnetic bearings are used. Magnetic bearings are calculated where necessary by applying the Magnetic Variation to the True bearings. When the Use GPS MagVar option is selected, the program will use the Variation provided by the NMEA instruments. Otherwise, the Variation will be taken from the User Mag Var field.
Display Filtered SOG Data: This provides a filter for the raw SOG data, which is useful if the GPS outputs a noisy SOG.
The Vessel Name and GPS Location fields are used to set the name of your vessel (used on the plotter display), and the location of your GPS antenna. This data is saved in the configuration file and is restored when the program is started.
The GPS Location fields are in units of meters, and are defined as follows:
When the AIS plotter is set to Plot to Scale (see AIS / More Options), these dimensions are used to accurately size and locate your vessel on the screen.
The Units buttons select whether English or Metric units will be displayed as appropriate. Note that regardles of this option setting, speed is always displayed in Knots, and distances greater than approximately 0.5 NM are displayed in nautical miles.
NavMonPc will typically be configured to display the active waypoint information provided by the NMEA data. Optionally, a waypoint can be hand-entered, the current active waypoint can be captured and locked, or the current position can be captured. This is done in the "Waypoint Options" window:
When Activate User Waypoint is checked, any NMEA-provided waypoint will be ignored, and the user-defined waypoint will be displayed. NavMnPc will calculate the Range, Bearing, Cross-Track Error, Time To Go, and Closing Velocity, using great-circle methods
The AIS screen is activated by selecting AIS from the menubar.
Please read AIS Display Details for additional information
Your vessel is shown at the center of the screen, much like a RADAR display. Your vessel, and all displayed targets show their heading, and they project a "course and speed" vector. The vector time length scales with the full-scale range, or can be controlled with the Speed Vector Length buttons.
The target orientation can be chosen from the North Up, Heading Up or Course Up options.
On a crowded screen it may be useful to select the Show Cautions or Show Alarms button. Show Cautions will cause the display to show only those targets in the Alarm or Caution state. Show Alarms will cause only targets in the Alarm state to be displayed.
More Options -- This button displays additional display options:
Own Track -- This control activates the display of your vessel's track, either over the previous hour (points stored at ten-second intervals), or the previous 24 hours (points stored at ten-minute intervals).
Guard-Zone -- This button displays the Guard-Zone settings. There are two conditions that can be enabled, and when a target ship meets either of these conditions the alarm will sound:
Anchor Watch -- This button displays theAnchor Watch controls:
AIS Targets -- Click on a target, or select it from the drop-down Targets list, to display further information about the target. The Extend Vector to CPA option on this information screen will show the Closest Point of Approach of the selected target to your boat.
If an AIS target meets either one of the Guard Zone criteria, an alarm will be triggered:
AIS Alarm Display
The only way to clear this alarm state is to reconfigure the Guard Zone Options, or if the target(s) no longer meet the alarm criteria.
"Own Vessel" Tracks
Vessel Tracks and Anchor Watch
NOTE: The AIS range, bearing, CPA and TCPA calculations are done using "flat earth" math to reduce the load on the computer. For the typical AIS ranges (under 100 nm), no significant error is introduced by these simplifications. At extreme ranges the data presented may be inaccurate.
There are stripcharts available for true wind speed / direction (Windchart), Course Over Ground / Speed Over Ground (Speedchart), and water temperature / depth (Waterchart).
The Windchart screen shows the True Wind Direction and Speed history. Timescales of 10 and 100 minutes, and 12 hours can be displayed. The 100 minute and 12 hour displays show the average wind speed on top of the maximum and minimum speeds. True Wind Direction scale can be zoomed in for a detailed view, and it can be centered to the current TWD. Here is a detail view of a 12-hour windchart showing average, max and min windspeeds:
Note that the 12-hour chart displays samples taken every 72 seconds, and the 100-minute chart displays samples every ten seconds. The maximun and minimun speeds displayed are those that occured during the sample interval.
The Speedchart shows COG and SOG history. Timescales of 10 and 100 minutes, and 12 hours can be displayed. The 100 minute and 12 hour displays show the average SOG speed on top of the maximum and minimum speeds. The COG scale can be zoomed in for a detailed view, and it can be centered to the current COG.
The Waterchart shows
water temperature and depth history Timescales of 10 and 100 minutes, and
12 hours can be displayed. The 100 minute and
12 hour displays
show the average depth on top of the maximum and minimum depth.
The temperature scale can be zoomed in for a detailed view, and it can
be centered at 40, 50, 60, 70, 80, and 90 degrees..
Man Over Board
The top-right buttom on the NavMonPc screen is "MOB" (Man Over Board). A MOB alarm can be triggered by clicking this button, or by a transition on the Serial Port 1 CTS input (see the Configuration section of this document). When a MOB condition is activated, the AIS screen will be displayed with a red (magenta) "X" displayed at the boat's position at the time of activation. The display will be placed in a course-up orientation, and will automatically range-scale to keep the MOB displayed on screen:
The Depth alarm can be configured for shallow water and/or deep water. This option screen can be opened by either selecting "Options / Depth Alarm" or by clicking on the Depth dial.
Depth Alarm Configuration
A Depth alarm will be triggered when either of the deep or shallow conditions are met:
NavMonPc provides the capability to brouse through the NMEA input data by means of a Debug screen (select "Options / Debug"). The NMEA messages processed by the program will be indicated by the activated buttons on the left of the screen. You can see the sentence most recently received by clicking the button. Pressing the Clear Stats button will reset all the NMEA sentence buttons. The "selection box" to the right of Clear Stats shows all other NMEA messages seen, and by selecting the message type you can see the most recent message received.
You may see other debug options and features on this screen (here, the "Decode AIS VDO" and "Enable Debug Messages" checkboxes). Touch these at your own risk!
A Note on Alarm Sounds
There is a MOB alarm sound, and a General alarm sound that will be played. These are standard soundfiles, named "Alarm1.wav" for the MOB alarm, and "Alarm2.wav" for the general alarm, and are located in the same directory as the "NavMonConfig.txt" file (usually "Application Data\NavMonPc"). You can substitute other soundfiles of your choosing (they must be named "Alarm1.wav" and "Alarm2.wav").
List of NMEA sentences that are understood (some perhaps incompletely) by
At the moment, all data from all ports is combined and processed. There is the option of disabling a particular sentence-type, and a rudimentary way to prioritize RMC sentences from different sources, but I plan to eventually provide much more flexible source selection and routing.
Once the data has made it through the first-stage filter, I have a fixed precedence for choosing which data to use. The order is fairly arbitrary, but once I find a source with valid data, the remaining sources (that are lower in the pecking-order) are ignored.Here is my priority order:
Lat/Lon: GLL, GGA, RMC
GPS Time/Date: RMC, ZDA, GGA, GLL (GGA and GLL give time only)
COG/SOG: VTG, RMC
Heading: HDT, HDM, HDG, VHW
Speed Through Water: VHW
AWA/AWS: MWV, VWR
TWA, TWS, TWD: MWD, VWT, MWV (if MWV only gives relative wind I calculate true from AWA, AWS, SOG, HDG), VWR (calculated from AWA, etc)
Depth: DBT, DPT
Water temp: MTW
Waypoint/XT: User data, RMB, WCV (name), WPL (name), XTE (crosstrack)
This is the program configuration file, usually stored in the "Application Data\NavMonPc" directory. Any line starting with a " ' " is a comment. Each configuration field is preceeded by a comment line describing the options. "1" = true, "0" = false.
Note that the "Logging" option sets the directory where the automatic logs arestored (default is "C:/"), with the lognames being "NmeaLog-" and "SsLog-", followed by the system date.
The "Rmc" configuration option lets you specify two RMC sources in their order of priority. If no priority is specified then all RMC messages will be decoded. If neither of the priority RMC messages is received then any RMC message will be used.
All other configuration options can be set in the program, and all will be saved at program exit.
Example NavMonConfig.txt file:
' NavMonPc Version 0.35 Configuration
File: C:\Documents and Settings\Elliott\Application Data\NavMonPc\NavMonConfig.txt
' Save Date: 4/27/2009 12:07:19 AM
'InitialConfig, Load on Start, Save on Exit, Ignore Parity Errors, Use True Bearings, Use GPS MagVar, User MagVar, Use Filtered SOG
InitialConfig, 1, 1, 0, 1, 1, 15.4, 1
'Position, Lat (+/-DD.ddddd), Lon (+/- DD.ddddd)
Position, 38.394268321991, -122.99940999349
'SerialConfig, portA, BaudA, AutoStart, cbAlarmA, cbMobA, cbInvertRts, portB, BaudB, AutoInitB, VPortA, AutoInitVPortA, VPortB, AutoInitVPortB, VPortC, AutoInitVPortC
SerialConfig, COM16, 38400, 0, 0, 0, 0, COM15, 38400, 0, [Closed], 0, [Closed], 0, [Closed], 0, 0, 0
'SerialConfig2, portC, BaudC, EchoC, AutoStartC, portD, BaudD, EchoD, AutoStartD
SerialConfig2, [Closed], 38400, 0, 0, [Closed], 38400, 0, 0
'NetworkConfig, address, port, AutoStart
NetworkConfig, 126.96.36.199, 9009, 0
'AisConfig, North Up, Heading Up, Course Up, Show All, Show Cautions, Show Alarms, Relative Vectors, Target Triangles, Show Names, Plot to Scale, Auto-TCPA Vector, GZ Radius, GZ CPA, GZ TCPA, Range, Vector, ExtrapolatePosition
AisConfig, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 2, 11, 15, 1
'Waypoint, LatDeg, LatMin, LatNS, LonDeg, LonMin, LonEW, WpName, WpActive
Waypoint, 37, 48.7940, N, 122, 26.8440, W, 4/26/2009 11:45:23 PM, 0
'Stripchart, TimeScaleIndex(0), TimeScaleIndex(1), TimeScaleIndex(2), RightScaleIndex(0), RightScaleIndex(1), RightScaleIndex(2), ZoomArrayIndex(0), ZoomArrayIndex(1), ZoomArrayIndex(2), LeftChartCenter(0), LeftChartCenter(1), LeftChartCenter(2)
Stripchart, 0, 0, 0, 2, 0, 2, 0, 0, 1, 240, 330, 60
'Logging, AutoLog, LogFileRoot, AutoLog2, SsLogFileRoot, cbAlog2Interval.ListIndex, <seventeen log options>
Logging, 0, C:\Documents and Settings\Elliott\My Documents\Log\, 0, C:\Documents and Settings\Elliott\My Documents\Log\, 6, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1
'Logging2, GpsTime, GpsTime2
Logging2, 0, 0
'Rmc, RmcPriority1, RmcPriority2
'DepthAlarm, cbDoSetDepth, tbDoDepthSetpoint, cbDoSetDeepDepth, tbDoDeepDepthSetpoint, DepthOffset
DepthAlarm, 0, 0, 0, 0, 0
'OwnShipData, OwnShipName, OwnShipGpsLocA, OwnShipGpsLocB, OwnShipGpsLocC, OwnShipGpsLocD, Spare
OwnShipData, VALIS, 13, 1, 4, 1, Spare
'NmeaOptions, UseBwc, UseDbk, UseDbs, UseDbt, UseDpt, UseGga, UseGll, UseHdg, UseHdm, UseHdt, UseMtw, UseMwd, UseMwv, UseRmb, UseRmc, UseRm1, UseRm2, UseRot, UseVdr, UseVhw, UseVpw, UseVtg, UseVwr, UseVwt, UseWcv, UseWpl, UseXte, UseZda
NmeaOptions, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Rev 0.52 Changes
Rev 0.50 Changes
'Dial, InstanceName, Row, Column, cbShowMinMax.value, cbShowMinMax2.value,
Note the Row and Column parameters. These are indicating that the Windspeed dial is in row 2, column 2. The available rows are 1 and 2, and the columns are 1-2-3-4. I do no error checking, so be careful not to put one dial on top of another ot enter an invalid number. If you mess it up, just delete the offending line from the config file, and the default location will be used instead (and a fresh config line will be saved on exit).
* There is a debug option for screen-size: Small, Medium, Large. There are actually 4 rows and 8 columns available in the large screen. I am working on optional double-size dials, allowing you to build a custom screen with a mix of dial sizes and locations. All this is done with an eye towards future dial designs, for TBD data sources. At the moment these features aren't particularly useful, and may be dangerous.
* TWD bugfix -
True Wind Direction was calculated using COG instead of Heading in
some cases. Now fixed <<< No it wasn't!
0.30 Changes: Added two more serial port interfaces, added "DPT" NMEA
depth sentence. Minor change to debug display of NMEA sentences.
Releases 0.25 through 0.28