Re: Could PIC handle this?

From: Noel Henson (noel_at_noels-lab.com)
Date: 12/14/04

  • Next message: Paul E. Bennett: "Re: Fixed-point Math help"
    Date: Mon, 13 Dec 2004 18:03:29 -0800
    
    

    johannes m.r. wrote:

    > Noel Henson wrote:
    >> David wrote:
    >>> Could a PIC handle interfacing via rs232 with a GPS unit, and
    >>> comparing the location against a list of ~5000 stored positions, and
    >>> alerting (LED/LCD) if any points are considered close enough (~1-2km,
    >>> using haversine formula, perhaps)?
    >>>
    >>> I guess the points would have to be stored on a CF/MMC card. They
    >>> would be updated/changed time to time...
    >>
    >> I think even a smallish PIC could handle this. If you needed to go really
    >> inexpensive, you could use a part without a USART and emulate it
    >> yourself.; For memory you could go with an 8-pin serial FLASH part and
    >> skip the overhead of CF/MMC; unless of course the storage had to be
    >> removable.
    >
    > I'd really be interested in that. Doesn't that mean comparing the distance
    > from a specified point on earth to one of 5000 different positions?
    > According to a quick google search, which reveals this article:
    > http://en.wikipedia.org/wiki/Great_circle_distance there're some
    > calculations which are rather complex for a 8 bit processor I guess :-?
    >
    > Regards,
    > j.

    There are some calculations but they're not that bad. You simply need the
    magnitude of the distance, not the actual distance. You simply square the
    differences between the longitude and latitude of each pair of points you
    are comparing. There is no need for a square-root. I do this on another
    project; only about 2000-3000 items in my lists. You can also do some
    optimizations by simply comparing the sum of differences in longitude and
    latitude. It's not perfect but it will get you in the ball park quickly.
    Then you can use magnitude to select the best from the presorted set. You
    may also be able to store the data in FLASH in an optimized way; perhaps
    twice, one ordered by longitude, spiraling by latitude and once the
    opposite way.

    What kind of response time is necessary?
    How close are the points? Miles? Feet?

    Noel


  • Next message: Paul E. Bennett: "Re: Fixed-point Math help"

    Relevant Pages

    • Re: Calculating a Distance on the Surface of the Earth
      ... latitude and longitude. ... I'd actually be above the surface of the earth due to the ... to the surface of the earth, I'd like to know the distance between ... longitude of the second point. ...
      (sci.geo.satellite-nav)
    • Re: decimal longitude and latitude problem
      ... distance from a specific decimal longitude and latitude. ... latitude is 60 nautical miles, while one degree of longitude is 60*sin L ...
      (sci.math)
    • Re: decimal longitude and latitude problem
      ... distance from a specific decimal longitude and latitude. ... latitude is 60 nautical miles, while one degree of longitude is 60*sin L ...
      (sci.math)
    • Re: Questions (Space)
      ... The longitude and latitude I'd say are ... vector quantities; ... defines a distance in a particular direction. ...
      (rec.arts.sf.composition)
    • Re: Trying to convert from Latitude/Longitude to Radar plot?
      ... RF strength data. ... For simplicity, I will designate latitude and longitudes as. ... Suppose the original coordinates are in A and B (longitude) ... > I have taken a series of RF field strength measurements of an FM ...
      (microsoft.public.excel.charting)

    Loading