Shop OBEX P1 Docs P2 Docs Learn Events
GPS Helper -- What Features Would You Like To Have? — Parallax Forums

GPS Helper -- What Features Would You Like To Have?

Jon WilliamsJon Williams Posts: 6,491
edited 2005-12-16 19:11 in BASIC Stamp
A project of mine that is about to get a lot of attention is a GPS "helper" chip for BASIC Stamp modules.· What it will do is receive and buffer GPS data and then let the Stamp ask for the elements it wants as required.· The "helper" will be an SX28 programmed in SX/B (with almost no assembly -- only as absolutely needed) and when the project is working I will make the schematic and code freely available to whomever wants it (actually, we're going to put it into the SX/B help file).

So... my question is: What GPS fields are you using that you would like to get from the GPS helper?· To keep the chip compatible with other Parallax products, I will use our AppMod serial protocol.· An exchange between the Stamp and the helper might look like this:

· SEROUT Sio, Baud, [noparse][[/noparse]"!GPS", GetLatD]
· SERIN· Sio, Baud, [noparse][[/noparse]latDegrees]

Where "GetLatD"·would be·predefined constant for retrieving the latitude [noparse][[/noparse]whole] degrees field.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
«1

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-11-09 16:35
    Just a follow-up, please put your suggestions here and don't send them to my private e-mail box. Your suggestion(s) are likely to stimulate ideas in others and that's what I'm looking for.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • JonathanJonathan Posts: 1,023
    edited 2005-11-09 16:57
    Jon,

    Had a momentary time warp due to lack of coffee, and hit "reply" to your post like back in the old days instead of coming here.

    So, is full time data including DST possible? Another question is my GPS units can all refine their position by taking a lot of readings and averaging the data. Would it be possible to access this info, or does that change from unit to unit? If full sattelitte data is unavailable, is the number of sats. possible, and maybe which ones?

    Thanks for all you do!

    Jonathan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
  • steve_bsteve_b Posts: 1,563
    edited 2005-11-09 17:10
    Hi Jon,

    How about user defined fields....

    So if a string looks like this:

    $GPRMC,023042,A,3907.3837,N,12102.4684,W,0.0,156.1,131102,15.3,E,A*36
    Then number each individual field in binary...so:

    $GPRMC,023042,A,3907.3837,N,12102.4684,W,0.0,156.1,131102,15.3,E,A*36
    ···· 1·········· 2···4··· 8········· 16...etc...

    Then have the user send one INIT string to the SX that defines the wanted fields.· I know this is more overhead than you wanted....but it sure kills all the discussions about 'this field is better than that field'....



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·

    Steve

    "Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-11-09 17:18
    Jonathan,

    I could certainly add a feature that would allow the user to enter a time-zone offset; that way the time reported back would be localized instead of UTC.·· The way I'm looking at things now I will probably just look at the $GPRMC and $GPGGA strings; the latter provides altitude and number of satellites.

    Remember, this is supposed to be a *simple* program so that -- as with other Parallax demo code -- users can learn from it and expand on it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-11-09 17:21
    Steve,

    What I'd like to know is what people are *actually* using from their GPS units; in theory we can do anything but this a small project and I don't want to turn it into a big black hole by enabling every theoretical possibility.

    I think that the Stamp will be able to make these requests:

    · Hours
    · Mins
    · Secs
    · Time -- returns three bytes
    · Month
    · Day
    · Year
    · Date -- returns three bytes
    · latitude degrees -- two bytes; signed word
    · latitude minutes -- two bytes
    · longitude degrees -- two bytes; signed word
    · longitude minutes -- two bytes
    · heading -- two bytes (unsigned word)
    · altitude -- two bytes (signed word in meters)

    This is a lot to implement for a *quickie* project and should provide a good template for others.· Thoughts?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax

    Post Edited (Jon Williams (Parallax)) : 11/9/2005 5:25:26 PM GMT
  • Mike CookMike Cook Posts: 829
    edited 2005-11-09 18:15
    Cool,

    I'll quit working on mine, I was doing the same thing, trying to do the appmod protocol and monitor the GPS sensor using two interrupt driven serial ports. Was going to populate a fix length fields so BS2's or whatever would not have too much trouble reading the receiver values and acting upon them.

    I would like to see the code and schematic when your done, would like to modify it to work with the boat load of Axiom receivers that I have! tongue.gif

    Mike

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "OEM NMEA GPS Module" Now available on ebay for only $19.99

    Product web site: http://www.allsurplus.net/Axiom/

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-11-09 18:36
    You're free to do that, Mike, that's the whole point of the project. The only tricky part for me at the moment is implementing three UARTS (one RX for GPS, one RX for Stamp, on TX for Stamp) and do it in a manner that it can be adjusted without hassle. The rest is pretty trivial. As I'm think thing through this I feel like there's enough time between the $GPRMC and $GPGGA strings to parse out the relevant data.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • steve_bsteve_b Posts: 1,563
    edited 2005-11-09 21:11
    Hi Jon,

    I think the time is important....lots of ppl are after that for syncing other things.

    I'd prefer the Julian date over MM/DD/YY....unless you're logging things, you might want to know the year.· MM/DD would be fine.

    ACtually...going over your list....I'd think those are all useful.· I don't know the difference between MM/DD/YY and DATE....but one or the other would probably be all that's needed!
    Jon Williams (Parallax) said...
    Steve,

    What I'd like to know is what people are *actually* using from their GPS units; in theory we can do anything but this a small project and I don't want to turn it into a big black hole by enabling every theoretical possibility.

    I think that the Stamp will be able to make these requests:

    · Hours
    · Mins
    · Secs
    · Time -- returns three bytes
    · Month
    · Day
    · Year
    · Date -- returns three bytes
    · latitude degrees -- two bytes; signed word
    · latitude minutes -- two bytes
    · longitude degrees -- two bytes; signed word
    · longitude minutes -- two bytes
    · heading -- two bytes (unsigned word)
    · altitude -- two bytes (signed word in meters)

    This is a lot to implement for a *quickie* project and should provide a good template for others.· Thoughts?
    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·

    Steve

    "Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
  • JonathanJonathan Posts: 1,023
    edited 2005-11-09 21:25
    Does the time/date data from a GPS include daylight savings time? On my Nixie clock, I can get that information form the WWVB signal, but I don't know if it is included on a GPS. If it is, that would be a great addition if possible. I sure like having my clock auto reset itself. I suppose it could be parsed from the date though.

    Jonathan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-11-09 22:12
    The time reported by the GPS unit is UTC, that is, the time in Greenwich, England. You have to add a correction factor to localize the time.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-11-09 22:16
    Steve,

    To make things super easy for beginners, I'm going to allow the module to return the time and date elements individually, or as a packet.· So, you could get just the hours element by doing this:

    · SEROUT Sio, Baud, [noparse][[/noparse]"!GPS", GetHours]
    · SERIN· Sio, Baud, [noparse][[/noparse]hours]

    or...

    · SEROUT Sio, Baud, [noparse][[/noparse]"!GPS", GetTime]
    · SERIN· Sio, Baud, [noparse][[/noparse]hours, minutes, seconds]

    Make sense?· I could, in the end, toss the individual time/date element retrieval but for the moment I'm going to leave it in.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • steve_bsteve_b Posts: 1,563
    edited 2005-11-10 02:03
    I think it's a great start thus far!
    The buffer part is the bonus!

    how much would it buffer before the stamp would have to get the data before loss?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·

    Steve

    "Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-11-10 02:16
    What I've got worked out in my mind is that it will pull the relevant data from the $GPRMC string while waiting on the $GPGGA string; after that it could simply process the requests as they come in. I don't plan on keeping the raw string after it's been processed.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • KenMKenM Posts: 657
    edited 2005-11-10 02:43
    Elevation (altitude.....we had a long discussion about elevation/altitude recently here at work)
    Distance traveled (maybe that is post processed)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Ken
  • LarryLarry Posts: 212
    edited 2005-11-10 04:58
    Hi John,

    This·is probably outside the scope of what you are trying to do, but I'll mention it anyway.

    I use GPS mostly for robot navigation. Two of the things that take a lot of overhead are finding direction and range ·between a ·current location and an arbitrary target location.

    my needs are short range (tens or hundreds of feet) so computing great circle routes, etc. aren't necessary.Simple trig does it.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-11-10 13:25
    You're right, Larry, it's beyond what I can squeeze into the SX28 version, but perhaps someone will move it to an SX48 (more program and RAM space) and implement that feature.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Charlie JohnsonCharlie Johnson Posts: 147
    edited 2005-11-10 14:17
    I think knowing the position status - either valid "A" or invalid "V" might be a bit useful.

    Charlie
  • Dave PatonDave Paton Posts: 285
    edited 2005-11-11 15:27
    Jon Williams (Parallax) said...
    Hours
    Mins
    Secs
    Time -- returns three bytes
    Month
    Day
    Year
    Date -- returns three bytes
    latitude degrees -- two bytes; signed word
    latitude minutes -- two bytes
    longitude degrees -- two bytes; signed word
    longitude minutes -- two bytes
    heading -- two bytes (unsigned word)
    altitude -- two bytes (signed word in meters)
    How about ground track information? GPVTG gives all of it I think....
    $GPVTG,054.7,T,034.4,M,005.5,N,010.2,K
    
    where:
            VTG          Track made good and ground speed
            054.7,T      True track made good
            034.4,M      Magnetic track made good
            005.5,N      Ground speed, knots
            010.2,K      Ground speed, Kilometers per hour
    



    That combination would give me precisely what I need (alt, vector speed, lat/lon, time).

    How about it?

    -dave

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    This is not a sig. This is a duck. Quack.

    Post Edited (Dave Paton) : 11/14/2005 3:44:35 PM GMT
  • SN96SN96 Posts: 318
    edited 2005-11-11 15:58
    What displays would be supported? A GPS needs a good graphical display. One like the discontinued 320 x 240 Graphic Amulet Easy GUI 5.7 or comparable would be good.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Mike


    "Don't always think outside the box, sometimes thinking inside the box is more pratical and simple."
    ·
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-11-11 16:11
    My "helper" is an SX chip; it will simply buffer the GPS stream and parse the data from it for you -- the display is your choice and you can manage that with a BASIC Stamp.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Dave PatonDave Paton Posts: 285
    edited 2005-11-11 16:20
    Jon-

    That's about all I'd need. Something to sit between the GPS and my SX, parse some data to a more usable form, and spit it out on a serial line. 2 wires, no waiting. I like it.

    wink.gif

    Here's another random idea...put a pulse on a pin to signal new data is ready. It would be similar to the GPS 1PPS signal, but it could tie in to an interrupt so the user would never ever miss the data, no matter how busy the proc is. Just answer the ISW, stuff the data into some variables, and go.

    How fast are you thinking of making the serial output? Getting a 9600 or (preferably) faster dump is better for me. Less time in an ISR or waiting for a DSR signal,

    -dave

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    This is not a sig. This is a duck. Quack.
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-11-11 17:25
    The GPS input side is, of course, 4800 baud for NMEA sentences; the communication side with Stamp will at 9600, but my goal is to make the UART adjustable so that you can use 2400, 4800, 9600, 19.2k or 38.4k. There are plenty of examples that show how to do this, my task is to fold them into an SX/B program in a manner in which "regular folks" like us can understand and modify the code.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Philip GamblinPhilip Gamblin Posts: 202
    edited 2005-11-12 05:34
    ·current speed and trip distance.....min and max speed....time travelled
  • Mike CookMike Cook Posts: 829
    edited 2005-11-12 18:59

    I would keep the helper chip as simple and reliable as possible.

    Didn't see the Status listed in the list of available parameters. I think it would be a good idea to include this. Also it will need to be decided what to do with the data in the other variables depending "A" or "V". If Status is "V" then you could do one of two things, clear the variable array or leave it populated so it could be used as a "Lost Known" location.

    Mike

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "OEM NMEA GPS Module" Now available on ebay for only $19.99

    Product web site: http://www.allsurplus.net/Axiom/

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-11-13 13:55
    I agree -- I will make the status indicator available and when it is "V" then the other data will be from the last valid transmission.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • John CoutureJohn Couture Posts: 370
    edited 2005-11-13 20:00
    Jon,

    Realizing that this is going to be a GPS then the Helper then a microcontroller. What if the microcontroller wanted the unedited string from the GPS once in a while? I've never used GPS's in a project but would there be a situation where you use the helper chip for the routine stuff and then if this particular gps has some fancy options to it, you could just request the raw data and decode it in your microcontroller?

    Again, I've never used one so if I am WAY off base, I apologize.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    John J. Couture

    San Diego Miramar College
  • steve_bsteve_b Posts: 1,563
    edited 2005-11-14 00:17
    john,

    you might want to split off the output of the GPS...one goes to the helper which is input to the stamp on pin X, and then the other wire off the GPS goes straight to the GPS (22kohm resistor in series of course) to pin Y.
    Then it's just a matter of telling your program to look at pin Y to get a RAW sample.

    Just a thought!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·

    Steve

    "Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
  • John CoutureJohn Couture Posts: 370
    edited 2005-11-14 00:22
    But then you use up two pins. On the SX18, pins are at a premium! (grin)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    John J. Couture

    San Diego Miramar College
  • Mike CookMike Cook Posts: 829
    edited 2005-11-16 00:07
    Jon,

    How's the helper chip code coming? Finally got around to ordering a PDB and a rail of 28s today. Itching to play with your code!

    Mike

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "OEM NMEA GPS Module" Now available on ebay for only $19.99

    Product web site: http://www.allsurplus.net/Axiom/

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-11-16 01:25
    I'm not even started yet -- got another project in the works and am evaluating the discussion here.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
Sign In or Register to comment.