]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
ChangeLog, NEWS, refclock_nmea.c:
authorHarlan Stenn <stenn@ntp.org>
Tue, 24 Aug 1999 03:00:11 +0000 (03:00 -0000)
committerHarlan Stenn <stenn@ntp.org>
Tue, 24 Aug 1999 03:00:11 +0000 (03:00 -0000)
  * ntpd/refclock_nmea.c: Patches for:
  Trimble OEM Ace-II receiver. Low cost PCB with single
  voltage input, external active antenna and two serial
  ports with either NMEA and ITAPs output. Programmable
  to be tuned for 'time' accuracy in fixed station config.
  From: Nick Hibma <nick.hibma@jrc.it>

bk: 37c20abbQ3Jqn_oFQO61ex7P_lMTsg

ChangeLog
NEWS
ntpd/refclock_nmea.c

index 8b84850b452f31add02b5fdbeb584fb6b269799f..e1277c563f4fcecbb454780f0b229e947c7ecf2f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+1999-08-23  Harlan Stenn  <stenn@whimsy.udel.edu>
+
+       * ntpd/refclock_nmea.c: Patches for:
+        Trimble OEM Ace-II receiver. Low cost PCB with single 
+        voltage input, external active antenna and two serial 
+        ports with either NMEA and ITAPs output. Programmable
+        to be tuned for 'time' accuracy in fixed station config.
+       From: Nick Hibma <nick.hibma@jrc.it>
+
 1999-08-21  Harlan Stenn  <stenn@whimsy.udel.edu>
 
        * ntpd/ntp_config.c: Added listen_to_virtual_ips support (-L flag)
diff --git a/NEWS b/NEWS
index 9c0afe7dc72f30d7d52f91c1f214df7fff1ef3e8..a15146f9acb287e7b6df493bd8ebf0752f3be381 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,4 @@
+* Trimble OEM Ace-II support
 (4.0.97)
 * NT patches
 * AIX,SunOS,IRIX portability
index ce11d49ad6e88c18b4dbb75dc34e8cb90a69b25d..72ebeac5eeebb79a0dd7996d02743f0027041089 100644 (file)
@@ -198,14 +198,19 @@ nmea_receive(
         * we only care about a few of them.  The most important being
         * the $GPRMC format
         * $GPRMC,hhmmss,a,fddmm.xx,n,dddmmm.xx,w,zz.z,yyy.,ddmmyy,dd,v*CC
+        * $GPGGA,162617.0,4548.339,N,00837.719,E,1,07,0.97,00262,M,048,M,,*5D
         */
 #define GPRMC  0
 #define GPXXX  1
+#define GPGCA  2
        cp = pp->a_lastcode;
        cmdtype=0;
        if(strncmp(cp,"$GPRMC",6)==0) {
                cmdtype=GPRMC;
        }
+       else if(strncmp(cp,"$GPGGA",6)==0) {
+               cmdtype=GPGCA;
+       }
        else if(strncmp(cp,"$GPXXX",6)==0) {
                cmdtype=GPXXX;
        }
@@ -214,6 +219,7 @@ nmea_receive(
 
        switch( cmdtype ) {
            case GPRMC:
+           case GPGCA:
                /*
                 *      Check time code format of NMEA
                 */
@@ -246,6 +252,14 @@ nmea_receive(
 
        }
 
+       if (cmdtype ==GPGCA) {
+               /* only time */
+               time_t tt = time(NULL);
+               struct tm * t = gmtime(&tt);
+               day = t->tm_mday;
+               month = t->tm_mon + 1;
+               pp->year= t->tm_year;
+       } else {
        dp = field_parse(cp,9);
        /*
         * Convert date and check values.
@@ -256,6 +270,7 @@ nmea_receive(
        month = (month * 10) + dp[3] - '0';
        pp->year = dp[4] - '0';
        pp->year = (pp->year * 10) + dp[5] - '0';
+       }
 
        if (month < 1 || month > 12 || day < 1) {
                refclock_report(peer, CEVNT_BADTIME);