You Are Here:

Community: Developer Discussion Boards

#1 Old JSR-179 Orientation Implementation - 2007-11-22, 01:38

Join Date: Nov 2003
Posts: 7
MrPatol
Offline
Registered User
Hello,
i've been trying several fatures of JSR-179 Location API using a Nokia6110 Navigator and a E61 with some different external bluetooth GPS.

First I have to say that Nokia implementation of Location API seems to lack of base data that normal GPS provide, like the speed and the course. From Nokia API I get out only Float.NaN values. However those values cam be calculated without much effort.

Recently I bought a GPS Wintec WBT-100 with geomagnetic compass and expected to be able to use Orientation class to gather geomagnetic north (device provide $HCHDG command of NMEA0183 standard)
Unfortunately also Orientation API returns NaN values.

It's planned some sort of Location API enhancement in near future to be able to get available data on GPS ?

Thanks
Lorenzo
Reply With Quote

#2 Old Re: JSR-179 Orientation Implementation - 2007-11-22, 11:35

Join Date: Mar 2003
Posts: 6,215
petrib
Offline
Forum Nokia Champion
If such support is added, you most likely are going to need a new device (the chances of getting it in a firmware update or a separate user-installable software are rather slim).

You can also, possibly, ignore JSR-179 and use BT serial port access and do everything (NMEA) yourself.
Reply With Quote

#3 Old Re: JSR-179 Orientation Implementation - 2007-11-24, 23:07

Join Date: Nov 2003
Posts: 7
MrPatol
Offline
Registered User
Thanks for the reply. I hate the politics to change hardware to get updates that can be made on software.

JSR-179 is simpler to use for the end user.
Other reason is that with upcoming models with integrated GPS (N95, 6110Navigator,N82) there is no BT stack, You can access only via JSR-179.

I'll see if with Location.getExtraInfo("application/X-jsr179-location-nmea")
I can get what is missing.

Thanks a lot
Lorenzo
Reply With Quote

#4 Old Re: JSR-179 Orientation Implementation - 2008-01-08, 13:36

Join Date: Nov 2004
Posts: 23
edudesouza
Offline
Registered User
I´m experience the same error.

Is there another way to get the current course?

I need to know, if the person (device) is traveling North, South ...

Thanks.
Reply With Quote

#5 Old Lightbulb Re: JSR-179 Orientation Implementation - 2008-01-08, 23:22

Join Date: Nov 2003
Posts: 7
MrPatol
Offline
Registered User
Yes, the work around is taking two coordinates and make some math/trogonometry. You calculate the angle of the segment that passed between 2 points and the vertical axis (north) and you get the course angle.

Midp 2 is missing of some trigonometry function to archive the goal, you can find a useful class here:

http://henson.newmail.ru/j2me/Float11.htm

and here the math (thanks to www.eriadne.org , send them donations):


double dx = pointB.x - pointA.x;
double dy = pointB.y - pointA.y;

double angleRad = Float11.angle(dx,dy);
float angleDeg = (360+(float)Math.toDegrees(angleRad))%360;
float courseAngleFromN = (float)(360+180-(int)angleDeg)%360;
Last edited by MrPatol : 2008-01-09 at 22:06.
Reply With Quote

#6 Old Re: JSR-179 Orientation Implementation - 2008-01-09, 16:55

Join Date: Jun 2007
Posts: 2
ricardo_ogliari
Offline
Registered User
The method "angle" does not exits in the Float11 class...

What I do?
Reply With Quote

#7 Old Thumbs up Re: JSR-179 Orientation Implementation - 2008-01-09, 21:59

Join Date: Nov 2003
Posts: 7
MrPatol
Offline
Registered User
Oops, true, I added myself. Here it is :

static public double angle(double dx, double dy){

if(dx>0.0 && dy>=0.0){
return atan(dy/dx);
}else
if(dx>0.0 && dy<0.0){
return atan(dy/dx)+2.0*Math.PI;
}else
if(dx<0.0){
return atan(dy/dx)+Math.PI;
}else
if(dx==0.0 && dy>0.0){
return Math.PI/2.0;
}else
if(dx==0.0 && dy<0.0){
return 3.0*Math.PI/2.0;
}

return Double.NaN;
}
Last edited by MrPatol : 2008-01-09 at 22:05.
Reply With Quote

