help with error checking GPS data over audio link


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2005
    Posts
    15

    Default help with error checking GPS data over audio link

    I am sending GPS data over an audio link using a modem ic. On the TX side I have broken down the GPS data and I’m sending just the speed, heading and altitude. If it matters, I’m dropping the decimal numbers and only working with whole numbers to make things easier to convert later. My problem is that the wireless link is not the best and the data gets corrupted at times. What I’m doing is sending the speed, heading and altitude three times to the RX unit then I want to compare them against each other. Since my GPS updates every 2 seconds there are no issues with timing. I am successfully sending the data to the RX unit then outputting to the PC now. I just don’t know the best way to compare the data or the best format to send it. Eventually my plan is to send it to a LCD not a PC. At this time the program consists of three serin2 (1200bps) lines, one for each $1, $2, and $3; then three serout2 (4800bps) commands to view the data. It would be great if I could compare the speed, heading and altitude individually rather than the whole line. I don’t mind if I drop a couple of updates here and there I just don’t want to display garbage on the screen. Any help would be greatly appreciated.

    Best regards,
    Mark


    Here is the format it is sent/received in. I am planning to change the 1,2,3 to A,B,C;

    $1,speed,heading,altitude
    $2,speed,heading,altitude
    $3,speed,heading,altitude


    Here is a snippet of some actual data transmitted to the receive unit and output to the PC. As you can see it makes it through 2 out of 3 times most of the time.;

    $1,2,351,334
    $2,2,351,334
    $3,2,¦Sbššâj

    $1,2<357,334
    $2,2,357,334
    $3,2,357,334

    w¿ñ$1,2,355,¦&SHø
    $2,2,355,334
    $3,2,355,334

    ÿ$1,1,353,333
    $2,1,353,333
    $3,1,353,333

    $1,1,35Miššj
    $2,1,355,333
    $3,1,355,333

    $1,1,11–¦&¦Hø
    $2,1,11,332
    $3,1,11,332

    ø$1.1,29,332
    $2,1,29*332
    $3,1,29,33-
    ã

  2. #2
    Join Date
    Feb 2005
    Posts
    15


    Did you find this post helpful? Yes | No

    Default help with checksum

    I need to create a checksum to send with my data over my wireless link. I have three to five string variables to send. I will not know the length of the strings as they will always be changing. Can I just add the strings and save the result as a word or byte? For example;

    spd var byte
    deg var byte
    alt var byte
    cs var word

    ‘serin2 my data as string variables
    cs = spd + deg + alt
    serout2 Pinout,baudout,["$A,",str spd,",",str deg,",",str alt,"*",cs,"*",13,10]


    Will this work? If anyone has the knowledge to do this please help. If I'm way off base please let me know. This checksum thing has got me stumped. I’m new to programming and don’t know how to proceed.

    Thanks,
    Mark

  3. #3
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    serout2 Pinout,baudout,Mode,["$A,",#spd,",",#deg,",",#alt,"*",#cs,"*",13,10]
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. Using Nokia LCD
    By BobP in forum mel PIC BASIC Pro
    Replies: 300
    Last Post: - 3rd May 2018, 04:47
  2. Nokia 3310 display text
    By chai98a in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 26th August 2007, 03:39
  3. Big characters on HD44780 4x20
    By erpalma in forum mel PIC BASIC Pro
    Replies: 23
    Last Post: - 7th January 2007, 02:21
  4. LCD + bar graph
    By DynamoBen in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 5th October 2005, 14:50
  5. Sinus calculating !
    By Don Mario in forum mel PIC BASIC Pro
    Replies: 29
    Last Post: - 28th November 2004, 23:56

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