What is the configuration message to display only the GPRMC sentence, I don't want other packets?
Can someone help me the showing what characters to be send by Arduino to NEO 6M module?
Thanks
What is the configuration message to display only the GPRMC sentence, I don't want other packets?
Can someone help me the showing what characters to be send by Arduino to NEO 6M module?
Thanks
if you are on Windows, use uCenter to configure the module.
Thanks. Already downloaded & installed. Can you show where is the RMC settings?
I don't use it but from a forum answer (in French) they said
Open the configuration window
Select MSG (Messages)
to delete the GGA frame select F0-D0 NMEA GxGGA
Uncheck all boxes.
Validate with the SEND button.
To add the RMC frame, select F0-D4-NMEA GxRMC
Check the UART1 box.
Validate with the SEND button
And Ucenter will tell you the string of bytes to send over the serial interface from the Arduino.
Its best to send the Ublox config commands in setup(), then your not dependant on needing to have a GPS with working EEPROM attached and\or battery backup.
Why exactly ?
And which GPS library are you using (if any) ?
Many thanks. It worked perfectly.
Can you show me what is the config command?
you should see it in uCenter probably - it's a succession of bytes
I've used this method. Don't know if it does what you need.
Open software serial;
Use Read Until New Line to grab the next sentence;
If it's not the RMC sentence repeat till you get it;
Close software serial;
Do whatever you need with the RMC sentence;
Repeat;
The full output phase of the GPS takes about 500ms. The RMC will occupy about the first 100ms of that. That gives you 800-900ms to process the sentence and do what you need to do.
It's pretty easy.
The thing with that approach is that your Arduino is dealing with some useless input.
Best case scenario is that you are exactly at the new line and the next sentence is the RMC one in which case indeed you did not loose much and worst case scenario is that you juste received the $ of the RMC sentence which you will ignore although it's right there and then you have to wait a full second (if that's the sampling frequency of your module) to get the next one.
if you are using SoftwareSerial for that line, that's a lot of interrupts to the main code.
Configuring the module to only send RMC sentences when possible seems a better idea to me
I found all over the place in ucenter where is this data packets? I Cannot find it.
Can you help me to find?
I don’t use windows so I don’t use this software. There must be somewhere the commands that are being sent or just capture them (it’s likely possible to an arduino as a man in the middle) as they go over the serial line
Is there an answer here ?
What you are trying to do may not be necessary or may not work.
The why is always a good question.
Minimizing the amount of data you need to handle to free up time on your small arduino is usually a good answer and with software serial it might mean reliable versus unreliable operation as you always gain to minimize the number of interrupts.
The library is not very important as it would just be a call like
Serial.write(config, sizeof config);
In the setup() to send a byte stream to configure the module.
Thanks for that. I had never heard of anyone using this method so I doubted it would work, but it does.
The key is using SoftSerial.end() as soon as I have the RMC sentence. Will the bytes sent by the GPS to the digital pin cause any disturbance to the Arduino if soft serial is off?
The first time SoftSerial.begin() is used you don't know where in the GPS cycle you are, so, as you said, you may not see the RMC sentence for up to one second. But if the sketch does what it needs to do within the next 800ms then next time you begin soft serial will be before the next GPS output phase starts. So from then on it all falls into sync.
Begin and End takes negligible time. A useful feature of Begin is that you know you start with an empty buffer.
No it won't as end() does remove the PCINT flag
OK I see your point
And you say it will be fine because you expect the RMC sentence to be the first one sent by the module so there is no lost time in handling the interrupts. I don't know if it's always the case so will trust your experience there.
Keeping sync is easy enough in TinyGPS++;
In the loop reading characters and sending to encode() you do this;
if (GPSserial.available() > 0)
{
GPSchar = GPSserial.read();
gps.encode(GPSchar);
//Serial.write(GPSchar);
}
if (gps.location.isUpdated())
{
endFixmS = millis(); //record the time when we got a GPS fix
return true;
}
}
The serial stream is read, until the location is actually updated, meaning either GPGGA or GPRMC has been processed. You can then go away for circa 800mS.
The altitude comes from GPGGA so if you need that you should do;
if (gps.location.isUpdated() && gps.altitude.isUpdated() )
If you check for altitude and speed have been updates you can know that both GPRMC and GPGGA have been processed.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.