Changing GPS co-ordinates into Degrees-Minutes-Seconds


Results 1 to 19 of 19

Threaded View

  1. #16
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by FromTheCockpit View Post
    I got the co-ordinates working now. Just wondering how to go about getting the speed into variable as it keeps changing, 1.14 knots now, may be 100.20 knots later!
    That's great!

    To convert knots to Km/h:


    Code:
    knots var word 'xx.x knots is going to have to become xxx knots for this math
    kmph var word
    temp var word
    
    temp = knots * 1852            'first part of div32 function
    kmph = div32 1000              'this result should be printed out with one decimal
                                   'in other words result xxx should be printed as xx.x km/h
    so for above example, if you had 30.0 knots as speed then
    knots = 300
    temp = knots * 1852 = 555600

    (you may notice this is bigger than 16 bits, but that's ok. The div32 lets us have up to a 31 bit number, so not to worry).

    555600/1000 = 555

    So, the answer must be printed out in decimal as 55.5 km/h

    which is the pbp way to do knots * 1.852 = km/h
    Last edited by ScaleRobotics; - 2nd November 2009 at 03:34.
    http://www.scalerobotics.com

Similar Threads

  1. GPS $GPRMC to PIC16F684. Need help with SERIN2
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 27th November 2009, 09:47
  2. Virtual LED Clock For Windows By Trent Jackson
    By T.Jackson in forum Code Examples
    Replies: 8
    Last Post: - 10th November 2009, 08:20
  3. new and need help
    By smeghead in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 3rd November 2008, 20:19
  4. GPS clock timing !
    By bethr in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 3rd July 2008, 20:11
  5. DS1994 Memory/Time iButton
    By NavMicroSystems in forum mel PIC BASIC Pro
    Replies: 47
    Last Post: - 22nd October 2006, 11:55

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

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