UKHAS Wiki

UK High Altitude Society

User Tools

Site Tools


communication:protocol

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
communication:protocol [2011/09/15 20:43]
upu Payload Document Generator
communication:protocol [2015/04/03 09:49] (current)
mfa298 removed eroneous , at the end of the example
Line 1: Line 1:
 ====== Communications Protocol ====== ====== Communications Protocol ======
  
-This is the typical protocol used by UKHAS members to transmit GPS data balloon to ground on the unlicensed bands, although any custom data may be tacked onto the end of the string.+This is the typical protocol used by UKHAS members to transmit GPS data balloon to ground on the unlicensed bands. Parsing is handled by [[http://​habitat.habhub.org/​|habitat]] which can be configured to almost practically any format you can come up with, provided ​the string ​starts with $$CALLSIGN, end with a newline ('​\n'​),​ and contains printable ASCII characters. Fields are comma delimited.
  
-This doesn'​t have to be strictly adhered to, since we can easily set up different rules via [[projects:​dl-fldigi]]'​s ability to automatically configure itself (upon request). + <​code>​ $$CALLSIGN,sentence_id,time,latitude,longitude,altitude,optional speed,optional bearing,optional internal temperature*CHECKSUM\n </​code>​
- +
- <​code>​ $$<CALL SIGN>,<COUNTER D>,<TIME HH:​MM:​SS>​,<​LATITUDE DD.DDDDDD>​,<​LONGITUDE DD.DDDDDD>​,<​ALTITUDE METRES MMMMM>,<O SPEED KM/H DDDD.DD>,<O BEARING DDD.DD>,<O TEMPERATURE INTERNAL C D.DD>,<​O TEMPERATURE EXTERNAL C D.DD>,<​O TEMPERATURE CAMERA C D.DD>,<​O BAROMETRIC PRESSURE hPa(millibars)>,<​O CUSTOM DATA>*<CHECKSUM><​NEWLINE> ​</​code>​+
  
   * The individual fields can be of variable length, the minimum and maximum can be set in the payloads XML file.   * The individual fields can be of variable length, the minimum and maximum can be set in the payloads XML file.
-  * <CALL SIGN> ​simply identifies your balloon - doesn'​t have to be a real, licensed callsign.  +  * CALLSIGN ​simply identifies your balloon - doesn'​t have to be a real, licensed callsign.  
-  * <​INCREMENTAL COUNTER ID> ​also helps people receiving many transmissions at once. This should go up for each new transmission. It can go up 1, 2, 3, or be the milliseconds since poweron, or whatever you want. It just has to increase each time a new string is sent. +  * sentence_id (sometimes known as count, sequence, incremental counter...) ​also helps people receiving many transmissions at once. This should go up for each new transmission. It can go up 1, 2, 3, or be the milliseconds since power on, or whatever you want. It just has to increase each time a new string is sent. 
-  * <​LATITUDE> ​and <​LONGITUDE> ​can either be in decimal degrees (DD.dddd) or the NMEA format (DDMM.mmmm). If using decimal degrees take care that your conversion code does not break if it crosses the meridian. While the NMEA format is accepted you will still need to parse whether it its NSEW and use +/- appropriately+  * latitude ​and longitude ​can either be in decimal degrees (DD.dddd) or the NMEA format (DDMM.mmmm). If using decimal degrees take care that your conversion code does not break if it crosses the meridian. While the NMEA format is accepted you will still need to parse whether it its NSEW and use +/- appropriately. 
-  * After "<​ALTITUDE>,"​ the distributed tracker or anyone else not prepared for your custom data will not plot your data however the DL system will log the data for review. If you want to send anything else down, you can do so in that space+  * The checksum is very strongly recommended. ​We support CRC16_CCITT, ​NMEA XOR and a couple of variants of Fletcher 16 checksums; however: the CRC16_CCITT is the most popular and is far better than xor, which is mainly supported for old payloads. There have actually been real xor collisions. 
-  * The checksum is optional, but strongly recommended. ​It must either be the NMEA XOR format or the CRC16_CITT +  * The newline at the end IS required. It does make the protocol much more easier to human-read, and dl-fldigi looks for that character to terminate the string. ​Although both will workplease use '​\n'​not '​\r\n'​.
-  * The newline at the end IS required. It does make the protocol much more easier to human-read, and dl-fldigi looks for that character to terminate the string. +
-  * The minimum recommended strings consists of <​code>​$$<​CALL SIGN>,<COUNTER D>,<TIME HH:​MM:​SS>,<​LATITUDE DD.DDDDDD>,<​LONGITUDE DD.DDDDDD>,<​ALTITUDE METRES MMMMM>​*<​CHECKSUM><​NEWLINE></​code>​+
   * Here are example strings:   * Here are example strings:
  
Line 24: Line 20:
  
   Demonstration of the fact that the custom data can be anything:   Demonstration of the fact that the custom data can be anything:
-  $$icarus,​12342,​12:​34:​17,​52.345645,​-1.02342,​10232,​21.35,​192.3,​15.4,​-22.34,​-18.27,​1232,​Blah;Blah;Blah*0C+  $$icarus,​12342,​12:​34:​17,​52.345645,​-1.02342,​10232,​21.35,​192.3,​15.4,​-22.34,​-18.27,​1232,​Blah,Blah,Blah*0C
  
 **Usage example for the below two functions** **Usage example for the below two functions**
Line 55: Line 51:
  
 **Useful code to calculate NMEA xor checksum** **Useful code to calculate NMEA xor checksum**
 +
 +Please note: The use of xor checksum for payload telemetry is not advised, this code is useful for checking sentences sent by the GPS. The CCITT checksum below has much better performance and is preferred for payload telemetry
  
 <code c>#​include <​stdio.h>​ <code c>#​include <​stdio.h>​
Line 79: Line 77:
  
 **Useful code to calculate CRC16_CCITT checksum on the AVR** **Useful code to calculate CRC16_CCITT checksum on the AVR**
 +
 +(Refer to [[http://​www.nongnu.org/​avr-libc/​user-manual/​group__util__crc.html#​gaca726c22a1900f9bad52594c8846115f | this page]] for implementation on other microcontrollers)
  
 <code c>#​include <​stdio.h>​ <code c>#​include <​stdio.h>​
Line 102: Line 102:
  return crc;  return crc;
 }</​code>​ }</​code>​
- 
 ====== Getting Your Payload On the Tracker ====== ====== Getting Your Payload On the Tracker ======
  
 You will need to fill out a flight document so the server can parse your telemetry strings and update the map.\\ ​ You will need to fill out a flight document so the server can parse your telemetry strings and update the map.\\ ​
 Fill out the form here :​[[http://​habhub.org/​genpayload/​|Payload Document Generator]] the come and see us on [[ukhas:​irc_channel|IRC]] to get it added. Fill out the form here :​[[http://​habhub.org/​genpayload/​|Payload Document Generator]] the come and see us on [[ukhas:​irc_channel|IRC]] to get it added.
- 
communication/protocol.1316119418.txt.gz · Last modified: 2011/09/15 20:43 by upu