how to change the GPS sentence?

Hi. I have been searching a way to get the altitude from my GPS Shield from IteadStudio 1.1.

After tests and more tests I found out that the Sentence I am receiving doesn't provide some info as Altitude/Sat numbers

Also, I found out that the Sentence sent from ublox gps chip (model NEO-6M) is the doesn't retrives the some infos like Altitude/Sat numers.

Looking at its specification, the "$GPRMC" (the one I am receiving) doesn't send the "sat number and altitude)

Reason why tinyGps probably doesn't recognizes my device.

Example of sentence comming fro the Gps Shield

$GPRMC,225446,A,4916.45,N,12311.12,W,000.5,054.7,191194,020.3,E*68

Where:
225446 Time of fix 22:54:46 UTC
A Navigation receiver warning A = Valid position, V = Warning
4916.45,N Latitude 49 deg. 16.45 min. North
12311.12,W Longitude 123 deg. 11.12 min. West
000.5 Speed over ground, Knots
054.7 Course Made Good, degrees true
191194 UTC Date of fix, 19 November 1994
020.3,E Magnetic variation, 20.3 deg. East
*68 mandatory checksum

My question is:

On their website, they have a lot of Sentences format, including $GPGGA (that seems to have all I need. like altitude)

Link: http://blog.iteadstudio.com/play-arduino-with-global-positioning-system-gps/#more-520

Does anybody know if I can change the Sentence format that I want to use on iteadstudio?

I am working on this for almost 3 weeks and still no sucess.

Thank you very much and I am sorry for the long topic.

I don't know anything about iteadstudio, but I would recommend using the TinyGPS library.

You can find it at TinyGPS | Arduiniana

The library itself can be downloaded from this page. Look for "Download" on the page.

Hi...Tks for the answer!

Since my GPS is not providing altitude and sats aquiredm the library will not work

I would think you'd have to send a message to the GPS telling it to send different message types out. Does yours support that?

Hi. Tks for answering me!

Well. Seems like they do but doesn't exaplain how.

See the reply from xjet about half way down the page here:
https://forum.sparkfun.com/viewtopic.php?t=6446

Pete

A more detailed manual for the standard packet types (including one to set the frequency of sentences, is at https://docs.google.com/file/d/0ByI4WbhJsiyqZjVjNTczNWEtZjczYi00YjY4LTlmMTgtNGIxZDcxZmFhMjEw/edit?usp=drive_web&hl=en"

If you Google for 'EB-365 GPS' you will find the manual for the gps unit on your shield. It covers how to configure the messages.

There is about 20 GPS sentences, of which only about 5 or 6 are common. Unless yours is very unusual, you can send a command string to the GPS telling it which sentences to send out to you. I have a ublox GPS device and have no trouble getting the sentences I want.

Did you ever get this resolved? If not, perhaps I can help.

I recently received my GPS. It happens to be a SkyLab SKM53, but your GPS may be compatible.

First, grab a copy of the document at:
http://api.ning.com/files/L30xp1HTxtEUhhmBj4yYWIB31IDKs*xJNecJYvcEKZofuHJcZ3wnTMuZL5FeJC535I6DJbBZZE7FpJwnQPxgT9yKLCibZaZj/NMEA_Packet_Userl.pdf

It shows a lot of packet types, and what they mean. One packet type is to set the frequency of updates for each packet type, which is exactly what you want. It's packet type 314. It allows you to disable any of the 17 sentences, or to set them to output every 1, 2, 3, 4, or 5 position fixes.

It also allows you to do such things as changing the GPS baud rate, and many more.

One packet type they missed is 220., which takes a value that appears to be in milliseconds, and sets the frequency of updates.

One of the problems you will run into is that the GPS will not act on your configuration packet unless it has a proper checksum. Once I realized that, I decided to write a small Arduino sketch to configure a GPS using the Serial Monitor (or terminal program). It takes a packet, from $ to *, calculates the checksum, and sends it to the GPS.

It's pretty simple.. no real error checking, so I can't be responsible if you send your GPS something that locks it up, etc.

/*
Enter a packet starting with $PMTK, and ending with a *
In this sketch the * indicates the end of transmission.
The sketch takes the packet, adds a checksum and sends it to
the GPS.

Note: If you change the baud rate of the GPS, you will have to
close the Serial monitor, change the baud rate in Serial1
(or whatever Serial port you use) and restart it.

This sketch assumes you are running an Arduino Mega2560, and
have a serial GPS on Serial1. Change this to suit your own
congiguration.

One packet type not mentioned in the document at
http://api.ning.com/files/L30xp1HTxtEUhhmBj4yYWIB31IDKs*xJNecJYvcEKZofuHJcZ3wnTMuZL5FeJC535I6DJbBZZE7FpJwnQPxgT9yKLCibZaZj/NMEA_Packet_Userl.pdf
is packet type 220. Here are a couple of samples, as you
would enter them into the Serial Monitor

$PMTK220,200*
$PMTK220,500*
$PMTK220,1000*
$PMTK220,2000*

These will set the reporting interval to 200, 500, 1000,
and 2000 milliseconds respectively.
*/

char sentence[80];
int idx = 0;

void setup() {
  // initialize both serial ports:
  Serial.begin(57600);
  Serial1.begin(38400);
}

void loop() {
  // read from Serial1, send to Serial:
  if (Serial1.available()) {
    Serial.write(Serial1.read());
  }

  if (Serial.available())  {
    char inbyte = Serial.read();
    sentence[idx++] = inbyte;
    sentence[idx] = 0;
    if (inbyte == '*') {
      for (int i=0; i < strlen(sentence); i++) {
        Serial.print(sentence[i]);
      }
      Serial.println();
      sendConfig ();
      sentence[0] = 0;
      idx = 0;
    }
  }
}

void sendConfig () {
  unsigned char CS = 0;
  for (int i=1; i< strlen(sentence)-1; i++) {
    CS ^= sentence[i];
  }
  Serial1.print(sentence);
  if (CS < 10) Serial1.print("0");
  Serial1.print(CS,HEX);
  Serial1.println();
}

Hope this helps.