Go Down

Topic: GPS Question (Venus GPS module) (Read 2063 times) previous topic - next topic

hob63

Hi all,

I have the following GPS mmodule:

http://www.coolcomponents.co.uk/catalog/product_info.php?products_id=518

Connected to an Arduino Mega with the following code:

Code: [Select]
#include <string.h>
#include <ctype.h>
#include <LiquidCrystal.h>

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

char CharIn;    //character string length 55 chars

void setup() {
  Serial.begin(9600);  // Start serial to host computer
  Serial1.begin(9600);   // Start serial to GPS
}

void loop() {
  Serial1.print("A0 A1 00 09 08 00 00 00 00 00 01 00 00 08 0D 0A");

  while ( Serial1.available() > 0 )       // if data is available to read
  {
    CharIn = Serial1.read();
    Serial.print(CharIn);
    delay(300);
    lcd.print(CharIn);
  }
}


I have 2 questions, Firstly...

Is it possible to write to the GPS module such that the serial output is in my desired format rather than having to specify Serial1.print("A0 A1 00 09 08 00 00 00 00 00 01 00 00 08 0D 0A"); ?

Secondly,

All I want to display on the LCD is "  010.2,K      Ground speed, Kilometers per hour" from the $GPVTG.

Is it possible to specify somewhere (either in the Arduino code or on the GPS module) that is should only output $GPVTG ?

Using the configuration manual:

http://www.sparkfun.com/datasheets/GPS/Modules/AN0003_v1.4.8.pdf

I have tried to disable all except the VTG (<0xA0,0xA1>< PL><08>< message body><CS><0x0D,0x0A>) via  Serial1.print...

However the output is as follows:

Code: [Select]
$GPGGA,175514.999,2400.0000,N,12100.0000,E,0,00,0.0,0.0,M,0.0,M,,0000*63
$GPGSA,A,1,,,,,,,,,,,,,0.0,0.0,0.0*30
$GPGSV,1,1,01,0$GP
$G0$G0$GP,$G*$G0$GP0$GP$GM$GP0$G5$G*$GPN$G9$GP$GPK$G.$G,$GP$GP1$G,$G,$GP0$G.$G9$GP0$G0$G0$GP0$G$$G0$GP1$G1$G0$GP*$G5$G,$GPV$G0$G,$GP.$G
$G0$GP0$G1$G0$GP,$G9$G
$GP,$G4$G,$GP2$G0$G,$GG$GP.$G,$G1$GP,$G0$G2$GP0$G
$G0$GP2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P,$G0$G,$GP.$G3$G0$GP0$GS$G1$GP,$G0$G,$GP$$G0$G,$GP0$G1$G0$GPT$GP$GM$GP0$GC$G*$GP0$GV$GG$GP,$G0$


Is the first line always transmitted? ($GPGGA,175514.999,2400.0000,N,12100.0000,E,0,00,0.0,0.0,M,0.0,M,,0000*63)

Is the output correct? (I have no way to move the module to see if the velocity >0), if so will I just have to add some code to remove the extra characters?

Many thanks!

WillR

Looks ok to me... but I don't know what you asked it to do and did not look...

You don't have to go for a walk... unless you have a very stable signal you will get some "apparent movement" and hence a velocity.

Just wait for a while I suspect that you will have about a 10 meter radius of positions within an hour.

The DOP will tell you after a while .... (Dilution of Position).

We use GPS trackers in our business.... so I see these files a bit.
Just another Hacker

Go Up