OSDN Git Service

11/11/30 12H serial csv out.
[scilog/cpu2010.git] / ublox.h
diff --git a/ublox.h b/ublox.h
index 6a12472..3fa300a 100644 (file)
--- a/ublox.h
+++ b/ublox.h
 // NAV-
 #define UBX_ID_NAV_TIMEUTC  0x21
 
-void ublox_make_sum(unsigned char *pkt, unsigned int lenp, unsigned char *suma, unsigned char *sumb);
+#define UBX_LEN_NAV_TIMEUTC 20
+
+// NAV-TIMEUTCパケットのデータ格納
+typedef struct {
+    unsigned long   tow;    // ms GPS Millisecond Time of Week
+    unsigned long   tacc;   // ns Time Accuracy Estimate
+    long   nano;            //ns Nanoseconds of second, range -1e9 .. 1e9 (UTC)
+    unsigned int    year;   // UTC
+    unsigned char   month;
+    unsigned char   day;
+    unsigned char   hour;
+    unsigned char   min;
+    unsigned char   sec;
+    unsigned char   valid;  // Validity Flags
+                            //  bit0 validTOW 1 = Valid Time of Week
+                            //  bit1 validWKN 1 = Valid Week Number
+                            //  bit2 validUTC 1 = Valid UTC (Leap Seconds already known)
+} UbloxNavTimeUtc;
+
 int ublox_make_cmd(unsigned char id1, unsigned char id2, unsigned int lenp, unsigned char *payload, unsigned char pkt[]);
 void ublox_debug_pkt_out(unsigned char *pkt, int len);
 void ublox_send(unsigned char *pkt, unsigned int len_pkt);