×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Regular Contributor
    Join Date
    Jan 2010
    Posts
    52

    Getting speed off a bluetooth GPS device

    Hey guys,

    I'm developing a J2ME MIDlet for a S40 device that connects and reads raw NMEA data off a BT GPS device (I used this as reference);
    I need to be able to know whether or not the GPS device is in movement. The device will be in a car. Is there / can you think of a way to get the speed of the device off the GPS or otherwise find out if the device is in movement?

    Thanks!

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,087

    Re: Getting speed off a bluetooth GPS device

    You need to check fetch and read the GPS data NMEA string after every 1 min from GPS reciever and if you get different readings of lat/long you can understand that the device is moving.

    You can calculate distance between two pairs of lat/long and divide it by the time gap in which you have read these pair of lat/long to find the speed.

    thanks,
    ~Amitabh

  3. #3
    Regular Contributor
    Join Date
    Jan 2010
    Posts
    52

    Re: Getting speed off a bluetooth GPS device

    Hey,

    Thanks for the response. I tried using a Vector to keep the last 5 coordinates read from the device (I query the device for its location every 1 second). I then took the min and max longitude and latitude out of the last 5 coordinates and then subtracted the min from the max to receive a diff. I tried to play around with that diff - couldn't really get to a place where I can really indicate a movement with a 10 seconds or so resolution. Anyone has a better idea?

    Thanks!

  4. #4
    Super Contributor
    Join Date
    Apr 2007
    Posts
    2,708

    Re: Getting speed off a bluetooth GPS device

    afaik there are mathematical solutions for establishing the distance inbetween 2 GPS coordinates...
    That's all you need, together with a time-stamp of these two coordinates....
    You got the distance, you got the time, you can calculate the speed...
    You should NOT calculate the difference in longitude and latitude and relate this to a disctance ! A specific difference in longitude/latitude is NOT constant throughout the globe... A distance of 1 latitude might be (as an example) 2000 meters in one part of the globe and 4000 meters on another part...

  5. #5
    Regular Contributor
    Join Date
    Jan 2010
    Posts
    52

    Re: Getting speed off a bluetooth GPS device

    I see. Where can I find these mathematical formulas?

    Thanks!

  6. #6
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,087

    Re: Getting speed off a bluetooth GPS device

    Try this service...

    http://boulter.com/gps/distance/

    thanks,
    ~Amitabh

  7. #7
    Super Contributor
    Join Date
    Apr 2007
    Posts
    2,708

    Re: Getting speed off a bluetooth GPS device

    you can find them on google
    So did I so I am sure they are avalable...
    It's better for you to search for them, because most of the time they are accompanied by an explanation and why you should choose for a specific one (there are a least a couple of different ones, some see the globe as a sphere and some don't because obviously it's not, but also makes the calculation much more complex)...

Similar Threads

  1. how to get the speed of the device using gps
    By amit.mangal in forum Symbian
    Replies: 1
    Last Post: 2009-12-30, 12:04
  2. bluetooth passkey problem
    By Lizard_hun in forum Symbian Networking & Messaging (Closed)
    Replies: 3
    Last Post: 2009-07-22, 00:15
  3. Bluesoleil Software
    By kencooper in forum Bluetooth Technology
    Replies: 9
    Last Post: 2008-08-29, 19:46
  4. 6650/1 Bluetooth speed limited to 120kbps?
    By AltoVentures in forum General Development Questions
    Replies: 0
    Last Post: 2004-08-04, 06:24

Posting Permissions

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