Shop OBEX P1 Docs P2 Docs Learn Events
Geo-Caching. Just Getting Started — Parallax Forums

Geo-Caching. Just Getting Started

LuckyJLuckyJ Posts: 4
edited 2010-12-24 12:56 in BASIC Stamp
Hello,

I am looking for some help on a geo-caching project. I have a set of points (much like a scavenger hunt). I have a parallax board with a BASIC stamp 2 chip (as well as the GPS module) and would like to store these points and have my LCD screen show me the distance I am from the points. I am just a little confused as to how I would program this in PBASIC given the length of each coordinate is larger than 65000? Has anyone ever tried something like this in PBASIC or do I need to switch programming languages. Also, do I need to purchase extra memory? 8kb doesn’t seem like a lot.

Thanks in Advance for any direction.

Comments

  • W9GFOW9GFO Posts: 4,010
    edited 2010-12-21 13:19
    GPS coordinates are frequently expresses as degrees and decimal minutes. Such as 47° 18.567'. Chances are that the degrees will be the same for all waypoints. The minutes portion can be easily expressed in a word sized VAR since the highest value would be 59.999'. If it happens that your waypoints cross a degree line then you could use a bit size var to indicate which side you were on.

    Use ATN and HYP to calculate direction and distances between two points.

    Rich H
  • LuckyJLuckyJ Posts: 4
    edited 2010-12-24 09:39
    Hi Rich,

    Thanks for the reply. Just a quick question. Would I not need to covnert everything to radians in order to do the math? If so, I would need more than 5 decimals to ensure as good as accuracy as I can get. How would I account for this?

    Thanks.
  • W9GFOW9GFO Posts: 4,010
    edited 2010-12-24 12:56
    LuckyJ wrote: »
    Hi Rich,

    Thanks for the reply. Just a quick question. Would I not need to covnert everything to radians in order to do the math?

    No, the radians are what you get when you do the math (ATN). The resolution of the radians is not great but it works well enough.

    Attached is the code that I wrote for this airplane. It navigates to a series of waypoints using a BS2, GPS Module and an auxiliary rudder mounted underneath the fuselage just in front of the tailwheel. It is hard to see in the picture, it is the color of balsa wood.

    attachment.php?attachmentid=76630&d=1293223650

    Once it has passed though all the waypoints it will "orbit" the home waypoint in a figure eight pattern.

    As the name of the file indicates, this is a trimmed version. One thing that I see missing is the code that enables/disables the navigation so that it doesn't interfere with RC control.

    Rich H
Sign In or Register to comment.