Hello Everybody.
I am realizing a GPS tracker based on gps module as described in subject of this topic.
I read data (Lat, Long, Number of satellites, date & hour, Speed) and I print all on a OLED 1306 (128 x 64 pixel). I submit the code, without SD file writing.
The problems are the following:
sometimes , the gps module takes really a lot of time to "wake up". There is any method to "wake up" (and to put in "sleep" mode) excluding to use a digital pin of the arduino nano ?
Often the "gps.satellites.value()" function is returning zero but the lat/lng values are updating anyway. Also the gps. altitude.meters() is returning zero and rarely gives an altitude output, even if the number of satellites is higher than 3 or 4.
Do I miss something or making some mistake ?
There is somebody that can give a suggestion about these questions ?
The GPS module has to know exactly where the satellites are in the sky to work at all, and when off or sleeping maintains an internal data base with approximations for their positions.
After waking or turn on, depending on the number of satellites present and the accuracy of those approximations, it can take minutes to determine a fix.
There is nothing you can do about that other than use a good antenna and have a clear view of the sky.
Each GPS position sentence contains a flag stating whether the position is valid. Check that flag and don't use the information if it is invalid. See the TinyGPS++ documentation for validity tests.
Ok. Thank you very much to all of you for your answers.
I am new to Arduino and C++/arduino IDE programming so must make experience to improve.
Just one last question if you can answer here without opening a different topic...
Serial communication using <Softwareserial.h>.
Is it possible to create 2 different objects with a different couple of pins and use them in the same sketch ?
I have tried to connect Ardunino nano, with GPS Module and a HC-05 bluetooth with a Samsung mobile.
the setup() function sends correctly string messages to the OLED display and to the phone trough BT TERMINAL.
but after that...No more infos are displayed on OLED/Mobile.
Both connection are working correctly if used separately, and connecting directly the GPS TX-RX pins to RX-TX of HC-05 ...it works (the GPS sends NMEA data flow to BT Terminal)...
But I would like to maintain the former structure: reading data from GPS, format them and displayng on OLED, and sending the same formatted data to BT Terminal, and in the future, realizing an app on mobile that displays Lat/Lng and so on.
Hi. I did not solved yet altitude problem..working on it to analize data in a better way to achieve quality logs files.
I have checked out the file on the SD card (did not published the code) and using google maps seems to be very precise. But.....sometimes there is some faulty coordinates, but need to understand if the problem is caused by GPS, or SD, or arduino and SD communication. But I have to say that 99,99% of recorded data can be classified as "good".
Regarding altitude I will check possible solutions.
Regarding the "turn on" delay, it seems there is not so much to do as stated by jremington.
It depends on various matters: time passed between last use and new powering on, signal quality, antenna performance and so on.
Thanks Srnet. I understand. As "faulty coordinates" I ment "very large position error".
From the log.txt file all coordinates where very precise (even much less of +/- 10 mt...).
But in one case (one record line), I found myself in Ireland instead of North-west Italy...maybe could be a first step for tele-transportation
Maybe this faulty line is due to arduino/SD module miscommunication. I don't know.