×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Jun 2011
    Posts
    5

    Cool PLEASE HELP! need speed from GPS

    I've spent many hours figuring out how to do this. I found some posts but other than KuneriLite (which is deprecated). There seems to be no way.

    I've used the apibridge and I can easily get the long and lat data. When I look on my phone I can see in my phone that the position data for altitude, speed etc... and more is available.

    Is there no way to tap into the speed through the apibridge for s60 flashlite 3.1 devices?

    Please don't tell me I have to use some insane trig to determine speed from the long and lat data! Because I've looked at the math and I think the flashlite player would explode!

    Any help much appreciated (I'm hoping there is a hidden parameter I can send to the api service constructor!).

    Cheers,
    mobiman

  2. #2
    Registered User
    Join Date
    Jun 2011
    Posts
    5

    Re: PLEASE HELP! need speed from GPS

    Uh oh 75 views with no replies. Surely someone has tried to get the speed from the Location service? sigh

  3. #3
    Registered User
    Join Date
    Jun 2011
    Posts
    5

    Re: PLEASE HELP! need speed from GPS

    Ok so I went the math route with finding speed which seems to work. Now as one would expect now that everything is working the APIbridge fails. The app works fine and then after a few prompts of (allow app to access user data), it works for about 5 minutes and then I get the error "Internet: server not found." I presume that means the 127.0.0.1 etc... server that is the APIBridge fails and crashes. Has anyone seen this and hopefully has some insight? I try restarted the app and then the same thing. The only fix is to restart the entire phone. I'm using a nokia 5230 with flashlite 3.1.

  4. #4
    Nokia Developer Champion
    Join Date
    Apr 2005
    Location
    Boston
    Posts
    517

    Re: PLEASE HELP! need speed from GPS

    Ciao,

    the speed is the 3rd parameter in th eGPS coordinates in the Platform Services API, check here for more details: http://www.developer.nokia.com/Resources/Library/

    Alessandro

  5. #5
    Nokia Developer Champion
    Join Date
    Feb 2011
    Location
    bucharest
    Posts
    151

    Re: PLEASE HELP! need speed from GPS

    try use WRT and embed the flash...

    and calculate the speed

    speed=distance/time

    here is a sample code from one of my application (holoSpeed: http://store.ovi.com/content/108914)
    I modify the callback function from the sample code that gets GPS data (also modify the showObject function from sample code)

    Code:
    function showObject(obj){
    	var txt = "";
    	try{ 
    		if(typeof obj!='object')
    			return ""+obj+'<BR/>';
    		else{
    			for(var key in obj){
    				txt+=key+"::";txt+=showObject( obj[key] );txt+='<BR/>';
    			}
    			txt+='<BR/>';
    		}
    	}catch(e){
    		alert("showObject: "+e);
    	}
    	return txt;
    }
    .......
    .........
    .......
    function callback1(transId, eventCode, result){
    	if(!checkError("ILocation::getLocationAsync",result,DIV_ID,imgid_callback1)) {
    		aux=showObject(result.ReturnValue);
    		d=new Date();
    		timp=d.getHours()+":"+d.getMinutes()+":"+d.getSeconds();
    		t1=d.getTime();
    		t=t1-t2;
    		tt=t/1000;
    		t2=t1;
    		//"Distance::"+getDistance()+
    		aux=aux.split("<BR/>");
    		LNG0=LNG;
    		LAT0=LAT;
    		ALT0=ALT;
    		LNG=aux[0];LNG=LNG.split("::");LNG=LNG[1];
    		LAT=aux[2];LAT=LAT.split("::");LAT=LAT[1];
    		acc=aux[4];acc=acc.split("::");acc=acc[1];
    		tim=aux[6];tim=tim.split("::");tim=tim[1];
    		d=getDistance()-0;
    		v=3600*d/t;
    		document.getElementById("holoSpeed").SetVariable("txtJS","<BR>lng::"+(LNG-0)+"<BR>lat::"+(LAT-0)+"<BR>distance::"+d+"<BR>speed::"+v+"<BR>time:"+timp);
    	}
    }
    the line v=3600*d/t; calculates the speed in km/h

Similar Threads

  1. print GPS speed from j2me emulator
    By souhir in forum Mobile Java General
    Replies: 1
    Last Post: 2010-07-13, 06:59
  2. Get Speed from GPS
    By .david. in forum Symbian
    Replies: 3
    Last Post: 2010-02-24, 21:33
  3. speed from GPS show wrong value
    By samosnokia in forum Symbian
    Replies: 13
    Last Post: 2009-06-25, 19:19
  4. Replies: 18
    Last Post: 2009-06-10, 08:28
  5. help please pyo speed up
    By saad1396 in forum Symbian
    Replies: 2
    Last Post: 2006-09-18, 14:53

Posting Permissions

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