direwolf/src/rpack.h

95 lines
1.7 KiB
C
Raw Normal View History

Version 1.1 modified: .gitattributes modified: APRStt-Implementation-Notes.pdf modified: CHANGES.txt modified: Makefile.linux modified: Makefile.win new file: Raspberry-Pi-APRS-Tracker.pdf modified: Raspberry-Pi-APRS.pdf modified: User-Guide.pdf modified: aclients.c modified: aprs_tt.c modified: aprs_tt.h modified: atest.c modified: audio.c modified: audio.h modified: audio_win.c modified: ax25_pad.c modified: ax25_pad.h modified: beacon.c modified: beacon.h modified: config.c modified: config.h modified: decode_aprs.c modified: decode_aprs.h modified: demod_afsk.c modified: digipeater.c modified: digipeater.h modified: direwolf.c modified: direwolf.conf modified: direwolf.h modified: dsp.c modified: dwgps.c modified: encode_aprs.c modified: encode_aprs.h modified: fsk_demod_state.h new file: grm_sym.h modified: hdlc_rec.c modified: hdlc_rec2.c modified: hdlc_rec2.h modified: kiss.c modified: kiss_frame.c modified: kiss_frame.h modified: kissnet.c modified: latlong.c modified: latlong.h new file: log.c new file: log.h new file: log2gpx.c new file: mgn_icon.h modified: misc/README-dire-wolf.txt modified: multi_modem.c new file: nmea.c new file: nmea.h modified: ptt.c modified: rdq.c modified: regex/README-dire-wolf.txt new file: rpack.h modified: rrbb.c modified: rrbb.h modified: server.c modified: symbols-new.txt modified: symbols.c modified: symbolsX.txt new file: telemetry.c new file: telemetry.h modified: textcolor.c modified: tocalls.txt modified: utm/README.txt modified: version.h modified: xmit.c modified: xmit.h
2015-07-27 01:05:48 +00:00
/*------------------------------------------------------------------
*
* 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 */