CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

GPS [solved]

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Jiewy



Joined: 27 Apr 2010
Posts: 8
Location: Penang Malaysia

View user's profile Send private message MSN Messenger

GPS [solved]
PostPosted: Mon Sep 06, 2010 2:37 am     Reply with quote

Hey guys, I am doing a GPS Robot and I feel that I am nearing the final stages. Right now, I am kinda stuck in the last part.

I wanna display the lat and long but it can't.

For example the lat is 05.272453 but in the lcd it only display 5.27. I am using the float data type but is there any data type that will show all of the values?

This is part of the coding:-
Code:

lcd_gotoxy(1,4);
printf(lcd_putc," %f %f ", TLat2, TLong2);

Help on this matter pls. xD
Jiewy



Joined: 27 Apr 2010
Posts: 8
Location: Penang Malaysia

View user's profile Send private message MSN Messenger

PostPosted: Mon Sep 06, 2010 3:32 am     Reply with quote

Its okie guys I have found out the solution.

%.6f

LOL.
tinley



Joined: 09 May 2006
Posts: 67

View user's profile Send private message Visit poster's website

PostPosted: Mon Sep 06, 2010 7:28 am     Reply with quote

Or if you want the leading zero use:

%09.6f
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group