Hi. I'm quite new to not only the mbed but also c programming itself and I think I need some help!!
I have a string from my PC being read by my mbed and it looks something like this:
$GPRMC,121212,A,4807.038,N,01131.000,E,022.4,084.4,030611,003.1,W*6A
This string of information is from a GPS simulator running on my PC. Below show what each part means.
RMC,Time,status,latitude,longitude,speed,angle,date,magnetic variation,check-sum
I want to parse the string into it's separate parts then manipulate some of the data and output to an LCD. I'm okay with outputting to the LCD and I think I've parsed the string! :S But I'm not sure how to manipulate it.
eg. I want to take the date from the string so I've got 030611 and i want to output it on the LCD as 03-June-2011
How do i go about doing this?
Here's how far I've got...
#include "mbed.h"
#include "NewTextLCD.h"
Serial pc(USBTX, USBRX);
TextLCD lcd(p10,p11,p12,p13,p14,p15,TextLCD::LCD20x4);
char GPS [100];
char RMC, Time, Status, Lat, Long, Speed, Angle, Date, MagV, Check;
int main() {
pc.scanf(data, "%7c%7c%2c%11c%12c%6c%6c%7c%7c%3c", &RMC, &Time, &Status, &Lat, &Long, &Speed, &Angle, &Date, &MagV, &Check);
Thankyou very much. I hope you understand my problem =]
Also If what I have already is ineffective a I would appreciate someone to correct me. =]
Hi. I'm quite new to not only the mbed but also c programming itself and I think I need some help!!
I have a string from my PC being read by my mbed and it looks something like this:
$GPRMC,121212,A,4807.038,N,01131.000,E,022.4,084.4,030611,003.1,W*6A
This string of information is from a GPS simulator running on my PC. Below show what each part means.
RMC,Time,status,latitude,longitude,speed,angle,date,magnetic variation,check-sum
I want to parse the string into it's separate parts then manipulate some of the data and output to an LCD. I'm okay with outputting to the LCD and I think I've parsed the string! :S But I'm not sure how to manipulate it.
eg. I want to take the date from the string so I've got 030611 and i want to output it on the LCD as 03-June-2011
How do i go about doing this?
Here's how far I've got...
Thankyou very much. I hope you understand my problem =]
Also If what I have already is ineffective a I would appreciate someone to correct me. =]