wood burning stoves 2.0*
The moose likes Java Micro Edition and the fly likes String representation of a double on CLDC 1.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "String representation of a double on CLDC 1.0" Watch "String representation of a double on CLDC 1.0" New topic
Author

String representation of a double on CLDC 1.0

Dave Brown
Ranch Hand

Joined: Mar 08, 2005
Posts: 301
Hi all,

Anyone have a solution to get a string representation of a double variable in CLDC 1.0 ?

Thanks..

Dave.


Regards, Dave Brown
SCJP 6 - [url]http://www.dbws.net/[/url] - Check out Grails Forum
Ramender Mall
Ranch Hand

Joined: Sep 08, 2005
Posts: 311
Hi Dave,

As far as I know, cldc1.0 does not support floating points..
So how come you are creating a double variable, first of all??...

Ramy...
Dave Brown
Ranch Hand

Joined: Mar 08, 2005
Posts: 301
Hi,

I'm wanting to use the Location Based Services JSR.. to pick up latitude & longitude values which are doubles.

Rgds,

Dave.
Ramender Mall
Ranch Hand

Joined: Sep 08, 2005
Posts: 311
Hi Dave,
This Location based services was a complete new term for me. A quick google search took me to, lbs
and seems that you cant use cldc1.0 with it, i am quoting some lines,

JSR 179 requires the Connected Device Configuration (CDC) or version 1.1 of the Connected Limited Device Configuration (CLDC). CLDC 1.0 isn't adequate because it doesn't support floating-point numbers, which the API uses to represent coordinates and other measurements. The Location API doesn't depend on any particular profile -- it can be used with MIDP or the Personal Profile.


BEST OF LUCK..
Ramy....
Dave Brown
Ranch Hand

Joined: Mar 08, 2005
Posts: 301
Yeah thx, you're right, Well there goes that project then !!
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

Originally posted by Dave Brown:
Yeah thx, you're right, Well there goes that project then !!


Too funny.

Who says you can't get newer devices or still write that application?

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Dave Brown
Ranch Hand

Joined: Mar 08, 2005
Posts: 301
Well after further research, for my particular project, it seems theres more factors presenting the cons of using location based services than there are pro's.
Todd Plambeck
Greenhorn

Joined: Jan 27, 2005
Posts: 10
Why not just stuff the Lat and Long into strings? That's how the NMEA data is going to come to you anyway. Pass the strings back to the server and let it take care of the math. Unless you're trying to put a bomb down a smokestack, you really only need about 4 or 5 digits of precision to get good position.
 
jQuery in Action, 2nd edition
 
subject: String representation of a double on CLDC 1.0
 
Similar Threads
Floating point number format
how to avoid -e exponential representation in servlet
Trig functions
Deploying Project in EclipseME
Unable to install midlet on real divice (SE P900) urgent