NAVILOCATOR


location logger via gps

HARDWARE

SOFTWARE
https://learn.adafruit.com/adafruit-ultimate-gps-on-the-raspberry-pi/setting-everything-up
sudo gpsd /dev/ttyAMA0 -F /var/run/gpsd.sock
sudo python gps-write1.py
$ cgps -s
> python write -logs
https://github.com/ggtd/independend-python-gps-logger-for-airodump-ng/blob/master/log_position.py
And then making sure that /etc/default/gpsd looked like this (you can edit it with sudo nano /etc/default/gpsd )
START_DAEMON="true"
GPSD_OPTIONS="-n"
DEVICES="/dev/ttyAMA0" 
USBAUTO="true"
GPSD_SOCKET="/var/run/gpsd.sock"

MATPLOTLIB:

sudo apt-get install python-matplotlib 
sudo pip install pandas 
(pip install +- = apt get install, maar dan voor python libraries) 


CODE:
 import pandas
from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt

colnames = ['time', 'latitude', 'longitude']
data = pandas.read_csv('naviloc.csv', names=colnames)
lats = data.latitude.tolist()
lons = data.longitude.tolist()

x1 = -20.
x2 = 40.
y1 = 34.
y2 = 62.

plt.figure(figsize=(300,200))
m = Basemap(projection='merc', llcrnrlat=y1, urcrnrlat=y2, llcrnrlon=x1, urcrnrlon=x2, lat_ts=(x1 + x2) / 2)

x, y = m(lons, lats)
m.scatter(x, y, 3, marker='o', color='#0f3bff')

m.drawmapboundary(fill_color='#E9EEF1')
m.fillcontinents(color='#BBCCE6', lake_color='#E9EEF1')
m.drawcoastlines(linewidth=0.2)
plt.title("Navilocator of Seed journey")
plt.show()








concatenate merge files in one debian - Google Search
Delete Every 'M'th Line Starting from 'N'th Line This will start from Nth line and delete every Mth line coming after that. Note that, Nth line will also be deleted.

Syntax:
h
sed '2~2 d' geo > geo-redux
sed '2~2 d' geo-redux > geo
sed '/nan/d' geo > geo-redux
sed '/;000/d' geo > geo-redux

---------------------------------------------------------
route
punten waar we gestopt zijn
punten waar we graan verzameld
----------------------------------------------------------

----------------------------------------------------------
migratie (
taal ( ? > front end)

categorie (brood - oven)
-----------------------------------------------------------

projects
http://volt.lautre.net/sail/
http://www.findlatitudeandlongitude.com

-----------------------------------------
- geophone
-----------------------------------------
- WALKIETALKIE
22 96 HZ
-----------------------------------------
-  pi-fm-piratebox -FM radio
http://makezine.com/projects/raspberry-pirate-radio/
antena / pin 4 raspberry
https://images.duckduckgo.com/iu/?u=http%3A%2F%2Fwww.megaleecher.net%2Fsites%2Fdefault%2Ffiles%2Fimages%2Fraspberry-pi-rev2-gpio-pinout.jpg&f=1
-----------------------------------------


localhost


backup 
drupal migrate backup
sudo apt-get install drush  (raspberry)

make on site a folder ~ new 
docroot copy all contents

(sites/default/files)
(sites/all/themes/fbsi/)

http://s28972.gridserver.com/.tools/phpMyAdmin/current/
db_289.._inventory
export database (backup)

structure: drop tables

bread: /
sites/all/themes/fbsi/fragment-glossarium.tpl.php

#! /usr/bin/python
# This script is based on GPS Python example Written by Dan Mandle http://dan.mandle.me September 2012
# The main pourpouse of my modification, is to Log GPS position info flat file
# later to be used to track the position of Wifi Client devices like Phones and Laptops
# compared against Airodump CSV file output.
# -This script only captures the GPS data, and is not processing any Airodump output.
# T.D. http://www.dobrotka.sk, 17.1.2015
# https://github.com/ggtd/independend-python-gps-logger-for-airodump-ng
# -----------------Original credits ------------
# Written by Dan Mandle http://dan.mandle.me September 2012
# License: GPL 2.0
import os
from gps import *
from time import *
import time
import threading
import datetime
from time import gmtime, strftime
gpsd = None #seting the global variable
time1= None
time2= "placeholder string"
os.system('clear') #clear the terminal (optional)
flog = open('./gps_log_file.csv', 'a')
class GpsPoller(threading.Thread):
        def __init__(self):
                threading.Thread.__init__(self)
                global gpsd #bring it in scope
                gpsd = gps(mode=WATCH_ENABLE) #starting the stream of info
                self.current_value = None
                self.running = True #setting the thread running to true
        def run(self):
                global gpsd
                while gpsp.running:
                        gpsd.next() #this will continue to loop and grab EACH set of gpsd info to clear the buffer
if __name__ == '__main__':
        gpsp = GpsPoller() # create the thread
        try:
                gpsp.start() # start it up
                while True:
                        time1=datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
                        #It may take a second or two to get good data
                        #print gpsd.fix.latitude,', ',gpsd.fix.longitude,' Time: ',gpsd.utc
                        os.system('clear')
                        print
                        print ' GPS reading + Logging'
                        print '----------------------------------------'
                        print 'latitude ' , gpsd.fix.latitude
                        print 'longitude ' , gpsd.fix.longitude
                        print 'GPS time utc ' , gpsd.utc
                        print
                        print 'Local (device) Time:', time1
                        if (time1+"" != time2+""): # Check if Second tick changed, if yes, log possiton
                                print "Log time!"
                                time2=datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
                                log_string=str(time1)+";"+str(gpsd.fix.latitude)+";"+str(gpsd.fix.longitude)+"\n"
                                flog.write(log_string)
                                flog.flush()
                        time.sleep(0.4)
        except (KeyboardInterrupt, SystemExit): #when you press ctrl+c
                print "\nKilling Thread..."
                gpsp.running = False
                gpsp.join() # wait for the thread to finish what it's doing
        print "Done.\nExiting."