Satellite Tracking + Sound Spatialisation: Difference between revisions
Dave Young (talk | contribs) |
No edit summary |
||
(5 intermediate revisions by one other user not shown) | |||
Line 10: | Line 10: | ||
*Python SatScraper - gets data for a list of satellites and outputs it to a text file | *Python SatScraper - gets data for a list of satellites and outputs it to a text file | ||
*Cartesian/Polar/Mercator/LatLong algorithmic meltdooowwwnnnnn :/ | *Cartesian/Polar/Mercator/LatLong algorithmic meltdooowwwnnnnn :/ | ||
===Week 6-13=== | |||
Development of modular system in Pure Data. | |||
====Getting text data from python script into PD==== | |||
*Formatting: separate fields by tab, then by comma | |||
*Save as .txt file in the directory of puredata file. | |||
*Build a patch with the [textfile] object as shown in image below | |||
[[File:pd-textfile-example.png]] | |||
====Calculating 2D-Distance in Pure Data==== | |||
*Takes two packed inputs [x1,y1] & [x2,y2] | |||
*Formula = sqrt((x2-x1)^2 + (y2-y2)^2) | |||
*Outputs distance! See below | |||
[[File:distance-pd.png]] | |||
===Week 14=== | |||
==SatScraper== | ==SatScraper== | ||
Scraping JSON data with Python from the N2YO site. Put the numbers of the satellites you want to track in the idnums list. Writes data to a text file in the directory of the python script. | |||
<source lang='python'> | <source lang='python'> | ||
#!/bin/python | #!/bin/python | ||
Line 61: | Line 79: | ||
dumpfile.close() | dumpfile.close() | ||
</source> | </source> | ||
http://pzwart3.wdka.hro.nl/mediawiki/images/6/6c/Ableton-sat.ogg | |||
http://pzwart3.wdka.hro.nl/mediawiki/images/7/79/Audio-prototype.PNG | |||
http://pzwart3.wdka.hro.nl/mediawiki/images/a/a3/Schematics.png |
Latest revision as of 12:14, 5 April 2012
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 :/
Week 6-13
Development of modular system in Pure Data.
Getting text data from python script into PD
- Formatting: separate fields by tab, then by comma
- Save as .txt file in the directory of puredata file.
- Build a patch with the [textfile] object as shown in image below
Calculating 2D-Distance in Pure Data
- Takes two packed inputs [x1,y1] & [x2,y2]
- Formula = sqrt((x2-x1)^2 + (y2-y2)^2)
- Outputs distance! See below
Week 14
SatScraper
Scraping JSON data with Python from the N2YO site. Put the numbers of the satellites you want to track in the idnums list. Writes data to a text file in the directory of the python script.
#!/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()
http://pzwart3.wdka.hro.nl/mediawiki/images/6/6c/Ableton-sat.ogg