<commit_before># Navgauge

**Navigation displays in your browser!**

<img src="https://raw.github.com/wiki/tkurki/navgauge/img/navgauge.png" width="544" height="292"/>

Navgauge makes navigation data available via NMEA 0183 and NMEA 2000 (N2K) available on your browser in customizable displays.

On the server side it is a Node.js http server application that pipes data from N2K and NMEA connections to the browser
 via Websockets.

On the browser it uses Javascript to update SVG gauges as data is received. Position is plotted on a WMS chart.

Access to N2K bus is available via [actisense-serial](https://github.com/canboat/canboat/wiki/actisense-serial) and [Actisense NGT-1](http://www.actisense.com/products/nmea-2000/ngt1.html) N2K USB adapter. N2K messages are parsed to JSON using [analyzer](https://github.com/canboat/canboat/wiki/analyzer) available in [CANboat](https://github.com/canboat/canboat/).

Navgauge uses gpspipe from [gpsd](http://catb.org/gpsd/) to access NMEA 0183 data. Any NMEA 0183 device available via gpsd can be used and adding support for previously unknown NMEA 0183 sentences is pretty straightforward.

Captured data sets, either directly from actisense-serial and gpspipe or Navgauge-generated unified json stream, can be
used to 'play back' real world data to use in debugging and development.

NMEA 0183 data can also be broadcast via UDP to be used in other applications such as INavX and iRegatta.

## Getting started with sample data
0. Install Node.js
1. Install Navgauge from tarball:
```
npm install https://github.com/tkurki/navgauge/tarball/master
```

2. Start the server with a sample data from the boat Cassiopeia: 
```
navgauge/bin/cassiopeia
```

3. Open [http://localhost:8080/](http://localhost:8080/)

## Getting started with real data

Navgauge uses shell commands to start CANboat command line tools `actisense-serial` and `analyzer` (N2K data) and
`gpspipe` (NMEA 0183) so those need available on your path.

Once you have command line access you can look at the
data you have and figure out how basic navigation data such as speed, bearing and wind speed and direction are
represented and figure out how to write the stream definition for your boat.

Navgauge server is started with
bin/server.js and takes the following options:

 ```
 Options:
   --n2k        actisense:/dev/USBxx|file:n2k.data[.gz]
   --nmea       [gpspipe[:port]],[gpspipe:port],[file:nmea.data[.gz]]
                Read with gpspipe -r or from file (optionally gzipped)

   --json       [file:filename.json] Read data from [filename] in
                "raw" object literal json format previously written by
                Naviserver
   -u           Broadcast nmea 0183 via udp on port 7777
   -b           Broadcast address for udp broadcast
   --writejson  Write the internal json stream to [filename]
   -p           http port                               [default: 8080]
   --boat       boat configuration, loaded from boats/ directory
                                                             [required]
 ```


 Take a look at `cassiopeia` and `freya` under `lib/boats/`, roll your own and add .log() statements to the incoming
 streams in `lib/streams.js` to see what your data actually looks like.


## Why Navgauge?<commit_msg>Add plaka, second link to busdata<commit_after># Navgauge

**Navigation displays in your browser!**

<img src="https://raw.github.com/wiki/tkurki/navgauge/img/navgauge.png" width="544" height="292"/>

Navgauge makes navigation data available via NMEA 0183 and NMEA 2000 (N2K) available on your browser in customizable displays.

On the server side it is a Node.js http server application that pipes data from N2K and NMEA connections to the browser
 via Websockets.

On the browser it uses Javascript to update SVG gauges as data is received. Position is plotted on a WMS chart.

Access to N2K bus is available via [actisense-serial](https://github.com/canboat/canboat/wiki/actisense-serial) and [Actisense NGT-1](http://www.actisense.com/products/nmea-2000/ngt1.html) N2K USB adapter. N2K messages are parsed to JSON using [analyzer](https://github.com/canboat/canboat/wiki/analyzer) available in [CANboat](https://github.com/canboat/canboat/).

Navgauge uses gpspipe from [gpsd](http://catb.org/gpsd/) to access NMEA 0183 data. Any NMEA 0183 device available via gpsd can be used and adding support for previously unknown NMEA 0183 sentences is pretty straightforward.

Captured data sets, either directly from actisense-serial and gpspipe or Navgauge-generated unified json stream, can be
used to 'play back' real world data to use in debugging and development.

NMEA 0183 data can also be broadcast via UDP to be used in other applications such as INavX and iRegatta.

## Getting started with sample data
0. Install Node.js
1. Install Navgauge from tarball:
```
npm install https://github.com/tkurki/navgauge/tarball/master
```

2. Start the server with a sample data from the boat Cassiopeia: 
```
navgauge/bin/cassiopeia
```

3. Open [http://localhost:8080/](http://localhost:8080/) to see a navigation display or
[http://localhost:8080/busdata.html](http://localhost:8080/busdata.html) to see the raw data

## Getting started with real data

Navgauge uses shell commands to start CANboat command line tools `actisense-serial` and `analyzer` (N2K data) and
`gpspipe` (NMEA 0183) so those need available on your path.

Once you have command line access you can look at the
data you have and figure out how basic navigation data such as speed, bearing and wind speed and direction are
represented and figure out how to write the stream definition for your boat.

Navgauge server is started with
bin/server.js and takes the following options:

 ```
 Options:
   --n2k        actisense:/dev/USBxx|file:n2k.data[.gz]
   --nmea       [gpspipe[:port]],[gpspipe:port],[file:nmea.data[.gz]]
                Read with gpspipe -r or from file (optionally gzipped)

   --json       [file:filename.json] Read data from [filename] in
                "raw" object literal json format previously written by
                Naviserver
   -u           Broadcast nmea 0183 via udp on port 7777
   -b           Broadcast address for udp broadcast
   --writejson  Write the internal json stream to [filename]
   -p           http port                               [default: 8080]
   --boat       boat configuration, loaded from boats/ directory
                                                             [required]
 ```


 Take a look at `cassiopeia`, `plaka` and `freya` under `lib/boats/`, roll your own and add .log() statements to the
 incoming  streams in `lib/streams.js` to see what your data actually looks like.


## Why Navgauge?
{'fraction_non_alphanumeric': 0.08149253731343284, 'fraction_numerical': 0.022686567164179106, 'mean_word_length': 3.2900128040973113, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 10, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4951623', 'n_tokens_mistral': 2061, 'n_tokens_neox': 1895, 'n_words': 811}