Free Tarot Readings

Bridge Command NEMA UDP to HTML file to JS instrumentation

Download it here

BridgeCommand is an excellent, free, naval simulator. The options for instrumentation are, programs like OpenCPN, or the built in bridgecommand-rp.exe.
But what if you want more?
That is what this git is for.
It is comprised of two parts.
1. An example of what instrumentation you can build with HTML and JS.
2. Two options for taking the output of BridgeCommand and modifying that output to be used with your HTML / JS instrementation.

Demo at:

Quick how to use:
Zip and download this complete git. Unzip it.
Run BridgeCommandNEMAUDPtoFileandHTML.exe
Open JS_Instrumentation_Demo.html in a browser and choose file (point to NEMA.txt), or http option
Run bridgecommander-bc.exe (

All the parts:

JS_Instrumentation_Demo.html is the HTML / JS example and demo. With a little more creativity, you could do a lot more.
Demo and images are at:

The precompiled BridgeCommandNEMAUDPtoFileandHTML.exe, for windows, converts the Bridgecommand UDP output to either html output or a local text file to be used by JS_Instrumentation_Demo.html
The source code for Lazarus is in the same folder.

The Alternate_NEMA folder is a mod for part of the BridgeCommand source code that will do what BridgeCommandNEMAUDPtoFileandHTML.exe does.


BridgeCommandNEMAUDPtoFileandHTML will compile with, and works in, Windows and Linux and Raspbian.
Compile with Lazarus / Free Pascal.
Install Indy
Note: For Linux, set ports > 1024 if you are not running as root

JS_Instrumentation_Demo.html is tested in Chrome and Firefox, and occasionally in IE.

BridgeCommandNEMAUDPtoFileandHTML.exe will take the bridgecommand-bc UDP NEMA output and saves it as NEMA.txt and also outputs it using a simple HTTP server (ports 80, 8080 (for linux) and 443)

bridgecommand-bc sends one line of UDP NEMA text at 250 ms intervals.
bridgecommand-bc provides the following NEMA output: $GPRMC , $GPGLL ,$GPGGA , $IIRSA ,$IIRPM , $IIRPM

The BridgeCommandNEMAUDPtoFileandHTML.exe output is intended to be used for web pages like JS_Instrumentation_Demo.html which will
take the NEMA data and display it on instrumentation based on HTML, IMG and JavaScript technologies.
Instramuntation can be built using webgl or some clever application of images, video or jquey rotate modules.
No third party programs are needed and it is cross platform compatable.

It is hoped that this NEMA.txt and HTML output might be built into future bridgecommand-bc versions.
I have modified the bridgecommand-bc NEMA.cpp code if you want to compile it into your version of bridgecommand. See :…
BridgeCommand_NEMA_UDP_to_File_HTML.exe can always be used.

bridgecommand-bc UDP NEMA Sample Output:



$II – Integrated Instrumentation
$GP – Global Positioning System receiver

1 2 3 4 5 6
| | | | | |
Field Number:
1. Sourse, S = Shaft, E = Engine
2 Engine or shaft number
3 Speed, Revolutions per minute
4 Propeller pitch, % of maximum, “-” means astern
5 Status, A means data is valid
6 Checksum

RMC – Recommended Minimum Navigation Information
This is one of the sentences commonly emitted by GPS units.
1 2 3 4 5 6 7 8 9 10 11| 13
| | | | | | | | | | | | |
Field Number:

UTC Time
Status, V=Navigation receiver warning A=Valid
N or S
E or W
Speed over ground, knots
Track made good, degrees true
Date, ddmmyy
Magnetic Variation, degrees
E or W
FAA mode indicator (NMEA 2.3 and later)
A status of V means the GPS has a valid fix that is below an internal quality threshold, e.g. because the dilution of precision is too high or an elevation mask test failed.
Example: $GNRMC,001031.00,A,4404.13993,N,12118.86023,W,0.146,,100117,,,A*7B


GLL – Geographic Position – Latitude/Longitude
This is one of the sentences commonly emitted by GPS units.

1 2 3 4 5 6 7 8
| | | | | | | |
Field Number:

N or S (North or South)
E or W (East or West)
Universal Time Coordinated (UTC)
Status A – Data Valid, V – Data Invalid
FAA mode indicator (NMEA 2.3 and later)

Example: $GNGLL,4404.14012,N,12118.85993,W,001037.00,A,A*67


This is one of the sentences commonly emitted by GPS units.

Time, Position and fix related data for a GPS receiver.

1 2 3 4 5 6 7 8 9 10 | 12 13 14 15
| | | | | | | | | | | | | | |
Field Number:

Universal Time Coordinated (UTC)
N or S (North or South)
E or W (East or West)
GPS Quality Indicator,
0 – fix not available,
1 – GPS fix,
2 – Differential GPS fix (values above 2 are 2.3 features)
3 = PPS fix
4 = Real Time Kinematic
5 = Float RTK
6 = estimated (dead reckoning)
7 = Manual input mode
8 = Simulation mode
Number of satellites in view, 00 – 12
Horizontal Dilution of precision (meters)
Antenna Altitude above/below mean-sea-level (geoid) (in meters)
Units of antenna altitude, meters
Geoidal separation, the difference between the WGS-84 earth ellipsoid and mean-sea-level (geoid), “-” means mean-sea-level below ellipsoid
Units of geoidal separation, meters
Age of differential GPS data, time in seconds since last SC104 type 1 or 9 update, null field when DGPS is not used
Differential reference station ID, 0000-1023



1 2 3 4 5
| | | | |
Field Number:
Starboard (or single) rudder sensor, “-” means Turn To Port
Status, A means data is valid
Port rudder sensor
Status, A means data is valid