diff options
| author | Dave Hibberd <d@vehibberd.com> | 2023-12-17 13:53:32 +0000 |
|---|---|---|
| committer | Dave Hibberd <d@vehibberd.com> | 2023-12-17 13:53:32 +0000 |
| commit | c264c0c63857e0c36303687d2dfc533500b93cf1 (patch) | |
| tree | d2de59640c3454c97c6a1de817ad3643ca081aba /rpack.h | |
| parent | 1407d7b68693f014156bac2462c2d41f9e3cb2a1 (diff) | |
New upstream version 0.0.0.71upstream/0.0.0.71
Diffstat (limited to 'rpack.h')
| -rw-r--r-- | rpack.h | 94 |
1 files changed, 0 insertions, 94 deletions
diff --git a/rpack.h b/rpack.h deleted file mode 100644 index d972a54..0000000 --- a/rpack.h +++ /dev/null @@ -1,94 +0,0 @@ - -/*------------------------------------------------------------------ - * - * File: rpack.h - * - * Purpose: Definition of Garmin Rino message format. - * - * References: http://www.radio-active.net.au/web3/APRS/Resources/RINO - * - * http://www.radio-active.net.au/web3/APRS/Resources/RINO/OnAir - * - *---------------------------------------------------------------*/ - - -#ifndef RPACK_H -#define RPACK_H 1 - - -#define RPACK_FRAME_LEN 168 - - -#ifdef RPACK_C /* Expose private details */ - - - -// Transmission order is LSB first. - -struct __attribute__((__packed__)) rpack_s { - - int lat; // Latitude. - // Signed integer. Scaled by 2**30/90. - - int lon; // Longitude. Same encoding. - - char unknown1; // Unproven theory: altitude. - char unknown2; - - unsigned name0:6; // 10 character name. - unsigned name1:6; // Bit packing is implementation dependent. - unsigned name2:6; // Should rewrite to be more portable. - unsigned name3:6; - unsigned name4:6; - unsigned name5:6; - unsigned name6:6; - unsigned name7:6; - unsigned name8:6; - unsigned name9:6; - - unsigned symbol:5; - - unsigned unknown3:7; - - -// unsigned crc:16; // Safe bet this is CRC for error checking. - - unsigned char crc1; - unsigned char crc2; - - char dummy[3]; // Total size should be 24 bytes if no gaps. - -}; - -#else /* Show only public interface. */ - - -struct rpack_s { - char stuff[24]; -}; - - -#endif - - - -void rpack_set_bit (struct rpack_s *rp, int position, int value); - -int rpack_is_valid (struct rpack_s *rp); - -int rpack_get_bit (struct rpack_s *rp, int position); - -double rpack_get_lat (struct rpack_s *rp); - -double rpack_get_lon (struct rpack_s *rp); - -int rpack_get_symbol (struct rpack_s *rp); - -void rpack_get_name (struct rpack_s *rp, char *str); - - - -#endif - -/* end rpack.h */ - |
