| Reply | « Previous Thread | Next Thread » |
|
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 |
|
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. |
|
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 |
|
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. |
|
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.
|
|
The method "angle" does not exits in the Float11 class...
What I do? |
| ricardo_ogliari |
| View Public Profile |
| Find all posts by ricardo_ogliari |
|
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.
|
|
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 |
|
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. |
|
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.
|
|
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 |
| satyarajasekhar |
| View Public Profile |
| Find all posts by satyarajasekhar |
|
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 |
|
Quote:
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 | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| 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 |