Satellite Tracking + Sound Spatialisation

From XPUB & Lens-Based wiki
Revision as of 18:04, 9 February 2012 by Dave Young (talk | contribs) (Created page with "==GPS Satellite Sound Spatialisation System (GPSSSSS)== We = ['dave','jasper','bart'] are working on a spatialisation system based on the coordinates of GPS satellites scraped fr...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

GPS Satellite Sound Spatialisation System (GPSSSSS)

We = ['dave','jasper','bart'] are working on a spatialisation system based on the coordinates of GPS satellites scraped from the [n2yo] website. We started the project by looking at the data available on the website, and became interested in two aspects of working with GPS satellite data - firstly by trying to create an intimate physical connection with a remote (yet almost omnipresent) object, and secondly by subverting the function of the gps satellites by using their own positions as a creative system.

Process

Week 1-3

Due to various interruptions (eg Transmediale, Blaak 10 stuff) and the numerous lie-downs required during the intellectually demanding conceptual process, there was not so much actual project development during this period. We were mostly trying to articulate what exactly interested us about the data, and also how we could use it in an appropriate manner.

Week 4

Began coding this week.

  • Prototyped processing sketch + PD Patch via OSC - test of how to visualise 3d space, calculate distance, send to PD.
  • Python SatScraper - gets data for a list of satellites and outputs it to a text file
  • Cartesian/Polar/Mercator/LatLong algorithmic meltdooowwwnnnnn :/

SatScraper

#!/bin/python
#Scrapes lat,long,altitude and speed values from selected satellites from n2yo.com
#Put tracked Satellite's NORAD ID in idnums list
#Outputs satellite.txt:      lat      lon      alt        speed

import urllib2, json

#Make data url
idnums = ['35752','32711','28474','25030', '24876', '23953', '22014', '21890']
numsats = len(idnums)
idstring = '|'.join(idnums)

sat_url = "http://www.n2yo.com/sat/instant-tracking.php?s="+idstring+"&hlat=51.92269&hlng=4.470787&d=300&r=54602874797.279854&tz=GMT+02:00"

print sat_url

dumpfile = open('satellite.txt', 'w')

#Getting JSON from URL
site = urllib2.urlopen(sat_url)
json_data = json.load(site)

#Iterate through satellites
for i in range(numsats):
    d =  json_data[i]['pos'][1]['d']

    #Cleaning data
    vals = d.split('|')

    for i in range(len(vals)):
        vals[i] = vals[i].strip('u')
    #    print str(i)+":"+vals[i]
       
    #Isolate list elements by name
    lat = vals[0]
    lon = vals[1]
    azimuth = vals[2]
    elevation = vals[3]
    alt = vals[6]
    speed = vals[7]

    #Write data to file
    line = lat + '\t' + lon + '\t' + alt + '\t' + speed + '\n'
    dumpfile.write(line)

#Close file streams
dumpfile.close()