Hello!
well I believe a general C function can be interpreted by any good compiler. I dont want an exact piece of code. a general guidance as to how I should extract these data withing commas would suffice.
If you have the C code, it's another story, you can compile it for any processor.
Now what you (apparently) want to do is to extract info from the NMEA data, right?
NMEA is a bunch of ascii strings. Every string has a predefined number of fields, all separated by commas.
You know for instance that the string starting by $GPRMC contains the latitude at the 5 th field.
So you just extract the $GPRMC string and eliminate what you don't need, that's it.
If I were you, I would start by writing 2 functions like this:
Code C - [expand] |
1
2
| char * GetString(const char * label);
char * GetField(const char * instring, uint8 fieldid); |
The first one would return the string you want (e.g. staring by the label you are looking for).
The second one would return the field you are looking for (e.g. fieldid = 3 would return the 3rd field).
Then I guess you're done.
Dora.