Click here to Skip to main content
15,890,527 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i am working on a project to synchronize the clock through GPS time and date , i am unable to find the exact code to do it. i am using GPS receiver which is connected to my system through rs 232 so i want to store the GPS date and time in a array coming out of gps serial string and then use it for synchronization of my clock.
Either i want to use $GPRMC or $GPZDA message to fetch and store the information

please help me through this as i am breaking my head on this for many days

What I have tried:

i have tried to sync it though a software which requires no code just a setting of gps com port but, now i want to do it with code which can store the info in a array
Posted
Updated 19-Jun-18 10:19am
Comments
Jochen Arndt 19-Jun-18 3:00am    
So what is the problem / question?

Serial communication?
Parsing a string?
Defining a structure to store the parsed data?
Convert to a common datetime structure?
Setting the system clock?

Programming is not looking for existing code that does what you want. You will usually not find code that does exactly what you want. While you can adapt existing code, you have to understand what the code is doing to verify that it is doing it right.
Member 13876215 19-Jun-18 3:56am    
do you have any code related to my problem?
please give me so that i can have a refrence
Jochen Arndt 19-Jun-18 4:23am    
I asked you to tell us what your problem is. I understand what you want to do.
But this is Quick Answer and not "give me code for my task". We will help if you got stuck with code already written by you and general programming related questions.

Again:
Programming is not (re-)using existing code. It is analysing problems and solving it by writing your own code. For specific tasks, it might help to see example code on how it can be done. But you have to split your problem into tasks first and solve each step by step.
[no name] 19-Jun-18 4:10am    
I would add to Jochen Arndts comments. This is just too vague a question. Is it Arduino, Windows, Android, RaspPi or what? Parsing NMEA sentences is quite easy to implement, there is a lot of example code out there - you can google that just as easily as we can. Remember this is a technical forum so give details of what you are attempting and what the problem is. You can use improve question to add more details.
CPallini 20-Jun-18 3:17am    
You should provide more details in order to get better help. For instance what is your hardware (PC or micrcontroller)? What is your OS (if any)? Why are you using C programming language? And so on...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900