summaryrefslogtreecommitdiff
path: root/rtcm.h
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2005-07-16 15:30:18 +0000
committerEric S. Raymond <esr@thyrsus.com>2005-07-16 15:30:18 +0000
commitd1857588cfcf0644fd84467e1b4853c0e45946a2 (patch)
tree9bbacd924d5732de4c52b019041e05c3ef42f5a2 /rtcm.h
parent364d17cf1813d46967d323d38f4657833b2bd050 (diff)
downloadgpsd-d1857588cfcf0644fd84467e1b4853c0e45946a2.tar.gz
Stage one of making the RTCM decoder an ordinary driver. Merge the RTCM
decoding context into the gps_device_t structure.
Diffstat (limited to 'rtcm.h')
-rw-r--r--rtcm.h54
1 files changed, 0 insertions, 54 deletions
diff --git a/rtcm.h b/rtcm.h
index 53495fb2..683a72a9 100644
--- a/rtcm.h
+++ b/rtcm.h
@@ -11,61 +11,7 @@
* of the 30-word msg.
*/
-typedef /*@unsignedintegraltype@*/ unsigned int RTCMWORD;
-/*
- * From the RCTM104 standard:
- *
- * "The 30 bit words (as opposed to 32 bit words) coupled with a 50 Hz
- * transmission rate provides a convenient timing capability where the
- * times of word boundaries are a rational multiple of 0.6 seconds."
- *
- * "Each frame is N+2 words long, where N is the number of message data
- * words. For example, a filler message (type 6 or 34) with no message
- * data will have N=0, and will consist only of two header words. The
- * maximum number of data words allowed by the format is 31, so that
- * the longest possible message will have a total of 33 words."
- */
-#define RTCM_WORDS_MAX 33
-
-#define MAXCORRECTIONS 15 /* max correction count in type 1 or 9 */
-
-struct rtcm_t {
- /* header contents */
- unsigned type; /* RTCM message type */
- unsigned length; /* length (words) */
- double zcount; /* time within hour -- GPS time, no leap seconds */
- unsigned refstaid; /* reference station ID */
- unsigned seqnum; /* nessage sequence number (modulo 8) */
- unsigned stathlth; /* station health */
-
- /* message data in decoded form */
- union {
- struct { /* data for messages 1 and 9 */
- unsigned satident; /* satellite ID */
- unsigned udre; /* user differential range error */
- unsigned issuedata; /* issue of data */
- double rangerr; /* range error */
- double rangerate; /* range error rate */
- } ranges[MAXCORRECTIONS];
- };
-
- /* this is the decoding context */
- bool locked;
- int curr_offset;
- RTCMWORD curr_word;
- RTCMWORD buf[RTCM_WORDS_MAX];
- unsigned int bufindex;
-};
-
-enum rtcmstat_t {
- RTCM_NO_SYNC, RTCM_SYNC, RTCM_STRUCTURE,
-};
-
-#define RTCM_ERRLEVEL_BASE 5
-extern void rtcm_init(/*@out@*/struct rtcm_t *);
-extern enum rtcmstat_t rtcm_decode(struct rtcm_t *, unsigned int);
-extern void rtcm_dump(struct rtcm_t *, /*@out@*/char[], size_t);
/* end */