Author |
Message |
Topic: incorrect GPS output result |
ccs_user
Replies: 14
Views: 26655
|
Forum: General CCS C Discussion Posted: Tue Feb 19, 2019 1:03 pm Subject: incorrect GPS output result |
This is untested code. But the idea is, just grab the entire string, and then use strstr to check whether or not this is the message you want.
Then, grab the numbers from the message (I am assumin ... |
Topic: incorrect GPS output result |
ccs_user
Replies: 14
Views: 26655
|
Forum: General CCS C Discussion Posted: Sun Feb 17, 2019 10:18 am Subject: incorrect GPS output result |
This is untested code. But the idea is, just grab the entire string, and then use strstr to check whether or not this is the message you want.
Then, grab the numbers from the message (I am assumin ... |
Topic: incorrect GPS output result |
ccs_user
Replies: 14
Views: 26655
|
Forum: General CCS C Discussion Posted: Sun Feb 17, 2019 9:55 am Subject: incorrect GPS output result |
Thank you for the quick reply.
I have tried it but it is giving
*** Error 12 "****\CCS C Projects\GPS\GPS.c" Line 84(18,19): Undefined identifier -- atoi
I think atoi is ... |
Topic: incorrect GPS output result |
ccs_user
Replies: 14
Views: 26655
|
Forum: General CCS C Discussion Posted: Sun Feb 17, 2019 9:33 am Subject: incorrect GPS output result |
44 is the ASCII value of ','.
You need to first skip this character as well (so read seven characters),
and then convert the ASCII being received into numeric format.
Look at atoi and atol, whi ... |
Topic: incorrect GPS output result |
ccs_user
Replies: 14
Views: 26655
|
Forum: General CCS C Discussion Posted: Sun Feb 17, 2019 8:17 am Subject: incorrect GPS output result |
Hi, I'm new to this forum. I'm using PIC16F887 to get the time from GPS, store it & send it through RS232.
I get the correct output from GPS if connected directly to RS232
$GPGGA,134950.00, ... |
|