Array and ASCII


Closed Thread
Results 1 to 19 of 19

Thread: Array and ASCII

Hybrid View

  1. #1
    Join Date
    Sep 2011
    Posts
    20


    Did you find this post helpful? Yes | No

    Default Re: Array and ASCII

    Tried that too....just testin to see if I can split the Array....send upto 48 then insert dec3 heading and then send the remainder of the string....see if that works....worth a try....starting to bang my head against the wall here :>)
    Serout2 bob, baud, [Str WPT_array\48,dec3 heading, Str WPT_array_2\13,13,10] just tried this as well and that doesn't work....oh well
    Last edited by Seahound1; - 25th May 2012 at 22:48.

  2. #2
    Join Date
    May 2006
    Location
    Del Rio, TX, USA
    Posts
    343


    Did you find this post helpful? Yes | No

    Default Re: Array and ASCII

    starting to bang my head against the wall here :>)

    Well, that's normally when the break through occurs.

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


    Did you find this post helpful? Yes | No

    Default Re: Array and ASCII

    The OSD may be verifying the Checksum in the NMEA sentance.
    When it doesn't match, it'll throw away the whole thing.

    If so, you'll need to recalculate it each time.
    http://www.picbasic.co.uk/forum/showthread.php?t=1469
    http://rietman.wordpress.com/2008/09...nmea-checksum/
    DT

  4. #4
    Join Date
    Sep 2011
    Posts
    20


    Did you find this post helpful? Yes | No

    Default Re: Array and ASCII

    The code has the checksum calculation in it....but I have cracked it!

    For some reason I don't understand ....not unusual tho......if the Array is constructed the other way around..
    WPT_array[44]=Dec_off Dig 1+"0"
    WPT_array[45]=Dec_off Dig 0+"0"
    WPT_array[46]="."
    WPT_array[47]=Dec_off Dig 0+"0"
    WPT_array[48]=","
    [B]WPT_array[49]= "0" + heading dig 2
    WPT_array[50]= "0" + heading dig 1 'Course Dig 2+"0"
    WPT_array[51]= "0" + heading dig 0

    so the "0" is in front of the variable it works......then you just add a bit of code to fill the array with the heading and hey presto! It has taken a lot of head banging and scratching.
    Last edited by Seahound1; - 27th May 2012 at 22:07. Reason: bad english

  5. #5
    Join Date
    May 2006
    Location
    Del Rio, TX, USA
    Posts
    343


    Did you find this post helpful? Yes | No

    Default Re: Array and ASCII

    I suspect something else is going on. As a test, I constructed my own array and sent the data out to an LCD using the STR variable\6 command. Worked either way I constructed the equation.

    ab_Test[0] = "0" + Heading DIG 2
    ab_Test[1] = "0" + Heading DIG 1
    ab_Test[2] = "0" + Heading DIG 0
    ab_Test[3] = Heading DIG 2 + "0"
    ab_Test[4] = Heading DIG 1 + "0"
    ab_Test[5] = Heading DIG 0 + "0"

  6. #6
    Join Date
    Sep 2011
    Posts
    20


    Did you find this post helpful? Yes | No

    Default Re: Array and ASCII

    You're right there is something else going on....turned the power off and back on and now it's not working again! trying to think of what I did the first time I got it working.

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