Difference between revisions of "NMEA format"

From Silent Wings Wiki
Jump to: navigation, search
Line 21: Line 21:
 
  nmea_frequency = <int>
 
  nmea_frequency = <int>
  
The output frequency of the NMEA strings. It defaults to 1, and is not set by the GUI. If you need a diffrent frequency you can set this manually in the config file. Be aware that a high frequency requires a higher port speed (see below).  
+
The output frequency of the NMEA strings in Hz. It defaults to 1. Be aware that a high frequency requires a higher port speed (see below).  
  
 
  use_nmea_special = <int>
 
  use_nmea_special = <int>

Revision as of 10:47, 15 August 2007

Silent Wings can write NMEA data to a serial port. To enable this, set the proper options in the Silent Wings GUI.


Port options

For more advanced users, additional parameters can be set in the options.dat file found in the Silent Wings/data directory. Here are the available options:

use_nmea = <bool>  

Set to true if you want to enable the NMEA output. The strings are written once a second (1 Hz) with this setting enabled.

nmea_port = <string>

Set to the port you want to use. On Windows, this is normally COM1 or COM2. On Linux it would be /dev/ttyS0 or maybe /dev/ttyUSB0, if you're using USB. On Mac, I don't know. (TODO)

nmea_speed = <int>

Set the port speed. If not defined this defaults to the NMEA default of 4800. You can however use something else if you want. The valid entries here are 4800, 9600, 19200, 38400, 57600 and 115200. The port settings will be 8 databits, No parity and 1 Stopbit (8N1) and you cannot change that. There is no handshaking.

nmea_frequency = <int>

The output frequency of the NMEA strings in Hz. It defaults to 1. Be aware that a high frequency requires a higher port speed (see below).

use_nmea_special = <int>

This is will enable a special Silent Wings specific nmea string output at the frequency in Hz set by <int>. It defaults to 0 which means it's disabled. If you ONLY want this string output without the other NMEA strings running at the same time at 1 Hz, set use_nmea = false and set use_nmea_special to something > 0.

If you want to use a frequency higher than 1 Hz it's highly recommended to use the highest port speed that seems possible for your cable and receiving hardware. Otherwise the bandwidth of the port is not high enough and writing one string will not be done before the next one starts.


NMEA strings

Silent Wings will output the following NMEA strings.

  • $GPRMC
  • $GPGGA
  • $PCAID
  •  !w (a custom string used by the Cambridge C302 flight computer)
  •  !s (a silent wings custom string, also used by use_nema_special)

With this set of strings most PDA flight computers will be quite happy.

The !w string

The output in this string is equal to what is documented to be output by the Cambridge C302 flight computer. It is built up as follows:

!w,<1>,<2>,<3>,<4>,<5>,<6>,<7>,<8>,<9>,<10>,<11>,<12>,<13>,<nmea checksum>

The data is represented with no decimals, also is unsigned, and is explained as follows

1  - Wind direction in degrees (no decimals)
2  - Wind speed in tenths of meters per second
3  - The time since the last wind calculation in seconds (always 1 in Silent Wings)
4  - Component wind in 10ths of Meters per second + 500 (500=0, 495 = 0.5m/s tailwind)
5  - True altitude in meters + 1000
6  - Instrument QNH setting (normally 1013)
7  - Airspeed in 100ths of meters per second
8  - Vario in 10ths of knots + 200
9  - Averager in 10ths of knots + 200
10 - Relative vario (netto) in 10ths of knots + 200
11 - Mcready-setting in 10ths of knots 
12 - Instrument ballast setting in capacity percents
13 - Instrument bug setting in percent

The !s string

The format of the !s string is as follows:

!s,<pitch>,<roll>,<alpha>,<beta>,<vario>,<accel>,<nmea checksum>

The numbers are all written with two numbers after the decimal points. Angles are in degrees. The vario is in meter per second, and the accel is the cockpit g meter in meters per second squared. Negative numbers will be signed with a minus "-" in front.

This string can and has been used to control a full motion simulator cockpit.

COM Port redirection

If you want to use the data sent on the com port on the same computer, you can redirect the com port, either in hardware or software. The Hardware way requires two com ports on the same computer connected with a null-modem cable.

On windows you can use com0com to do this in software instead. It is a free software package found at http://com0com.sourceforge.net/ . On Linux there is a virtual serial port driver that can be found here: http://www.tibbo.com/vspdl.php