How do I discern Maidenhead Locator from GPS lat long info.


Closed Thread
Results 1 to 40 of 126

Hybrid View

  1. #1
    Join Date
    Dec 2011
    Location
    IO93ok
    Posts
    190

    Default Re: How do I discern Maidenhead Locator from GPS lat long info.

    Now this is interesting.

    If I mess with the size of any 'secs' variables it screws everything up. I can get Lat to 4 decimal places but not Long, it still goes to zero.

    Right now I put the code back to original and got IO93ok03kg as the locator. I'm going to reduce this to the 4 pair for display just now, only to get more on screen.

    I put my phone with the app running next to the gps antenna.
    The phone was showing a fix to 16 sats and gave IO93ok03lh with 53 25.8266 and 0 49.7704 as the co-ordinates.

    For mine. When I had the 4 decimal places shown on the display it showed 25.8246
    Rob.

    The moment after you press "Post" is the moment you actually see the typso

  2. #2
    Join Date
    Dec 2011
    Location
    IO93ok
    Posts
    190

    Default Re: How do I discern Maidenhead Locator from GPS lat long info.

    It's between DEC4 in gps string and Aint in locator code.

    I can get the display right but not the locator using DEC4 in the gps string and DIGs in the display LCDOUT.

    I can get the locator right but not the position display if I just use latsecs as the variable in the gps input string.

    Not knowing how Aint works I'm stumped now.

    EDIT:

    Just walked the property with the phone. Wow, those squares are small. I get LG, LH, KG, KH and guess where the crossover is, yes, right around the room where the unit is. I think I'll stick to DEC2 for now
    Last edited by tasmod; - 22nd April 2014 at 15:58.
    Rob.

    The moment after you press "Post" is the moment you actually see the typso

  3. #3
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959

    Default Re: How do I discern Maidenhead Locator from GPS lat long info.

    With DEC4 change it to this for the Longitude ...
    Code:
    ;----[convert Longitude Sexagesimal to Decimal Degrees]-------------------------
    Aint = LonMinDec : GOSUB ItoFA    ; decimal portion of Minutes
    Bint = 10000 : GOSUB ItoFB        ; divided by 10000
    GOSUB fpdiv
    Bint = LonMin : GOSUB ItoFB       ; add whole portion of Minutes
    GOSUB fpadd
    Bint = 60 : GOSUB ItoFB           ; divide by 60
    GOSUB fpdiv
    Bint = LonDeg : GOSUB ItoFB       ; add degrees
    GOSUB fpadd
    IF LonDir = "W" THEN              ; if west of Prime Meridian
        @ MOVE?FF32 AARGB2, BARGB2    ; copy Float AARG to BARG
        Aint = 0    : GOSUB ItoFA     ; subtract from 0 to negate
        GOSUB fpsub
    ENDIF
    
    Bint = 180  : GOSUB ItoFB         ; add 180
    GOSUB fpadd
    And do the same thing with the Latitude.
    DT

  4. #4
    Join Date
    Dec 2011
    Location
    IO93ok
    Posts
    190

    Default Re: How do I discern Maidenhead Locator from GPS lat long info.

    That was it.

    Using "DEC4 latsecs/lonsecs" in the gps string and changing to Word size variables uses the 4 decimal places.

    Interestingly using battery power for the unit, I got exactly the same reading as the phone app moving the unit around.

    Thanks Darrel.

    I'm now looking at making the time display more accurate to the second epoch using DT_Ints
    Rob.

    The moment after you press "Post" is the moment you actually see the typso

  5. #5
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959

    Default Re: How do I discern Maidenhead Locator from GPS lat long info.

    Quote Originally Posted by tasmod View Post
    I got exactly the same reading as the phone app moving the unit around.
    Yahooo!

    I'm now looking at making the time display more accurate to the second epoch using DT_Ints
    If you are going to add interrupts, you'll need to make some changes.

    SERIN2's baudrate is software timed, and it doesn't like being interrupted.
    You'll have to move the serial lines over to RC6 and RC7 (the USART pins).
    Then use HSERIN instead of SERIN2.
    HSERIN is not affected by the interrupts.
    Last edited by Darrel Taylor; - 22nd April 2014 at 23:08.
    DT

  6. #6
    Join Date
    Dec 2011
    Location
    IO93ok
    Posts
    190

    Default Re: How do I discern Maidenhead Locator from GPS lat long info.

    Hmm, guess which pins are not catered for on pcb ?

    Redesign methinks.
    Rob.

    The moment after you press "Post" is the moment you actually see the typso

  7. #7
    Join Date
    Dec 2011
    Location
    IO93ok
    Posts
    190

    Default Re: How do I discern Maidenhead Locator from GPS lat long info.

    Redesign completed. New board made where all pins are accessible and pads for option of pullups/down resistors.

    I have altered the software to use HSERIN and HSEROUT and all is well at the moment. It is working just fine.

    Using the code in previous post:

    My aim was to display the clock triggered by the gps pps signal. I tried DT_Ints and added the @ INT_RETURN where the original Clock sub had RETURN. This caused the display to only update the very first square with random characters per second with PPS signal.

    This is the setup naming Clock. I wasn't sure where to put the INT_Enable . I tried just after this ASM and at beginning of Clock routine with same result.

    Code:
    ;--------------------------------------------------------------------------
    
    ASM
    INT_LIST  macro    ; IntSource,        Label,  Type, ResetFlag?
            INT_Handler    INT_INT,        _Clock,      PBP,  yes
        endm
        INT_CREATE               ; Creates the interrupt processor
    ENDASM
    
    ;--------------------------------------------------------------------------  
    @   INT_ENABLE   INT_INT     ; enable external (INT) interrupts
    Rob.

    The moment after you press "Post" is the moment you actually see the typso

Similar Threads

  1. LAT replaces PORT command?
    By markscotford in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 3rd December 2011, 16:37
  2. Need Info for PBP?
    By azmax100 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 30th January 2009, 07:44
  3. Replies: 1
    Last Post: - 27th July 2008, 06:14
  4. dmx info.
    By oscar in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 8th May 2005, 11:54

Members who have read this thread : 0

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