#8 Old Re: JSR-179 Orientation Implementation - 2008-01-10, 14:06

Join Date: Nov 2004
Posts: 23
edudesouza
Offline
Registered User
Hi guys and Mr Patol, we made an simple implementation to see the angle. We are receiving very different values. I´m stopped, so I think we should receive angles with a less margin error.

Please take a look:

177.0
229.0
124.0
264.0
243.0
231.0
198.0
92.0
108.0
101.0
161.0
289.0
280.0

Do you know how could we calculate an average value?
Do you have the same problem?
Thanks
Reply With Quote

#9 Old Re: JSR-179 Orientation Implementation - 2008-01-11, 00:00

Join Date: Nov 2003
Posts: 7
MrPatol
Offline
Registered User
Just a quick question, (sorry if it may seem a bit dumb ): are you testing outdoor ? and how much meters of distance you have between the 2 collected points ? (using GPS indoor give non usable positions and not walking gives random position within GPS error range of 5-10 meters).

.... if by "stopped" you mean that you don't walk then it will never work.
Reply With Quote

#10 Old Re: JSR-179 Orientation Implementation - 2008-01-11, 00:28

Join Date: Nov 2004
Posts: 23
edudesouza
Offline
Registered User
Yeah ... to be more precise, stopped means sitted and indoors.

I thought I was working because the position is correct.

I tried a few hours ago driving home and I got the same impression. I will try again, but this time walking.

I let you known the results.

Thanks.
Last edited by edudesouza : 2008-01-11 at 12:41.
Reply With Quote

#11 Old Re: JSR-179 Orientation Implementation - 2008-01-11, 05:09

Join Date: Aug 2007
Posts: 46
Send a message via Skype™ to satyarajasekhar
satyarajasekhar
Offline
Registered User
Hi,
Please let me know how to implement external GPS in J2ME. Is there any external hardward required or can we manage with the software. I require getting the latitude and longitude values without the assistance of GPS. I used to know different methods to retrieve the longitude and latitude such as cell ID, E-TOAD and others.

Please let me know the simplest procedure to retrieve those latitude and longitude values.

Thanks,
G.S.Rajsekhar
Reply With Quote

#12 Old Red face Re: JSR-179 Orientation Implementation - 2008-01-15, 17:58

Join Date: Jan 2008
Posts: 19
LEnS
Offline
Registered User
Hello,

it's may be a silly question,

but can I change my Java settings on my Nokia 6125.
I've a Midlet with Location methods and if I install my Midlet on my phone I get a NoClassDefFoundException.

I would thankful for any help and adice

Lena
Reply With Quote

#13 Old Cool Re: JSR-179 Orientation Implementation - 2008-01-15, 23:11

Join Date: Nov 2003
Posts: 7
MrPatol
Offline
Registered User
Quote:
Originally Posted by LEnS View Post
Hello,

it's may be a silly question,

but can I change my Java settings on my Nokia 6125.
I've a Midlet with Location methods and if I install my Midlet on my phone I get a NoClassDefFoundException.

I would thankful for any help and adice

Lena
Hi Lena,
your model does not have JSR-179
http://www.forum.nokia.com/devices/6125
You can do nothing else than get a new phone.
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
Obtaining phone location using CellID and JSR 179 or any other Nokia Java API kkannapp Mobile Java General 7 2008-02-08 13:02
E61, CDC & JSR 179 jdesjean Mobile Java Tools & SDKs 2 2007-06-27 14:41
jsr 179 and jsr 226 questions shydisturbedboy Mobile Java General 3 2007-05-27 06:59
JSR 179 Implementation gruntzd Mobile Java General 1 2007-02-26 08:31

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d135023X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE44iscussionQ qdcZtypeQUqfntypeZE44iscussionContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZlocationQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE44iscussionQ qfnZtypeQUqfntypeZE44iscussionContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qfnZuserE5ftagQSxlocationE2dbasedE2dservicesX qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE44iscussionQ qrdfZtypeQUqfntypeZE44iscussionContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