Copyright Notice
- [INLINE] "Clone me," says Dolly sheepishly
+ [Dolly the sheep] "Clone me," says Dolly sheepishly
_________________________________________________________________
The following copyright notice applies to all files collectively
4. [5]Karl Berry <karl@owl.HQ.ileaf.com> syslog to file option
5. [6]Greg Brackley <greg.brackley@bigfoot.com> Major rework of WINNT
port. Clean up recvbuf and iosignal code into separate modules.
- 6. [7]Piete Brooks <Piete.Brooks@cl.cam.ac.uk> MSF clock driver,
+ 6. [7]Marc Brett <Marc.Brett@westgeo.com> Magnavox GPS clock driver
+ 7. [8]Piete Brooks <Piete.Brooks@cl.cam.ac.uk> MSF clock driver,
Trimble PARSE support
- 7. [8]Steve Clift <clift@ml.csiro.au> OMEGA clock driver
- 8. [9]Casey Crellin <casey@csc.co.za> vxWorks (Tornado) port and help
- with target configuration
- 9. [10]Sven Dietrich <sven_dietrich@trimble.com> Palisade reference
+ 8. [9]Steve Clift <clift@ml.csiro.au> OMEGA clock driver
+ 9. [10]Casey Crellin <casey@csc.co.za> vxWorks (Tornado) port and
+ help with target configuration
+ 10. [11]Sven Dietrich <sven_dietrich@trimble.com> Palisade reference
clock driver, NT adj. residuals, integrated Greg's Winnt port.
- 10. [11]John A. Dundas III <dundas@salt.jpl.nasa.gov> Apple A/UX port
- 11. [12]Torsten Duwe <duwe@immd4.informatik.uni-erlangen.de> Linux
+ 11. [12]John A. Dundas III <dundas@salt.jpl.nasa.gov> Apple A/UX port
+ 12. [13]Torsten Duwe <duwe@immd4.informatik.uni-erlangen.de> Linux
port
- 12. [13]Dennis Ferguson <dennis@mrbill.canet.ca> foundation code for
+ 13. [14]Dennis Ferguson <dennis@mrbill.canet.ca> foundation code for
NTP Version 2 as specified in RFC-1119
- 13. [14]Glenn Hollinger <glenn@herald.usask.ca> GOES clock driver
- 14. [15]Mike Iglesias <iglesias@uci.edu> DEC Alpha port
- 15. [16]Jim Jagielski <jim@jagubox.gsfc.nasa.gov> A/UX port
- 16. [17]Jeff Johnson <jbj@chatham.usdesign.com> massive prototyping
+ 14. [15]Glenn Hollinger <glenn@herald.usask.ca> GOES clock driver
+ 15. [16]Mike Iglesias <iglesias@uci.edu> DEC Alpha port
+ 16. [17]Jim Jagielski <jim@jagubox.gsfc.nasa.gov> A/UX port
+ 17. [18]Jeff Johnson <jbj@chatham.usdesign.com> massive prototyping
overhaul
- 17. [18]William L. Jones <jones@hermes.chpc.utexas.edu> RS/6000 AIX
+ 18. [19]William L. Jones <jones@hermes.chpc.utexas.edu> RS/6000 AIX
modifications, HPUX modifications
- 18. [19]Hans Lambermont <Hans.Lambermont@nl.origin-it.com> or
- [20]<H.Lambermont@chello.nl> ntpsweep
- 19. [21]Frank Kardel [22]<Frank.Kardel@informatik.uni-erlangen.de>
+ 19. [20]Hans Lambermont <Hans.Lambermont@nl.origin-it.com> or
+ [21]<H.Lambermont@chello.nl> ntpsweep
+ 20. [22]Frank Kardel [23]<Frank.Kardel@informatik.uni-erlangen.de>
PARSE <GENERIC> driver (14 reference clocks), STREAMS modules for
PARSE, support scripts, syslog cleanup
- 20. [23]Dave Katz <dkatz@cisco.com> RS/6000 AIX port
- 21. [24]Craig Leres <leres@ee.lbl.gov> 4.4BSD port, ppsclock,
- Maganavox GPS clock driver
- 22. [25]George Lindholm <lindholm@ucs.ubc.ca> SunOS 5.1 port
- 23. [26]Louis A. Mamakos <louie@ni.umd.edu> MD5-based authentication
- 24. [27]Lars H. Mathiesen <thorinn@diku.dk> adaptation of foundation
+ 21. [24]Dave Katz <dkatz@cisco.com> RS/6000 AIX port
+ 22. [25]Craig Leres <leres@ee.lbl.gov> 4.4BSD port, ppsclock, Magnavox
+ GPS clock driver
+ 23. [26]George Lindholm <lindholm@ucs.ubc.ca> SunOS 5.1 port
+ 24. [27]Louis A. Mamakos <louie@ni.umd.edu> MD5-based authentication
+ 25. [28]Lars H. Mathiesen <thorinn@diku.dk> adaptation of foundation
code for Version 3 as specified in RFC-1305
- 25. [28]David L. Mills <mills@udel.edu> Version 4 foundation: clock
+ 26. [29]David L. Mills <mills@udel.edu> Version 4 foundation: clock
discipline, authentication, precision kernel; clock drivers:
Spectracom, Austron, Arbiter, Heath, ATOM, ACTS, KSI/Odetics;
audio clock drivers: CHU, WWV/H, IRIG
- 26. [29]Wolfgang Moeller <moeller@gwdgv1.dnet.gwdg.de> VMS port
- 27. [30]Jeffrey Mogul <mogul@pa.dec.com> ntptrace utility
- 28. [31]Tom Moore <tmoore@fievel.daytonoh.ncr.com> i386 svr4 port
- 29. [32]Kamal A Mostafa <kamal@whence.com> SCO OpenServer port
- 30. [33]Derek Mulcahy <derek@toybox.demon.co.uk> and [34]Damon
+ 27. [30]Wolfgang Moeller <moeller@gwdgv1.dnet.gwdg.de> VMS port
+ 28. [31]Jeffrey Mogul <mogul@pa.dec.com> ntptrace utility
+ 29. [32]Tom Moore <tmoore@fievel.daytonoh.ncr.com> i386 svr4 port
+ 30. [33]Kamal A Mostafa <kamal@whence.com> SCO OpenServer port
+ 31. [34]Derek Mulcahy <derek@toybox.demon.co.uk> and [35]Damon
Hart-Davis <d@hd.org> ARCRON MSF clock driver
- 31. [35]Rainer Pruy <Rainer.Pruy@informatik.uni-erlangen.de>
+ 32. [36]Rainer Pruy <Rainer.Pruy@informatik.uni-erlangen.de>
monitoring/trap scripts, statistics file handling
- 32. [36]Dirce Richards <dirce@zk3.dec.com> Digital UNIX V4.0 port
- 33. [37]Wilfredo Sánchez <wsanchez@apple.com> added support for
+ 33. [37]Dirce Richards <dirce@zk3.dec.com> Digital UNIX V4.0 port
+ 34. [38]Wilfredo Sánchez <wsanchez@apple.com> added support for
NetInfo
- 34. [38]Nick Sayer <mrapple@quack.kfu.com> SunOS streams modules
- 35. [39]Jack Sasportas <jack@innovativeinternet.com> Saved a Lot of
+ 35. [39]Nick Sayer <mrapple@quack.kfu.com> SunOS streams modules
+ 36. [40]Jack Sasportas <jack@innovativeinternet.com> Saved a Lot of
space on the stuff in the html/pic/ subdirectory
- 36. [40]Ray Schnitzler <schnitz@unipress.com> Unixware1 port
- 37. [41]Michael Shields <shields@tembel.org> USNO clock driver
- 38. [42]Jeff Steinman <jss@pebbles.jpl.nasa.gov> Datum PTS clock
+ 37. [41]Ray Schnitzler <schnitz@unipress.com> Unixware1 port
+ 38. [42]Michael Shields <shields@tembel.org> USNO clock driver
+ 39. [43]Jeff Steinman <jss@pebbles.jpl.nasa.gov> Datum PTS clock
driver
- 39. [43]Harlan Stenn <harlan@pfcs.com> GNU automake/autoconfigure
+ 40. [44]Harlan Stenn <harlan@pfcs.com> GNU automake/autoconfigure
makeover, various other bits (see the ChangeLog)
- 40. [44]Kenneth Stone <ken@sdd.hp.com> HP-UX port
- 41. [45]Ajit Thyagarajan <ajit@ee.udel.edu>IP multicast/anycast
+ 41. [45]Kenneth Stone <ken@sdd.hp.com> HP-UX port
+ 42. [46]Ajit Thyagarajan <ajit@ee.udel.edu>IP multicast/anycast
support
- 42. [46]Tomoaki TSURUOKA <tsuruoka@nc.fukuoka-u.ac.jp>TRAK clock
+ 43. [47]Tomoaki TSURUOKA <tsuruoka@nc.fukuoka-u.ac.jp>TRAK clock
driver
- 43. [47]Paul A Vixie <vixie@vix.com> TrueTime GPS driver, generic
+ 44. [48]Paul A Vixie <vixie@vix.com> TrueTime GPS driver, generic
TrueTime clock driver
- 44. [48]Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> corrected and
+ 45. [49]Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> corrected and
validated HTML documents according to the HTML DTD
_________________________________________________________________
- [49][LINK]
+ [50]Home
- [50]David L. Mills <mills@udel.edu>
+ [51]David L. Mills <mills@udel.edu>
References
4. mailto:michael.barone@lmco.com
5. mailto:karl@owl.HQ.ileaf.com
6. mailto:greg.brackley@bigfoot.com
- 7. mailto:Piete.Brooks@cl.cam.ac.uk
- 8. mailto:clift@ml.csiro.au
- 9. mailto:casey@csc.co.za
- 10. mailto:Sven_Dietrich@trimble.COM
- 11. mailto:dundas@salt.jpl.nasa.gov
- 12. mailto:duwe@immd4.informatik.uni-erlangen.de
- 13. mailto:dennis@mrbill.canet.ca
- 14. mailto:glenn@herald.usask.ca
- 15. mailto:iglesias@uci.edu
- 16. mailto:jagubox.gsfc.nasa.gov
- 17. mailto:jbj@chatham.usdesign.com
- 18. mailto:jones@hermes.chpc.utexas.edu
- 19. mailto:Hans.Lambermont@nl.origin-it.com
- 20. mailto:H.Lambermont@chello.nl
- 21. http://www4.informatik.uni-erlangen.de/~kardel
- 22. mailto:Frank.Kardel@informatik.uni-erlangen.de
- 23. mailto:dkatz@cisco.com
- 24. mailto:leres@ee.lbl.gov
- 25. mailto:lindholm@ucs.ubc.ca
- 26. mailto:louie@ni.umd.edu
- 27. mailto:thorinn@diku.dk
- 28. mailto:mills@udel.edu
- 29. mailto:moeller@gwdgv1.dnet.gwdg.de
- 30. mailto:mogul@pa.dec.com
- 31. mailto:tmoore@fievel.daytonoh.ncr.com
- 32. mailto:kamal@whence.com
- 33. mailto:derek@toybox.demon.co.uk
- 34. mailto:d@hd.org
- 35. mailto:Rainer.Pruy@informatik.uni-erlangen.de
- 36. mailto:dirce@zk3.dec.com
- 37. mailto:wsanchez@apple.com
- 38. mailto:mrapple@quack.kfu.com
- 39. mailto:jack@innovativeinternet.com
- 40. mailto:schnitz@unipress.com
- 41. mailto:shields@tembel.org
- 42. mailto:pebbles.jpl.nasa.gov
- 43. mailto:harlan@pfcs.com
- 44. mailto:ken@sdd.hp.com
- 45. mailto:ajit@ee.udel.edu
- 46. mailto:tsuruoka@nc.fukuoka-u.ac.jp
- 47. mailto:vixie@vix.com
- 48. mailto:Ulrich.Windl@rz.uni-regensburg.de
- 49. file://localhost/backroom/ntp4/html/index.htm
- 50. mailto:mills@udel.edu
+ 7. mailto:Marc.Brett@westgeo.com
+ 8. mailto:Piete.Brooks@cl.cam.ac.uk
+ 9. mailto:clift@ml.csiro.au
+ 10. mailto:casey@csc.co.za
+ 11. mailto:Sven_Dietrich@trimble.COM
+ 12. mailto:dundas@salt.jpl.nasa.gov
+ 13. mailto:duwe@immd4.informatik.uni-erlangen.de
+ 14. mailto:dennis@mrbill.canet.ca
+ 15. mailto:glenn@herald.usask.ca
+ 16. mailto:iglesias@uci.edu
+ 17. mailto:jagubox.gsfc.nasa.gov
+ 18. mailto:jbj@chatham.usdesign.com
+ 19. mailto:jones@hermes.chpc.utexas.edu
+ 20. mailto:Hans.Lambermont@nl.origin-it.com
+ 21. mailto:H.Lambermont@chello.nl
+ 22. http://www4.informatik.uni-erlangen.de/~kardel
+ 23. mailto:Frank.Kardel@informatik.uni-erlangen.de
+ 24. mailto:dkatz@cisco.com
+ 25. mailto:leres@ee.lbl.gov
+ 26. mailto:lindholm@ucs.ubc.ca
+ 27. mailto:louie@ni.umd.edu
+ 28. mailto:thorinn@diku.dk
+ 29. mailto:mills@udel.edu
+ 30. mailto:moeller@gwdgv1.dnet.gwdg.de
+ 31. mailto:mogul@pa.dec.com
+ 32. mailto:tmoore@fievel.daytonoh.ncr.com
+ 33. mailto:kamal@whence.com
+ 34. mailto:derek@toybox.demon.co.uk
+ 35. mailto:d@hd.org
+ 36. mailto:Rainer.Pruy@informatik.uni-erlangen.de
+ 37. mailto:dirce@zk3.dec.com
+ 38. mailto:wsanchez@apple.com
+ 39. mailto:mrapple@quack.kfu.com
+ 40. mailto:jack@innovativeinternet.com
+ 41. mailto:schnitz@unipress.com
+ 42. mailto:shields@tembel.org
+ 43. mailto:pebbles.jpl.nasa.gov
+ 44. mailto:harlan@pfcs.com
+ 45. mailto:ken@sdd.hp.com
+ 46. mailto:ajit@ee.udel.edu
+ 47. mailto:tsuruoka@nc.fukuoka-u.ac.jp
+ 48. mailto:vixie@vix.com
+ 49. mailto:Ulrich.Windl@rz.uni-regensburg.de
+ 50. file://localhost/backroom/ntp4/html/index.htm
+ 51. mailto:mills@udel.edu
2000-02-17 Harlan Stenn <stenn@whimsy.udel.edu>
+ * ntpd/refclock_mx4200.c: Remove the DOP-weighted position
+ averaging code and revert to a simple mean average. The weighted
+ average consistently produced a *worse* result. Go figure.
+ * html/mx4200data.htm: Cleanup, reflect current reality.
+ * html/driver9.htm: Cleanup, reflect current reality.
+ * html/copyright.htm: Cleanup, and credit where credit is due.
+ From: Marc.Brett@westgeo.com
+
* ntpd/refclock_oncore.c: Cleanup/fixes
* html/driver30.htm: Cleanup
* html/Oncore-SHMEM.htm: Cleanup
-<html><head><title>
-Copyright Notice
-</title></head><body><h3>
-Copyright Notice
-</h3>
+<html><head>
+<title>Copyright Notice</title>
+</head>
+<body>
-<IMG align=left HEIGHT=264 WIDTH=206 SRC=pic/sheepb.jpg >"Clone
+<h3>Copyright Notice</h3>
+
+<IMG align=left HEIGHT=264 WIDTH=206 SRC="pic/sheepb.jpg" ALT="[Dolly the sheep]">"Clone
me," says Dolly sheepishly
<br clear=left><hr>
<greg.brackley@bigfoot.com></a> Major rework of WINNT port. Clean
up recvbuf and iosignal code into separate modules.</LI>
+<LI><A HREF="mailto: Marc.Brett@westgeo.com">Marc Brett
+<Marc.Brett@westgeo.com></a> Magnavox GPS clock driver</LI>
+
<LI><A HREF="mailto: Piete.Brooks@cl.cam.ac.uk">Piete Brooks
<Piete.Brooks@cl.cam.ac.uk></a> MSF clock driver, Trimble PARSE
support</LI>
<dkatz@cisco.com></a> RS/6000 AIX port</LI>
<LI><A HREF="mailto: leres@ee.lbl.gov">Craig Leres
-<leres@ee.lbl.gov></a> 4.4BSD port, ppsclock, Maganavox GPS clock
+<leres@ee.lbl.gov></a> 4.4BSD port, ppsclock, Magnavox GPS clock
driver</LI>
<LI><A HREF="mailto: lindholm@ucs.ubc.ca">George Lindholm
</OL>
-<hr><a href=index.htm><img align=left src=pic/home.gif></a><address><a
-href=mailto:mills@udel.edu> David L. Mills <mills@udel.edu></a>
-</address></a></body></html>
+<hr>
+<a href=index.htm><img align=left src="pic/home.gif"
+WIDTH=36 HEIGHT=24 ALT="Home"></a>
+<address>
+<a href="mailto:mills@udel.edu">David L. Mills <mills@udel.edu></a>
+</address>
+</body>
+</html>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="GENERATOR" CONTENT="Mozilla/4.01 [en] (Win95; I) [Netscape]">
- <TITLE>Magnavox MX4200 GPS Receiver
-</TITLE>
+ <TITLE>Magnavox MX4200 GPS Receiver</TITLE>
</HEAD>
<BODY>
-<H3>
-Magnavox MX4200 GPS Receiver</H3>
+<H3>Magnavox MX4200 GPS Receiver</H3>
<HR>
-<H4>
-Synopsis</H4>
+<H4>Synopsis</H4>
Address: 127.127.9.<I>u</I>
<BR>Reference ID: <TT>GPS</TT>
<BR>Driver ID: <TT>GPS_MX4200</TT>
<BR>Serial Port: <TT>/dev/gps<I>u</I></TT>; 4800 baud, 8-bits, no parity
<BR>Features: <TT>ppsclock</TT> (required)
-<H4>
-Description</H4>
+
+<H4>Description</H4>
This driver supports the Magnavox MX4200 Navigation Receiver adapted to
precision timing applications. It requires the <TT>ppsclock</TT> line
discipline or streams module described in the <A HREF="ldisc.htm">Line
MX4200, MX4200D, and the 12-channel MX9212, MX9012R, MX9112.
<P>
-<A HREF="http://www.leica-gps.com/">
-<IMG SRC="pic/9400n.jpg" ALT="Leica MX9400N Navigator" ALIGN=LEFT></A>
+<A HREF="http://www.leica-gps.com/"><IMG align=left HEIGHT=143 WIDTH=180
+SRC="pic/9400n.jpg" ALT="Leica MX9400N Navigator"></A>
+
<A HREF="http://www.leica-gps.com/">Leica Geosystems</A> acquired
the Magnavox commercial GPS technology business in February of 1994.
They now market and support former Magnavox GPS products such as the
<P>
-<H4>
-Operating Modes</H4>
+<H4>Operating Modes</H4>
This driver supports two modes of operation, static and mobile, controlled
by clock flag 2.
<P>In static mode (the default) the driver assumes that the GPS antenna
is in a fixed location. The receiver is initially placed in a "Static,
-3D Nav" mode, where latitude, longitude, elevation and time are calculated
-for a fixed station. A DOP-weighted running average position is calculated
-from this data. After 24 hours, the receiver is placed into a "Known Position"
-mode, initialized with the calculated position, and then solves only for
-time.
+3D Nav" mode, where latitude, longitude, elevation and time are
+calculated for a fixed station. An average position is calculated from
+this data. After 24 hours, the receiver is placed into a "Known
+Position" mode, initialized with the calculated position, and then
+solves only for time.
<P>In mobile mode, the driver assumes the GPS antenna is mounted on a moving
platform such as a car, ship, or aircraft. The receiver is placed in "Dynamic,
3D Nav" mode and solves for position, altitude and time while moving. No
position averaging is performed.
-<H4>
-Monitor Data</H4>
+
+<H4>Monitor Data</H4>
The driver writes each timecode as received to the <TT>clockstats</TT>
file. Documentation for the <CITE>NMEA-0183</CITE> proprietary
sentences produced by the MX4200 can be found in
<A HREF="mx4200data.htm">MX4200 Receiver Data Format</A>.
-<H4>
-Fudge Factors</H4>
+<H4>Fudge Factors</H4>
<DL>
<DT>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML Strict//EN">
<HTML>
<HEAD>
-<TITLE>MX4200 Receiver Data Format</TITLE>
+ <TITLE>MX4200 Receiver Data Format</TITLE>
+</HEAD>
<BODY>
<h1>MX4200 Receiver Data Format</h1>
<ul>
<li><a href="#control">Control Port Sentences</a></li>
- <li><a href="#input">Control Port Input Sentences</a>
+ <li><a href="#input">Control Port Input Sentences</a></li>
<ul>
- <li> <a href="#input_000">$PMVXG,000</a> Initialization/Mode Control - Part A</li>
- <li> <a href="#input_001">$PMVXG,001</a> Initialization/Mode Control - Part B</li>
- <li> <a href="#input_007">$PMVXG,007</a> Control Port Configuration</li>
- <li> <a href="#input_023">$PMVXG,023</a> Time Recovery Configuration</li>
- <li> <a href="#input_gpq">$CDGPQ,YYY</a> Query From a Remote Device / Request to Output a Sentence</li>
+ <li><a href="#input_000">$PMVXG,000</a> Initialization/Mode Control - Part A</li>
+ <li><a href="#input_001">$PMVXG,001</a> Initialization/Mode Control - Part B</li>
+ <li><a href="#input_007">$PMVXG,007</a> Control Port Configuration</li>
+ <li><a href="#input_023">$PMVXG,023</a> Time Recovery Configuration</li>
+ <li><a href="#input_gpq">$CDGPQ,YYY</a> Query From a Remote Device / Request to Output a Sentence</li>
</ul>
- <li><a href="#output">Control Port Output Sentences</a>
+ <li><a href="#output">Control Port Output Sentences</a></li>
<ul>
- <li> <a href="#output_000">$PMVXG,000</a> Receiver Status
- <li> <a href="#output_021">$PMVXG,021</a> Position, Height, Velocity
- <li> <a href="#output_022">$PMVXG,022</a> DOPs
- <li> <a href="#output_030">$PMVXG,030</a> Software Configuration
- <li> <a href="#output_101">$PMVXG,101</a> Control Sentence Accept/Reject
- <li> <a href="#output_523">$PMVXG,523</a> Time Recovery Configuration
- <li> <a href="#output_830">$PMVXG,830</a> Time Recovery Results
+ <li><a href="#output_000">$PMVXG,000</a> Receiver Status</li>
+ <li><a href="#output_021">$PMVXG,021</a> Position, Height, Velocity</li>
+ <li><a href="#output_022">$PMVXG,022</a> DOPs</li>
+ <li><a href="#output_030">$PMVXG,030</a> Software Configuration</li>
+ <li><a href="#output_101">$PMVXG,101</a> Control Sentence Accept/Reject</li>
+ <li><a href="#output_523">$PMVXG,523</a> Time Recovery Configuration</li>
+ <li><a href="#output_830">$PMVXG,830</a> Time Recovery Results</li>
</ul>
</ul>
the receiver. The structure of the control port sentences is based on
the <cite>NMEA-0183</cite> Standard for Interfacing Marine Electronics
Navigation Devices (version 1.5). For more details, please refer to
-the <cite>NMEA-0183</cite> Specification available from the <a
-href="http://www.nmea.org/"> National Marine Electronics
+the <cite>NMEA-0183</cite> Specification available from the
+<a href="http://www.nmea.org/">National Marine Electronics
Association</a>.</p>
<p>Reserved characters are used to indicate the beginning and the end
illustrates the general Magnavox proprietary NMEA sentence format.
</p>
-<h4><a name="table_1">Table 1. Magnavox Proprietary NMEA Sentence
-Format</a></h4>
-
-<p>
+<h4><a name="table_1">Table 1. Magnavox Proprietary NMEA Sentence Format</a></h4>
<code>
$PMVXG,XXX,...................*CK
</code>
<p>
<table border>
<tr> <th>Field <th>Description <th>Units <th>Format <th>Default <th>Range
- <tr> <td>1 <td>Day <td> <td>Int <td> <td>1-31
- <tr> <td>2 <td>Month <td> <td>Int <td> <td>1-12
- <tr> <td>3 <td>Year <td> <td>Int <td> <td>1991-9999
- <tr> <td>4 <td>GMT Time <td>HHMMSS <td>Int <td> <td>000000-235959
+ <tr> <td>1 <td>Day <td>  <td>Int <td>  <td>1-31
+ <tr> <td>2 <td>Month <td>  <td>Int <td>  <td>1-12
+ <tr> <td>3 <td>Year <td>  <td>Int <td>  <td>1991-9999
+ <tr> <td>4 <td>GMT Time <td>HHMMSS <td>Int <td>  <td>000000-235959
<tr> <td>5 <td>WGS-84 Latitude <td>DDMM.MMMM<td>Float<td>0.0 <td>0 - 8959.9999
- <tr> <td>6 <td>North/South Indicator <td> <td>Char <td>N <td>N,S
+ <tr> <td>6 <td>North/South Indicator <td>  <td>Char <td>N <td>N,S
<tr> <td>7 <td>WGS-84 Longitude <td>DDDMM.MMMM<td>Float<td>0.0 <td>0 - 17959.9999
- <tr> <td>8 <td>East/West Indicator <td> <td>Char <td>E <td>E,W
+ <tr> <td>8 <td>East/West Indicator <td>  <td>Char <td>E <td>E,W
<tr> <td>9 <td>Altitude (height above Mean Sea Level) in meters (WGS-84) <td>Meters<td>Float<td>0.0<td>+/-99999.0
- <tr> <td>10 <td>Not Used <td> <td> <td> <td>
+ <tr> <td>10 <td>Not Used <td>  <td>  <td>  <td> 
</table>
Example:<br>
<code>$PMVXG,000,,,,,,,,,,*48</code><br>
<p>
<table border>
<tr> <th>Field <th>Description <th>Units <th>Format <th>Default <th>Range
- <tr> <td>*1 <td>Constrain Altitude <td> <td>Int <td>1 <td>0=3D Only<br>1=Auto<br>2=2D Only
- <tr> <td>2 <td>Not Used <td> <td> <td> <td>
+ <tr> <td>*1 <td>Constrain Altitude <td>  <td>Int <td>1 <td>0=3D Only<br>1=Auto<br>2=2D Only
+ <tr> <td>2 <td>Not Used <td>  <td> <td>  <td> 
<tr> <td>*3 <td>Horizontal Acceleration Factor<td>m/sec^2 <td>Float <td>1.0 <td>0.5-10.0
- <tr> <td>*4 <td>Not Used <td> <td> <td> <td>
- <tr> <td>*5 <td>VDOP Limit <td> <td>Int <td>10 <td>1-9999
- <tr> <td>*6 <td>HDOP Limit <td> <td>Int <td>10 <td>1-9999
+ <tr> <td>*4 <td>Not Used <td>  <td> <td>  <td> 
+ <tr> <td>*5 <td>VDOP Limit <td>  <td>Int <td>10 <td>1-9999
+ <tr> <td>*6 <td>HDOP Limit <td>  <td>Int <td>10 <td>1-9999
<tr> <td>7 <td>Elevation Limit <td>Deg <td>Int <td>5 <td>0-90
- <tr> <td>8 <td>Time Output Mode <td> <td>Char <td>U <td>U=UTC<br>L=Local Time
+ <tr> <td>8 <td>Time Output Mode <td>  <td>Char <td>U <td>U=UTC<br>L=Local Time
<tr> <td>9 <td>Local Time Offset <td>HHMM <td>Int <td>0 <td>+/- 0-2359
</table>
Example:<br>
<p>
<table border>
<tr> <th>Field <th>Description <th>Units <th>Format <th>Default <th>Range
- <tr> <td>1 <td>Control Port Output Block Label<td> <td>Char <td> <td>
- <tr> <td>2 <td>Clear Current Output List<td> <td>Int <td> <td>0=No<br>1=Yes
- <tr> <td>3 <td>Add/Delete Sentence from List<td> <td>Int <td> <td>1=Append<br>2=Delete
- <tr> <td>4 <td>Not Used <td> <td> <td> <td>
- <tr> <td>5 <td>Sentence Output Rate <td>Sec <td>Int <td> <td>1-9999
- <tr> <td>6 <td># digits of Precision for CGA and GLL sentences<td> <td>Int <td>2 <td>2-4
- <tr> <td>7 <td>Not Used <td> <td> <td> <td>
- <tr> <td>8 <td>Not Used <td> <td> <td> <td>
+ <tr> <td>1 <td>Control Port Output Block Label<td> <td>Char <td>  <td> 
+ <tr> <td>2 <td>Clear Current Output List<td> <td>Int <td>  <td>0=No<br>1=Yes
+ <tr> <td>3 <td>Add/Delete Sentence from List<td> <td>Int <td>  <td>1=Append<br>2=Delete
+ <tr> <td>4 <td>Not Used <td>  <td>  <td>  <td> 
+ <tr> <td>5 <td>Sentence Output Rate <td>Sec <td>Int <td>  <td>1-9999
+ <tr> <td>6 <td># digits of Precision for CGA and GLL sentences<td>  <td>Int <td>2 <td>2-4
+ <tr> <td>7 <td>Not Used <td>  <td>  <td>  <td> 
+ <tr> <td>8 <td>Not Used <td>  <td>  <td>  <td> 
</table>
Example:<br>
<code>$PMVXG,007,022,0,1,,1,,,*4F</code>
<p>
<table border>
<tr> <th>Field <th>Description <th>Units <th>Format <th>Default <th>Range
- <tr> <td>*1 <td>Time Recovery Mode <td> <td>Char <td>D <td>D=Dynamic<br>S=Static<br>K=Known Position<br>N=No Time Recovery
- <tr> <td>2 <td>Time Synchronization <td> <td>Char <td>G <td>U=UTC<br>G=GPS
- <tr> <td>3 <td>Time Mark Mode <td> <td>Char <td>A <td>A=Always<br>V=Valid Pulses Only
+ <tr> <td>*1 <td>Time Recovery Mode <td>  <td>Char <td>D <td>D=Dynamic<br>S=Static<br>K=Known Position<br>N=No Time Recovery
+ <tr> <td>2 <td>Time Synchronization <td>  <td>Char <td>G <td>U=UTC<br>G=GPS
+ <tr> <td>3 <td>Time Mark Mode <td>  <td>Char <td>A <td>A=Always<br>V=Valid Pulses Only
<tr> <td>4 <td>Maximum Time Error <td>Nsec <td>Int <td>100 <td>50-1000
<tr> <td>5 <td>User Time Bias <td>Nsec <td>Int <td>0 <td>+/- 99999
- <tr> <td>6 <td>ASCII Time Message Control<td> <td>Int <td>0 <td>0=No Output<br>1=830 to Control Port<br>2=830 to Equipment Port
- <tr> <td>7 <td>Known Pos PRN <td> <td>Int <td>0 <td>1-32<br>0=Track All Sats
+ <tr> <td>6 <td>ASCII Time Message Control<td> <td>Int <td>0 <td>0=No Output<br>1=830 to Control Port<br>2=830 to Equipment Port
+ <tr> <td>7 <td>Known Pos PRN <td>  <td>Int <td>0 <td>1-32<br>0=Track All Sats
</table>
Example:<br>
<code>$PMVXG,023,S,U,A,500,0,1,*16</code>
<p>
<table border>
<tr> <th>Field <th>Description <th>Units <th>Format <th>Default <th>Range
- <tr> <td>1:CD <td>ID of Remote Device <td> <td>Char <td> <td>(See <cite>NMEA-0183</cite>)
- <tr> <td>2:GP <td>GPS <td> <td>Char <td> <td>(See <cite>NMEA-0183</cite>)
- <tr> <td>3:Q <td>Query <td> <td>Char <td> <td>(See <cite>NMEA-0183</cite>)
- <tr> <td>4:YYY <td>Label of Desired Sentence<td> <td>Char <td> <td>Any Valid NMEA or Magnavox Sentence Type
+ <tr> <td>1:CD <td>ID of Remote Device <td>  <td>Char <td>  <td>(See <cite>NMEA-0183</cite>)
+ <tr> <td>2:GP <td>GPS <td>  <td>Char <td>  <td>(See <cite>NMEA-0183</cite>)
+ <tr> <td>3:Q <td>Query <td>  <td>Char <td>  <td>(See <cite>NMEA-0183</cite>)
+ <tr> <td>4:YYY <td>Label of Desired Sentence<td> <td>Char <td>  <td>Any Valid NMEA or Magnavox Sentence Type
</table>
Example:<br>
<code>$CDGPQ,030*5E</code>
<p>
<table border>
<tr> <th>Field <th>Description <th>Units <th>Format <th>Range
- <tr> <td>1 <td>Current Receiver Status <td> <td>Char <td>ACQ=Reacquisition<br>ALT=Constellation Selection<br>IAC=Initial Acquisition<br>IDL=Idle, No Satellites<br>NAV=Navigating<br>STS=Search The Sky<br>TRK=Tracking
- <tr> <td>2 <td>Number of Satellites that should be Visible <td> <td>Int <td>0-12
- <tr> <td>3 <td>Number of Satellites being Tracked <td> <td>Int <td>0-12
+ <tr> <td>1 <td>Current Receiver Status <td>  <td>Char <td>ACQ=Reacquisition<br>ALT=Constellation Selection<br>IAC=Initial Acquisition<br>IDL=Idle, No Satellites<br>NAV=Navigating<br>STS=Search The Sky<br>TRK=Tracking
+ <tr> <td>2 <td>Number of Satellites that should be Visible <td> <td>Int <td>0-12
+ <tr> <td>3 <td>Number of Satellites being Tracked <td>  <td>Int <td>0-12
<tr> <td>4 <td>Time since Last Navigation <td>HHMM <td>Int <td>0-2359
- <tr> <td>5 <td>Initialization Status <td> <td>Int <td>0=Waiting for Initialization<br>1=Initialization Complete
+ <tr> <td>5 <td>Initialization Status <td>  <td>Int <td>0=Waiting for Initialization<br>1=Initialization Complete
</table>
Example:<br>
<code>$PMVXG,000,TRK,3,3,0122,1*19</code>
<tr> <th>Field <th>Description <th>Units <th>Format <th>Range
<tr> <td>1 <td>UTC Measurement Time <td>Seconds into the week<td>Float<td>0-604800.00
<tr> <td>2 <td>WGS-84 Latitude <td>DDMM.MMMM<td>Float <td>0-89.9999
- <tr> <td>3 <td>North/South Indicator <td> <td>Char <td>N, S
+ <tr> <td>3 <td>North/South Indicator <td>  <td>Char <td>N, S
<tr> <td>4 <td>WGS-84 Longitude <td>DDDMM.MMMM <td>Float <td>0-179.9999
- <tr> <td>5 <td>East/West Indicator <td> <td>Char <td>E, W
- <tr> <td>6 <td>Altitude (MSL) <td>Meters <td>Float <td>
- <tr> <td>7 <td>Geoidal Height <td>Meters <td>Float <td>
- <tr> <td>8 <td>Velocity East <td>M/Sec <td>Float <td>
- <tr> <td>9 <td>Velocity North <td>M/Sec <td>Float <td>
- <tr> <td>10 <td>Navigation Mode <td> <td>Int <td><em>Navigating</em><br>
+ <tr> <td>5 <td>East/West Indicator <td>  <td>Char <td>E, W
+ <tr> <td>6 <td>Altitude (MSL) <td>Meters <td>Float <td> 
+ <tr> <td>7 <td>Geoidal Height <td>Meters <td>Float <td> 
+ <tr> <td>8 <td>Velocity East <td>M/Sec <td>Float <td> 
+ <tr> <td>9 <td>Velocity North <td>M/Sec <td>Float <td> 
+ <tr> <td>10 <td>Navigation Mode <td>  <td>Int <td><em>Navigating</em><br>
1=Position From a Remote Device<br>
2=2D<br>
3=3D<br>
<table border>
<tr> <th>Field <th>Description <th>Units <th>Format <th>Range
<tr> <td>1 <td>UTC Measurement Time <td>Seconds into the week<td>Float<td>0-604800.00
- <tr> <td>2 <td>East DOP (EDOP) <td> <td>Float <td>
- <tr> <td>3 <td>North DOP (NDOP) <td> <td>Float <td>
- <tr> <td>4 <td>Vertical DOP (VDOP) <td> <td>Float <td>
- <tr> <td>5 <td>PRN on Channel #1 <td> <td>Int <td>1-32
- <tr> <td>6 <td>PRN on Channel #2 <td> <td>Int <td>1-32
- <tr> <td>7 <td>PRN on Channel #3 <td> <td>Int <td>1-32
- <tr> <td>8 <td>PRN on Channel #4 <td> <td>Int <td>1-32
- <tr> <td>9 <td>PRN on Channel #5 <td> <td>Int <td>1-32
- <tr> <td>10 <td>PRN on Channel #6 <td> <td>Int <td>1-32
- <tr> <td>11 <td>PRN on Channel #7 <td> <td>Int <td>1-32
- <tr> <td>12 <td>PRN on Channel #8 <td> <td>Int <td>1-32
- <tr> <td>13 <td>PRN on Channel #9 <td> <td>Int <td>1-32
- <tr> <td>14 <td>PRN on Channel #10 <td> <td>Int <td>1-32
- <tr> <td>15 <td>PRN on Channel #11 <td> <td>Int <td>1-32
- <tr> <td>16 <td>PRN on Channel #12 <td> <td>Int <td>1-32
+ <tr> <td>2 <td>East DOP (EDOP) <td>  <td>Float <td> 
+ <tr> <td>3 <td>North DOP (NDOP) <td>  <td>Float <td> 
+ <tr> <td>4 <td>Vertical DOP (VDOP) <td>  <td>Float <td> 
+ <tr> <td>5 <td>PRN on Channel #1 <td>  <td>Int <td>1-32
+ <tr> <td>6 <td>PRN on Channel #2 <td>  <td>Int <td>1-32
+ <tr> <td>7 <td>PRN on Channel #3 <td>  <td>Int <td>1-32
+ <tr> <td>8 <td>PRN on Channel #4 <td>  <td>Int <td>1-32
+ <tr> <td>9 <td>PRN on Channel #5 <td>  <td>Int <td>1-32
+ <tr> <td>10 <td>PRN on Channel #6 <td>  <td>Int <td>1-32
+ <tr> <td>11 <td>PRN on Channel #7 <td>  <td>Int <td>1-32
+ <tr> <td>12 <td>PRN on Channel #8 <td>  <td>Int <td>1-32
+ <tr> <td>13 <td>PRN on Channel #9 <td>  <td>Int <td>1-32
+ <tr> <td>14 <td>PRN on Channel #10 <td>  <td>Int <td>1-32
+ <tr> <td>15 <td>PRN on Channel #11 <td>  <td>Int <td>1-32
+ <tr> <td>16 <td>PRN on Channel #12 <td>  <td>Int <td>1-32
</table>
Example:<br>
<code>$PMVXG,022,142243.00,00.7,00.8,01.9,27,26,10,09,13,23*77</code>
<p>
<table border>
<tr> <th>Field <th>Description <th>Units <th>Format <th>Range
- <tr> <td>1 <td>Nav Processor Version Number <td> <td>Char <td>
- <tr> <td>2 <td>Baseband Firmware Version Number <td> <td>Char <td>
+ <tr> <td>1 <td>Nav Processor Version Number <td>  <td>Char <td> 
+ <tr> <td>2 <td>Baseband Firmware Version Number <td>  <td>Char <td> 
</table>
Example:<br>
<code>$PMVXG,030,DA35,015</code>
<p>
<table border>
<tr> <th>Field <th>Description <th>Units <th>Format <th>Range
- <tr> <td>1 <td>Sentence ID <td> <td>Char <td>
- <tr> <td>2 <td>Accept/Reject Status <td> <td>Int <td>0=Sentence Accepted<br>
+ <tr> <td>1 <td>Sentence ID <td>  <td>Char <td> 
+ <tr> <td>2 <td>Accept/Reject Status <td>  <td>Int <td>0=Sentence Accepted<br>
1=Bad Checksum<br>
2=Illegal Value<br>
3=Unrecognized ID<br>
4=Wrong # of fields<br>
5=Required Data Field Missing<br>
6=Requested Sentence Unavailable
- <tr> <td>3 <td>Bad Field Index <td> <td>Int <td>
- <tr> <td>4 <td>Requested Sentence ID (If field #1 = GPQ) <td> <td>Char <td>
+ <tr> <td>3 <td>Bad Field Index <td>  <td>Int <td> 
+ <tr> <td>4 <td>Requested Sentence ID (If field #1 = GPQ) <td>  <td>Char <td> 
</table>
Example:<br>
<code>$PMVXG,101,GPQ,0,,030*0D</code>
<p>
<table border>
<tr> <th>Field <th>Description <th>Units <th>Format <th>Range
- <tr> <td>1 <td>Time Recovery Mode <td> <td>Char <td>D=Dynamic<br>S=Static<br>K=Known Position<br>N=No Time Recovery
- <tr> <td>2 <td>Time Synchronization <td> <td>Char <td>U=UTC Time<br>G=GPS Time
- <tr> <td>3 <td>Time Mark Mode <td> <td>Char <td>A=Always Output Time Pulse<br>V=Only when Valid
- <tr> <td>4 <td>Maximum Time Error for which a time mark will be considered valid <td>Nsec <td>Int <td>
- <tr> <td>5 <td>User Time Bias <td>Nsec <td>Int <td>
- <tr> <td>6 <td>Time Message Control <td> <td>Int <td>0=No Message<br>1=830 to Control Port<br>2=830 to Equipment Port
- <tr> <td>7 <td>Not Used <td> <td> <td>
+ <tr> <td>1 <td>Time Recovery Mode <td>  <td>Char <td>D=Dynamic<br>S=Static<br>K=Known Position<br>N=No Time Recovery
+ <tr> <td>2 <td>Time Synchronization <td>  <td>Char <td>U=UTC Time<br>G=GPS Time
+ <tr> <td>3 <td>Time Mark Mode <td>  <td>Char <td>A=Always Output Time Pulse<br>V=Only when Valid
+ <tr> <td>4 <td>Maximum Time Error for which a time mark will be considered valid <td>Nsec <td>Int <td> 
+ <tr> <td>5 <td>User Time Bias <td>Nsec <td>Int <td> 
+ <tr> <td>6 <td>Time Message Control <td>  <td>Int <td>0=No Message<br>1=830 to Control Port<br>2=830 to Equipment Port
+ <tr> <td>7 <td>Not Used <td>  <td>  <td> 
</table>
Example:<br>
<code>$PMVXG,523,S,U,A,0500,000000,1,0*23</code>
<p>
<table border>
<tr> <th>Field <th>Description <th>Units <th>Format <th>Range
- <tr> <td>1 <td>Time Mark Valid <td> <td>Char <td>T=Valid<br>F=Not Valid
- <tr> <td>2 <td>Year <td> <td>Int <td>1993-
- <tr> <td>3 <td>Month <td> <td>Int <td>1-12
+ <tr> <td>1 <td>Time Mark Valid <td>  <td>Char <td>T=Valid<br>F=Not Valid
+ <tr> <td>2 <td>Year <td>  <td>Int <td>1993-
+ <tr> <td>3 <td>Month <td>  <td>Int <td>1-12
<tr> <td>4 <td>Day <td>Nsec <td>Int <td>1-31
<tr> <td>5 <td>Time <td>HH:MM:SS<td>Int <td>00:00:00-23:59:59
- <tr> <td>6 <td>Time Synchronization <td> <td>Char <td>U=UTC<br>G=GPS
- <tr> <td>7 <td>Operating Mode <td> <td>Char <td>D=Dynamic<br>S=Static<br>K=Known Position
- <tr> <td>8 <td>Oscillator Offset - estimate of oscillator frequency error <td>PPB <td>Int <td>
- <tr> <td>9 <td>Time Mark Error of last pulse <td>Nsec <td>Int <td>
- <tr> <td>10 <td>User Time Bias <td>Nsec <td>Int <td>
+ <tr> <td>6 <td>Time Synchronization <td>  <td>Char <td>U=UTC<br>G=GPS
+ <tr> <td>7 <td>Operating Mode <td>  <td>Char <td>D=Dynamic<br>S=Static<br>K=Known Position
+ <tr> <td>8 <td>Oscillator Offset - estimate of oscillator frequency error <td>PPB <td>Int <td> 
+ <tr> <td>9 <td>Time Mark Error of last pulse <td>Nsec <td>Int <td> 
+ <tr> <td>10 <td>User Time Bias <td>Nsec <td>Int <td> 
<tr> <td>11 <td>Leap Second Flag - indicates that a leap second will occur.
This value is usually zero except during the week
prior to a leap second occurence, when this value
will be set to +/-1. A value of +1 indicates
that GPS time will be 1 second further ahead of
UTC time.
- <td> <td>Int <td>-1,0,1
+ <td>  <td>Int <td>-1,0,1
</table>
Example:<br>
<code>$PMVXG,830,T,1998,10,12,15:30:46,U,S,000298,00003,000000,01*02</code>
/*
* Check this every time you edit the code!
*/
-#define YEAR_RIGHT_NOW 1998
+#define YEAR_LAST_MODIFIED 2000
/*
* GPS Definitions
/*
* Position Averaging.
- * Reference: Dr. Thomas A. Clark's Totally Accurate Clock (TAC) files at
- * ftp://aleph.gsfc.nasa.gov/GPS/totally.accurate.clock/
- * For a 6-channel Motorola Oncore, he indicates that good nominal
- * HDOP and VDOP are 1.50 and 2.00 respectively. Given the relationship
- * HDOP^2 = NDOP^2 + EDOP^2 and assuming EDOP and NDOP are equal, we
- * have a nominal NDOP = EDOP = sqrt((HDOP*HDOP)/2). An 8-channel
- * Oncore does well with HDOP=1.20 and VDOP=1.70.
*/
#define INTERVAL 1 /* Interval between position measurements (s) */
#define AVGING_TIME 24 /* Number of hours to average */
double avg_lon; /* average longitude */
double avg_alt; /* average height */
double central_meridian; /* central meridian */
- double filt_lat; /* latitude filter length */
- double filt_lon; /* longitude filter length */
- double filt_alt; /* height filter length */
- double edop; /* EDOP (east DOP) */
- double ndop; /* NDOP (north DOP) */
- double vdop; /* VDOP (vertical DOP) */
+ double N_fixes; /* Number of position measurements */
int last_leap; /* leap second warning */
u_int moving; /* mobile platform? */
u_long sloppyclockflag; /* fudge flags */
static char * mx4200_parse_t P((struct peer *));
static char * mx4200_parse_p P((struct peer *));
-static char * mx4200_parse_d P((struct peer *));
static char * mx4200_parse_s P((struct peer *));
#ifdef QSORT_USES_VOID_P
int mx4200_cmpl_fp P((const void *, const void *));
up->avg_lon = 0.0;
up->avg_alt = 0.0;
up->central_meridian = NOT_INITIALIZED;
- up->filt_lat = 0.0;
- up->filt_lon = 0.0;
- up->filt_alt = 0.0;
- up->edop = 1;
- up->ndop = 1;
- up->vdop = 1;
+ up->N_fixes = 0.0;
up->last_leap = 0; /* LEAP_NOWARNING */
up->clamp_time = current_time + (AVGING_TIME * 60 * 60);
up->log_time = current_time + SLEEPTIME;
500, /* max time error in ns */
0, /* user bias in ns */
1); /* output "830" sentences to control port */
- /* Multi-satellite mode */
+ /* Multi-satellite mode */
/*
* Output position information (to calculate fixed installation
add_mode = 1; /* add to list */
}
- /*
- * "007" Control Port Configuration
- * Output "022" DOPs
- */
- mx4200_send(peer, "%s,%03d,%03d,%d,%d,,%d,,,", pmvxg,
- PMVXG_S_PORTCONF,
- PMVXG_D_DOPS, /* control port output block Label */
- 0, /* clear current output control list (0=no) */
- add_mode, /* add/delete sentences from list (1=add, 2=del) */
- /* must be null */
- INTERVAL); /* sentence output rate (sec) */
- /* precision for position output */
- /* nmea version for cga & gll output */
- /* pass-through control */
-
/*
* "007" Control Port Configuration
PMVXG_D_PHV, /* control port output block Label */
0, /* clear current output control list (0=no) */
add_mode, /* add/delete sentences from list (1=add, 2=del) */
- /* must be null */
+ /* must be null */
INTERVAL); /* sentence output rate (sec) */
- /* precision for position output */
- /* nmea version for cga & gll output */
- /* pass-through control */
+ /* precision for position output */
+ /* nmea version for cga & gll output */
+ /* pass-through control */
}
/*
*/
up->log_time = current_time + SLEEPTIME;
- /*
- * "007" Control Port Configuration
- * Stop outputting "022" DOPs
- */
- mx4200_send(peer, "%s,%03d,%03d,%d,%d,,,,,", pmvxg,
- PMVXG_S_PORTCONF,
- PMVXG_D_DOPS, /* control port output block Label */
- 0, /* clear current output control list (0=no) */
- 2); /* add/delete sentences from list (2=delete) */
- /* must be null */
- /* sentence output rate (sec) */
- /* precision for position output */
- /* nmea version for cga & gll output */
- /* pass-through control */
-
/*
* "007" Control Port Configuration
* Stop outputting "021" position, height, velocity reports
return;
}
mx4200_debug(peer,
- "mx4200_receive: position avg %.9f %.9f %.4f\n",
- up->avg_lat, up->avg_lon, up->avg_alt);
- mx4200_debug(peer,
- "mx4200_receive: position len %.4f %.4f %.4f\n",
- up->filt_lat, up->filt_lon, up->filt_alt);
- mx4200_debug(peer,
- "mx4200_receive: position dop %.1f %.1f %.1f\n",
- up->ndop, up->edop, up->vdop);
+ "mx4200_receive: position avg %f %.9f %.9f %.4f\n",
+ up->N_fixes, up->avg_lat, up->avg_lon, up->avg_alt);
/*
* Reinitialize as a reference station
* if position is well known.
return;
}
- /*
- * "022" DOPs, if we are still averaging our position
- */
- if (sentence_type == PMVXG_D_DOPS && !up->known) {
- if ((cp = mx4200_parse_d(peer)) != NULL) {
- mx4200_debug(peer, "mx4200_receive: dop: %s\n", cp);
- return;
- }
- return;
- }
-
/*
* Print to the syslog:
* "004" Mode Data
* (Certainly can't be any year before this code was last altered!)
*/
if (day_of_month > 31 || month > 12 ||
- day_of_month < 1 || month < 1 || year < YEAR_RIGHT_NOW) {
+ day_of_month < 1 || month < 1 || year < YEAR_LAST_MODIFIED) {
mx4200_debug(peer,
"mx4200_parse_t: bad date (%4d-%02d-%02d)\n",
year, month, day_of_month);
struct refclockproc *pp;
struct mx4200unit *up;
int sentence_type, mode;
- double mtime, lat, lon, alt, geoid, vele, veln, weight;
+ double mtime, lat, lon, alt, geoid, vele, veln;
char north_south, east_west;
pp = peer->procptr;
if (lon > 180.0) lon -= 360.0;
/*
- * Calculate running weighted averages
+ * Calculate running averages
*/
- weight = 1. / up->edop;
- weight *= weight;
- up->avg_lon = (up->filt_lon * up->avg_lon) + (weight * lon);
- up->filt_lon += weight;
- up->avg_lon = up->avg_lon / up->filt_lon;
-
- weight = 1. / up->ndop;
- weight *= weight;
- up->avg_lat = (up->filt_lat * up->avg_lat) + (weight * lat);
- up->filt_lat += weight;
- up->avg_lat = up->avg_lat / up->filt_lat;
-
- weight = 1. / up->vdop;
- weight *= weight;
- up->avg_alt = (up->filt_alt * up->avg_alt) + (weight * alt);
- up->filt_alt += weight;
- up->avg_alt = up->avg_alt / up->filt_alt;
- mx4200_debug(peer,
- "mx4200_receive: position rdg %.9f %.9f %.4f (CM=%.9f)\n",
- lat, lon, alt, up->central_meridian);
+ up->avg_lon = (up->N_fixes * up->avg_lon) + lon;
+ up->avg_lat = (up->N_fixes * up->avg_lat) + lat;
+ up->avg_alt = (up->N_fixes * up->avg_alt) + alt;
- return (NULL);
-}
+ up->N_fixes += 1.0;
-/*
- * Parse a mx4200 DOP sentence.
- *
- * A typical message looks like this. Checksum has already been stripped.
- *
- * $PMVXG,022,SSSSSS.SSEE.E,NN.N,VV.V,XX,XX,XX,XX,XX,XX
- *
- * Field Field Contents
- * ----- --------------
- * Block Label: $PMVXG
- * Sentence Type: 022=DOPs. The DOP values in this sentence
- * correspond to the satellites listed. The PRNs in
- * the message are listed in receiver channel number order
- * 1 UTC measurement time (seconds into week)
- * 2 EDOP (east DOP)
- * 3 NDOP (north DOP)
- * 4 VDOP (vertical DOP)
- * 5 PRN on channel 1
- * 6 PRN on channel 2
- * 7 PRN on channel 3
- * 8 PRN on channel 4
- * 9 PRN on channel 5
- * 10 PRN on channel 6
- * 11 PRN on channel 7 (12-channel receivers only)
- * 12 PRN on channel 8 (12-channel receivers only)
- * 13 PRN on channel 9 (12-channel receivers only)
- * 14 PRN on channel 10 (12-channel receivers only)
- * 15 PRN on channel 11 (12-channel receivers only)
- * 16 PRN on channel 12 (12-channel receivers only)
- */
-static char *
-mx4200_parse_d(
- struct peer *peer
- )
-{
- struct refclockproc *pp;
- struct mx4200unit *up;
- int sentence_type;
- double mtime, edop, ndop, vdop;
+ up->avg_lon /= up->N_fixes;
+ up->avg_lat /= up->N_fixes;
+ up->avg_alt /= up->N_fixes;
- pp = peer->procptr;
- up = (struct mx4200unit *)pp->unitptr;
-
- /* Should never happen! */
- if (up->moving) return ("mobile platform - no dop!");
-
- sscanf ( pp->a_lastcode, "$PMVXG,%d,%lf,%lf,%lf,%lf",
- &sentence_type, &mtime, &edop, &ndop, &vdop);
-
- /* Sentence type */
- if (sentence_type != PMVXG_D_DOPS)
- return ("wrong rec-type");
-
- /* Update values */
- if (edop <= 0.0 || ndop <= 0.0 || vdop <= 0.0)
- return ("nonpositive dop");
- up->edop = edop;
- up->ndop = ndop;
- up->vdop = vdop;
+ mx4200_debug(peer,
+ "mx4200_receive: position rdg %.0f: %.9f %.9f %.4f (CM=%.9f)\n",
+ up->N_fixes, lat, lon, alt, up->central_meridian);
return (NULL);
}