guides:aprs:telemetry
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
guides:aprs:telemetry [2014/12/11 20:19] – lz1dev | guides:aprs:telemetry [2015/01/09 19:02] (current) – added C code for base91 + clean ups lz1dev | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== APRS Telemetry ====== | ====== APRS Telemetry ====== | ||
- | WIP | + | There are a few ways of sending telemetry via APRS. |
- | ===== References | + | ===== Telemetry report format |
- | | + | |
- | - Base91 telemetry comment | + | The packet format is described on '' |
+ | ((APRS Protocol reference | ||
+ | . | ||
+ | It allows for 5 analogue channels and 8 digital bits. | ||
+ | Here are examples of typical telemetry messages: | ||
+ | |||
+ | < | ||
+ | |seq|ch1|ch2|ch3|ch4|ch5|-8bits--| | ||
+ | LZ1DEV-11> | ||
+ | LZ1DEV-11> | ||
+ | </ | ||
+ | |||
+ | 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, | ||
+ | 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 '' | ||
+ | |||
+ | < | ||
+ | |ADDRESSEE|TYPE| | ||
+ | LZ1DEV> | ||
+ | |||
+ | |ADDRESSEE|TYPE| | ||
+ | LZ1DEV> | ||
+ | |||
+ | |ADDRESSEE|TYPE| ch1 | ch2 | ch3 | ch4|ch5| | ||
+ | LZ1DEV> | ||
+ | </ | ||
+ | |||
+ | There are 3 types of messages that can be send that would allow to " | ||
+ | **PARM** and **UNIT** are straightforward and configure the channel name and unit. | ||
+ | **EQNS** is to configure the constants in the following quadratic equation '' | ||
+ | , which is used to calculate the final value. | ||
+ | |||
+ | Example of calculating the final value for channel #2: | ||
+ | < | ||
+ | x = 100 a = 0, b = 0.53, c = -32 | ||
+ | |||
+ | 0*100^2 + 100*0.53 + (-32) | ||
+ | 0 + 53 + (-32) | ||
+ | ---- | ||
+ | Btemp: 21 def.F | ||
+ | </ | ||
+ | |||
+ | ==== Support ==== | ||
+ | |||
+ | Both [[http:// | ||
+ | |||
+ | ===== Base91 | ||
+ | |||
+ | '' | ||
+ | ((Base91 comment telemetry | ||
+ | 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 < | ||
+ | |||
+ | 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(" | ||
+ | printf(" | ||
+ | |||
+ | // One channel of telemetry | ||
+ | char telem1[] = " | ||
+ | base91_encode(& | ||
+ | base91_encode(& | ||
+ | printf(" | ||
+ | |||
+ | // Five channels of telemetry | ||
+ | char telem2[] = " | ||
+ | base91_encode(& | ||
+ | base91_encode(& | ||
+ | base91_encode(& | ||
+ | base91_encode(& | ||
+ | base91_encode(& | ||
+ | base91_encode(& | ||
+ | |||
+ | printf(" | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | ===== Human readable format in the comment field ===== | ||
+ | |||
+ | This method is straightforward, | ||
+ | |||
+ | < | ||
+ | LZ1DEV-11> | ||
+ | |----------- comment -------------| | ||
+ | </ | ||
+ | |||
+ | 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.1418329187.txt.gz · Last modified: 2014/12/11 20:19 by lz1dev