element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Get Closer Wearables Design Challenge
  • Challenges & Projects
  • Design Challenges
  • Get Closer Wearables Design Challenge
  • More
  • Cancel
Get Closer Wearables Design Challenge
Blog Quick update on current progress
  • Blog
  • Forum
  • Documents
  • Files
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: hifromkatie
  • Date Created: 13 Aug 2013 9:47 PM Date Created
  • Views 427 views
  • Likes 1 like
  • Comments 0 comments
  • flora
  • get_closer_challenge
  • Wearables
  • arduino
  • get_closer
Related
Recommended

Quick update on current progress

hifromkatie
hifromkatie
13 Aug 2013

Just a quick update on the current progress, which may help others in using the GPS module:

 

Firstly I started off with the Adafruit Flora GPS parsing example, and used this to become familiar with the GPS library.

 

I then based my code to start with around this to output current location and a hard coded destination to the Serial Monitor

 

My next step was to output "You've arrived" if the two matched and ":( Not home" if you haven't" This was very patchy, so I decided I needed to implement the next step before continuing. This was to work out the distance between the current and destination points, as this will then allow an accuracy to be introduced, the goal is reached when you are within 20meters of the destination.

 

To do this I looked into the haversine formula to workout the distance between two points, I found a lot of useful information here: http://www.movable-type.co.uk/scripts/latlong.html

 

As I was started to code this formula into my work, my husband informed me that he already had it coded as a C function and kindly sent it to me to save me from typing it out again.

So with this complete, I was somewhat disappointed when the distance to my destination was wildly out. It was then I realised that the GPS position was in degrees minutes and seconds whilst the function was comparing two decimal degrees points.

 

I searched online for guidance and found that this post on the Adafruit blog was really useful, http://forums.adafruit.com/viewtopic.php?f=25&t=30776

So I used this to understand the procedure required and then implemented it in to a function  convertGPS.

 

The serial monitor is now outputting this:

22:16:36

Current location: 51.xxxxxx, 2.xxxxxx

Destination: 51.xx, 2.xx

Distance to destination: 8.73

Bearing to destination: -36.40

 

The first line is the time

The second line is the current location from the GPS (After conversion)

The third line is the destination (currently hard coded)

The fourth line is the distance to the destination

The fifth line is the bearing to the destination, this currently isn't reliable, I will need to use the compass to obtain an actual bearing back to the destination

 

I've attached my current sketch (with destination edited), although currently it is reasonably unformatted and commented, just a work in progress and some experimentation.

Attachments:
GPS_DATA_EXTRACT.txt.zip
  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube