Shop OBEX P1 Docs P2 Docs Learn Events
GPS Receiver Module - Response Time — Parallax Forums

GPS Receiver Module - Response Time

Steve NelickSteve Nelick Posts: 25
edited 2009-03-21 21:52 in Propeller 1
I bought a Parallax GPS Receiver Module, and I'm learning how to use it. I wrote a program to get seven pieces of information from the GPS: GetValid, GetSats, GetLat, GetLong, GetAlt, GetSpeed, and GetHead. When I run the program it takes more than 5 seconds to run these seven commands.

Is that how long it's suposed to take?

Comments

  • dredre Posts: 106
    edited 2009-03-14 16:07
    Note line:

    SERIN Sio, Baud, 3000, No_Response, [noparse][[/noparse]ver_hw, ver_fw]

    I believe "3000" is the number of milli-seconds 'timed-out' till the program falls through to the next line.
    See the Stamp manual under 'Serin"

    I hope this answers your question.

    cheers, David
  • SRLMSRLM Posts: 5,045
    edited 2009-03-14 17:39
    Can you post your program?
  • SuffernEDDSuffernEDD Posts: 10
    edited 2009-03-18 15:31
    would u be able to post your program... I am having some trouble getting the gps to communicate with the computer
  • Steve NelickSteve Nelick Posts: 25
    edited 2009-03-20 14:44
    Hi SuffernEDD

    I never posted a program before this. I'll give it a try. I just uploaded·my program: GPS.SPIN

    I use the Parallax 4X20 LCD for debugging. For testing the GPS, the GPS.SPIN program gets readings from the GPS and displays the results on the LCD.

    I'm building a robot, using the Parallax Motor Mount and Wheel Kit.·I put the·Parallax GPS on the robot, and it's connected to a Propeller ProtoBoard. Also connected to the ProtoBoard is a Parallax eB500 Bluetooth transceiver. I transmit the readings from the GPS to my PC, and display the reading on the PC. On the PC side, I bought a book at Barnes and Noble, , "Head First C#", and I wrote a C# program.

    I've been checking the GPS readings using GOOGLE MAPS. I live in the city, so I don't get a good view of the sky. Sometimes the readings from the GPS are very accurate, but sometimes the GPS thinks I'm located at one of my next door neighbors. I was suprised·to see that the GPS works inside the house, next to my PC. There is a window that provides access to the satellites. That helped a lot, I didn't have to go outside while I was writing the programs.
  • JDJD Posts: 570
    edited 2009-03-20 17:08
    Steve,

    You may get quicker Propeller programming help if this was moved to the Propeller forum; would you like me to move this thread to the Propeller forum?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Respectfully,


    Joshua Donelson
    www.parallax.com
  • Steve NelickSteve Nelick Posts: 25
    edited 2009-03-21 14:04
    Hi Joshua

    I just found the answer to the question I posted: 'Is that how long it's suposed to take?' by searching on Google.

    The answer is: YES.

    The Parallax gps has two modes, a SMART MODE, which is very, very slow, but is easy to use, and a STANDARD RAW NMEA0183 mode. The demo program from Parallax, GPS DEMO.BS2 uses the SMART MODE, and it is very, very slow.

    Steve
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-03-21 16:31
    The data provided by raw mode is the same data used by smart mode to return its values. If smart mode is, as you say, slow, it may be that each time you invoke it, it waits for the next available string from the GPS that includes the requested info. Typically, a complete set of NMEA strings are emitted once per second. So, if you make seven separate smart mode requests, five seconds is a reasonable amount of time to fulfill them with the latest GPS data. BTW, it may be possible to speed things up if you change the order in which the requests are made.

    -Phil
  • Steve NelickSteve Nelick Posts: 25
    edited 2009-03-21 21:52
    Hi Phil

    Thanks for your response! When I searched on Google, one of the things I found was that there a discussion of the GPS sensor going on in the Javelin section of this Forum. The discussion was between Peter Verkaik and Isha Powron. Here is a note from Isha to Peter on 3/17/2009.

    _________________________

    Thank's again Peter,

    I have it working now (or should I say; you have it working!).

    I am suprised at the slow response with the "smart mode" calls. i.e., if you do this;

    myGps.getTime();
    Satellites = myGps.getSats();
    HRS = myGps.hours;
    MINS = myGps.minutes;
    SECS = myGps.seconds;

    it takes around 2 seconds for the GPS to send the data back.

    In Raw mode, you can get the stream, parse the data and convert the variables in about half a second.

    I would have thought that by putting a micro on the GPS, you would have been able to get the data out faster.

    Thank's anyway for your help. At least I have been able to test the 'smart" mode.

    regards,

    Istha

    __________________________

    And I found this on Google:

    ________________________

    I have one of the Parallax GPS units and there are two modes. The normal
    mode just sends out NMEA lines that you can parse with the BX24. And a smart
    mode, where you simply ask for the data you want. The smart mode however, is
    somewhat slow in that it has to wait for the NMEA line to pass before it
    responds.

    Parallax supplies the code that runs on the GPS. You would need to download
    their SX/B compiler and have a SX-Key to download a modified firmware. This
    would be a bit advanced, but could be done.

    Jim Fouch

    ________________________

    As you suspected Phil, the NEMA strings are emitted once per second, and each request in Smart Mode waits one second for the next NEMA line to pas before it responds.

    I really like the Parallax GPS. The response time isn't going to be a probem now that I know about it. At first it was problem, because checking the sensors was in my main program loop. The robot was stopping, waiting for the GPS data. I moved reading the GPS data to it's own cog. Also, I think I'll explore using the NEMA mode in place of the SMART MODE.


    Steve
Sign In or Register to comment.