UKHAS Wiki

UK High Altitude Society

User Tools

Site Tools


guides:aprs:telemetry

Differences

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

Link to this comparison view

Next revision
Previous revision
guides:aprs:telemetry [2014/12/11 16:59] – created lz1devguides:aprs:telemetry [2015/01/09 19:02] (current) – added C code for base91 + clean ups lz1dev
Line 1: Line 1:
-test+====== APRS Telemetry ====== 
 + 
 +There are a few ways of sending telemetry via APRS. 
 + 
 +===== Telemetry report format ===== 
 + 
 +The packet format is described on ''page 78'' in the ''APRS Protocol reference'' 
 +((APRS Protocol reference v1.0.1 — {{:guides:aprs:aprs101.pdf|}}, http://www.aprs.org/doc/APRS101.PDF)) 
 +
 +It allows for 5 analogue channels and 8 digital bits. 
 +Here are examples of typical telemetry messages: 
 + 
 +<code> 
 +                  |seq|ch1|ch2|ch3|ch4|ch5|-8bits--| 
 +LZ1DEV-11>APRS,…:T#005,199,100,255,073,123,01101001 
 +LZ1DEV-11>APRS,…:T#MIC199,100,255,073,123,01101001 
 +</code> 
 + 
 +The downside of this method is the lack of position or timestamp. 
 +Plotting the data overtime could be impossible as time of arrival can be severely 
 +affected by delays in the APRS network. 
 +Furthermore, the resolution of each channel is limited to 8bits (e.g. 0-255) and 
 +there are only 5 analogue channels. 
 + 
 +==== Set up ==== 
 + 
 +You may have noticed that the above is limited in displaying negative numbers, 
 +decimals and unit of measurement. 
 +However, there are messages which can be send, that would indicate the unit of measurement, 
 +constants to calculate a meaningful value and friendly name for the specific channel.  
 +The details are described in the ''APRS Protocol reference <sup>[1]</sup>''
 + 
 +<code> 
 +              |ADDRESSEE|TYPE|  ch1  | ch2 | ch3 |ch4 |ch5| 1b  | 2b | 3b|4b |5b |… 
 +LZ1DEV>APRS,…::LZ1DEV-11:PARM.Battery,Btemp,ATemp,Pres,Alt,Camra,Chut,Sun,10m,ATV 
 + 
 +              |ADDRESSEE|TYPE|  ch1  |  ch2    |  ch3    |   ch4  | ch5 |… 
 +LZ1DEV>APRS,…::LZ1DEV-11:EQNS.0,5.2,0,0,.53,-32,3,4.39,49,-32,3,18,1,2,
 + 
 +              |ADDRESSEE|TYPE| ch1 | ch2 | ch3 | ch4|ch5|  b1 | b2 |b3|b4|b5| 
 +LZ1DEV>APRS,…::LZ1DEV-11:UNIT.v/100,deg.F,deg.F,Mbar,Kft,Click,OPEN,on,on,hi 
 +</code> 
 + 
 +There are 3 types of messages that can be send that would allow to "configure" telemetry. 
 +**PARM** and **UNIT** are straightforward and configure the channel name and unit. 
 +**EQNS** is to configure the constants in the following quadratic equation ''a*x<sup>2</sup> + b*x + c'' 
 +, which is used to calculate the final value. 
 + 
 +Example of calculating the final value for channel #2: 
 +<code> 
 +x = 100      a = 0, b = 0.53, c = -32 
 + 
 +0*100^2 + 100*0.53 + (-32) 
 +0 + 53 + (-32) 
 +---- 
 +Btemp: 21 def.F 
 +</code> 
 + 
 +==== Support ==== 
 + 
 +Both [[http://aprs.fi]] and [[http://tracker.habhub.org/]] recognize the format and will graph the telemetry accordingly. 
 + 
 +===== Base91 comment telemetry ===== 
 + 
 +''Base91 comment telemetry'' 
 +((Base91 comment telemetry — {{:guides:aprs:aprs-base91-comment-telemetry.pdf|}}, http://he.fi/doc/aprs-base91-comment-telemetry.txt)) 
 +is an alternative to the telemetry report format.  
 +The key advantages are: 
 +  * Short (4 to 16 characters) 
 +  * Can be added to the comment field of any format (position reports for example) 
 +  * Each channel has resolution of 0-8280 
 +  * Set up the same way 
 + 
 +==== Example C program ==== 
 + 
 +<code c> 
 +#include <stdio.h> 
 + 
 +void base91_encode(char *buf, unsigned short value) { 
 +    // valid values are 0 - 8280 
 +    value = value % 8281; 
 + 
 +    // encode the value 
 +    buf[0] = 33 + (value / 91); 
 +    buf[1] = 33 + (value % 91); 
 +
 + 
 +int main(void) { 
 +    printf("APRS base91 telemetry extension example\n"); 
 +    printf("---------------------------------------\n"); 
 + 
 +    // One channel of telemetry 
 +    char telem1[] = "|ss11|"; 
 +    base91_encode(&telem1[1], 1); // sequence number 
 +    base91_encode(&telem1[3], 0); // ch1 
 +    printf("Telemetry #1: %s\n", telem1); 
 + 
 +    // Five channels of telemetry 
 +    char telem2[] = "|ss1122334455|"; 
 +    base91_encode(&telem2[1], 2); // sequence number 
 +    base91_encode(&telem2[3], 1111); // ch1 
 +    base91_encode(&telem2[5], 2222); // ch2 
 +    base91_encode(&telem2[7], 3333); // ch3 
 +    base91_encode(&telem2[9], 4444); // ch4 
 +    base91_encode(&telem2[11], 5555); // ch5 
 + 
 +    printf("Telemetry #2: %s\n", telem2); 
 +
 +</code> 
 + 
 +===== Human readable format in the comment field ===== 
 + 
 +This method is straightforward, simply format and append telemetry to the comment field. Example: 
 + 
 +<code> 
 +LZ1DEV-11>APRS,…:=0001.00N/00001.00Wv266/024/A=000299 13.55Cint -30.51Cext 3.45V 7Sats  
 +                                                    |----------- comment -------------| 
 +</code> 
 +  
 +Things too keep in mind: 
 +  * the packet will be longer than necessary 
 +  * the amount of characters in the comment section is limited, depending on the packet type (e.g. 0-28, 0-43) 
 +  * existing system won't recognize the telemetry and provide friendly plotting over time 
 + 
 +====== References ====== 
guides/aprs/telemetry.1418317198.txt.gz · Last modified: 2014/12/11 16:59 by lz1dev

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki