Tags:
Would TinyGPS be of use here?
I wrote a split() routine that is similar to C strtok() and perl split so that I could read in parameters from a config file:
http://mbed.org/users/shimniok/code/AVC_2012/file/826c6171fc1b/util.c
Examples of using split() here:
http://mbed.org/users/shimniok/code/AVC_2012/file/826c6171fc1b/Conf...
Permalink Reply by Justin on August 16, 2012 at 10:34pm Um, ok, sure. How about the code snippets I posted? Will those work?
Permalink Reply by Justin on August 16, 2012 at 10:57pm Well... now's a good time to learn :) I think you'll be fine getting it to work. Just post more questions here and I'll do what I can to help.
What's the ultimate goal here? What are you working on? What are you trying to accomplish with the lat/lon parsing?
I need a little context to be able to help you a little better.
Permalink Reply by Justin on August 19, 2012 at 11:51pm Ok, gotcha.
If you are programming using Arduino environment one option is to use TinyGPS. It parses NMEA output and you can then query lat/lon and ignore the rest.
Otherwise, you have to work out how to get the string into memory to parse, then run the parsing code to split it up. What I posted assumed the string was in memory already (which is a separate problem).
It's best to take baby steps, working on a tiny chunk of the problem at a time. Set a variable equal to a test string, then work on the function to parse it and return back lat and lon.
There's a lot to talk through to roll your own when you have minimal programming experience. Not sure if this is the right place to have that chat. So if you want we can talk through email: http://www.bot-thoughts.com/2007/01/contact-me.html
Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.118 members
4 members
682 members
51 members
24 members
© 2013 Created by Chris Anderson.
Powered by
