Giter Site home page Giter Site logo

spectralliaisons / gps-tracker Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 6.96 MB

DIY gps tracker for the masochist explorer.

License: GNU General Public License v3.0

C++ 100.00%
gps gps-location gps-tracker gps-tracking gps-device arduino arduino-sketch adafruit-gps-board adafruit-feather-m0

gps-tracker's Introduction

gpstracker

Solar-powered GPS tracker that displays user's track, saving it to kml file on sd card. Running on Adafruit Feather M0 Adalogger.

SD Card file organization:

Updated: 2018.10.03 Current track is named "TRK0000.TXT". Current map is named "GPSTEST.TXT".

Upon board initialization, directories are created for year/month/day; e.g., September 1st, 2018 is 2018/09/01/. Within the day directory, each board initialization creates an indexed folder; e.g., "00000001/". Within this folder are indexed logs:

  • "BATTERY.TXT" : a log of timestamped battery voltage (csv)
  • "LOGFILE.TXT" : a log in case board crashes; what would be console output when board is connected to Arduino IDE is logged here.

proof of concept: print gps coordinates

an image examplar

displaying the initial section of the Russian River East Fork from SD card

Only locations visible on-screen are drawn. Concentric circles indicate distance from current location (at center). an image examplar

overview

minimum viable product:

Solar-powered GPS tracker that displays user's track, saving it to kml file on sd card.

goal features:

  • draws other kml tracks on sd card (different color than curr track)
  • [ ] can scroll touchscreen by 'dragging' (WON'T DO: Adafruit TFT display draws too slowly for this!)
  • can zoom in/out (display units change from feet to miles when zoomed out sufficiently)
  • concentric circles centered on user location denoting distances
  • SD card not required for displaying battery and GPS data
  • LEDs for solar state: charging and done (refer here. look for "https://learn.adafruit.com/usb-dc-and-solar-lipoly-charger/using-the-charger")

materials

microcontroller

sensors

interface

COMPARE TO:

power

steps

wiring

  • hook up materials.

Arduino IDE Setup

boards

  • Tools > Boards Manager:
  • Arduino SAMD Boards
  • Adafruit SAMD Boards

libraries

  • copy Adafruit_GPS to Documents/Arduino/libraries/
  • Tools > Manage Libraries >
  • Adafruit HX8357
  • Adafruit STMPE610
  • Adafruit GFX
  • RTClib by Adafruit

reinstalling Arduino

  • delete:
  • App
  • Documents/Arduino
  • Documents/Arduino15 (why is this not always existing? it needs to be deleted...)

GPS

  • print current gps coord on screen

SD

basic gps polling

  • poll gps every n seconds & write to csv: p0,p1,p2,...
  • read from SD & display most recent locations
  • can insert / remover SD card while board is running without a crash

write kml

  • write & read from kml file instead of csv

RAM test (read large kml)

Adafruit Feather M0 Adalogger has "256KB of FLASH + 32KB of RAM". kml files often exceed 32KB. Test reading a large file like this 715KB one.

KML will be stored on the SD card. You probably want to read the file in small chunks, keeping only points whose lat, lng coords translate to pixels that are visible on the display. This may not efficiently support map scrolling, as the entire kml would need to be re-processed only to use most of the same points as before.

Maybe another file on the SD card is a list of coords sorted such that those closest to the current GPS position are first. When a current location is obtained, all list elements increase by one position? This assumes you're moving slow enough to not jump many points, right?

Or maybe your track on the SD card remains CSV and powering off or pressing a button formats it as KML, or maybe offload this to a python script run on the user's computer; this would be easier to parameterize.

display gps track

  • translate gps coords to screen pos (user's current location is screen center)
  • filter current track gps coords to only points that are visible on screen
  • draw circle for all visible gps points
  • draw lines connecting all visible gps points

gps-tracker's People

Contributors

spectralliaisons avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.