Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

String representation of a double on CLDC 1.0

 
Dave Brown
Ranch Hand
Posts: 301
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

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

Thanks..

Dave.
 
Ramender Mall
Ranch Hand
Posts: 311
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 301
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 311
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 301
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah thx, you're right, Well there goes that project then !!
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Dave Brown
Ranch Hand
Posts: 301
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic