[ntp:questions] Sure GPS: Programming it now works

Terje Mathisen "terje.mathisen at tmsw.no" at ntp.org
Fri Apr 8 14:58:24 UTC 2011


Uwe Klein wrote:
> Terje Mathisen wrote:
>> I can try that as well, but it really does seem like this is the full
>> list of what you can get (notice PMTKCHN has room for up to 32 sats!)
> over the days I see 49 distinct sats ;-) highest satno 02 .. 51
>>
>> $PMTKCHN,23322,32182,11382,31272,24282,20192,17432,13252,25031,50001,04001,12031
>>
>> ,00000,00000,00000,00000,00000,00000,00000,00000,00000,00000,00000,00000,00000,0
>>
>> 0000,00000,00000,00000,00000,00000,00000*44<CR><LF>
>>
>> What I have found though, by trial & error, is that my board can run
>> at a little over 3 Hz:
>>
>> I can ask for any update interval from 307 ms and up, so 333 ms is fine.
>>
>> When I ask for 200 ms (5Hz) I get a '2' response, i.e. command was OK
>> but could not be executed.
>
> Do you get distinctly different sentences or a rehash?

I do get whatlooks like a new fix every time, and the interval is exact, 
i.e. it does not start again at zero ms past the second.

With 307 ms interval I'm getting GGA sentences like this:

$GPGGA,091225.433,5955.0943,N,01038.4560,E,1,10,0.82,16.8,M,40.8,M,,*52
$GPGGA,091225.740,5955.0943,N,01038.4560,E,1,10,0.82,16.7,M,40.8,M,,*5A
$GPGGA,091226.047,5955.0943,N,01038.4560,E,1,10,0.82,16.7,M,40.8,M,,*59
$GPGGA,091226.354,5955.0943,N,01038.4560,E,1,10,0.82,16.6,M,40.8,M,,*59

Over such a short interval only the altitude show any variance, 16.8 
down to16.7 and up again to 16.8 meter.

> Is that dependent on the buquet of sentences configured
> or is the device "out-timeslotted" for extra work?

Don't know.

I've uploaded my new source code:

Since I can now send arbitrary strings, I've included a syntax 
description which documents all those I know about:

C:\c2\nmea-mtk>debug\nmea-mtk -h
Syntax: nmea-mtk [options]

Default with no options is to enable WAAS and GGA

Options:
  -b baud (default 9600)
  -p port (default \\.\COM1)
  -c command (send $command*xxCRLF to gps)
  -t seconds (echo all NMEA sentences for t seconds

Documented commands and responses:

$PMTK000*     : Test packet
$PMTK010,001* : Output system message
$PMTK101*     : Hot restart
$PMTK102*     : Warm restart
$PMTK103*     : Cold restart
$PMTK104*     : Factory reset

$PMTK251,4800*: Set baud rate (0,4800,9600,19200,38400,57600,115200)

$PMTK300,200,0,0,0,0* : Position fix interval (in ms)
$PMTK400*     : Query Fix interval
$PMTK500,n    : Position fix interval (in ms)

$PMTK301,2*   : Set DGPS mode (0:off, 1:RTCM, 2:WAAS)
$PMTK401*     : Query DGPS mode
$PMTK501,n*   : DGPS mode status

$PMTK313,1*   : Enable SBAS (0:disable)
$PMTK413*     : Query SBAS
$PMTK513      : SBAS Status

$PMTK314,-1*  : Turn on default NMEA sentences
$PMTK314,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0* : Turn on GGA only
     The sentence order is GLL, RMC, VTG, GGA, GSA, GSV, GRS, GST,
     (5 undocumented sentences), MALM, MEPH, MDGP, MDBG, ZDA, MCHN
$PMTK414*     : Query NMEA output
$PMTK514      : NMEA sentences

$PMTK320,0*   : Turn off (0) or on (1) power saving mode (test only!)
$PMTK420*     : Query power saving mode (test only!)
$PMTK520,n*   : Power saving mode (test only!)

$PMTK330,0*   : Set Datum (0 = WGS84)
$PMTK430*     : Query Datum
$PMTK530,n*   : Datum used
$PMTK331,6377397.155,299.1528128,-148.0,507.0,685.0* : Set custom datum
     (semi-major,eccentr.,WGS84 dx offset, dy, dz)
$PMTK431*     : Query Custom Datum
$PMTK531,n*   : Datum used

$PMTK490,n*     : Query Flash settings
$PMTK590,n*     : Flash settings: write_count,hz,baud,
     GLL,RMC,VTG,GSA,GSV,GGA,ZDA,MCHN (default NMEA periods)
$PMTK604*     : Query FW version
$PMTK704,v1,v2,v3*: FW version numbers
$PMTK605*     : Query FW release info
$PMTK705,releaseStr,ModelID*: FW release

>
> ( OT: I had looked into GPS attitude "compass" devices for a potential
> customer.
> first seen usage some years ago by Armadillo Aerospace for attitude control
> exorbitantly expensive 5..10k€. I'd like to have a cheap dual antenna
> device )

You just need two GPSs capable of raw pseudo-range output, then you know 
the exact distance offset between them and solve for direction.

Terje
>>
> uwe
>
>


-- 
- <Terje.Mathisen at tmsw.no>
"almost all programming can be viewed as an exercise in caching"




More information about the questions mailing list