Mattia Rossi Centre for Advanced Internet Architectures, Swinburne University of Technology, Melbourne, Australia CRICOS number 00111D 31 January, 2012 ---------------------------------------------- OVERVIEW ---------------------------------------------- Three Matlab scripts used to create a series of images to be used for animations. The animations display the global distribution of game clients probing for Goldsource, SourceEngine and QuakeEngine based game servers like Counter-Strike, Half-Life and Enemy Territory. The geolocation information is extracted using Python scripts from data collected via tcpdump. See README-python-scripts.txt. This set of files converts the .kml files (as used by Google® Maps) into .shp files compatible with the Matlab® Mapping Toolbox, and creates an image displaying geolocation information on a world map for each file. ----------------------- LICENCE ----------------------- These scripts are released under a new BSD License. For more details please refer to the included source files. ---------------------- INFORMATION ---------------------- These Matlab scripts require Matlab and the Mapping Toolbox. Additionally they require the "kml_shapefile.m" Matlab script which can be found at: http://www.mathworks.com/matlabcentral/fileexchange/25104-kml-matlab-shapefile-conversion A detailed description of each script can be found in the source files. This file is part of the animation_scripts.tar.gz tarball that can be obtained at: http://caia.swin.edu.au/sting/ ----------------------- USAGE ----------------------- The scripts have to be executed in the following order. We assume that the input .kml files have been created with the Python scripts described in README-python-scripts.txt, and have the timestamp encoded in the filename. kmlset_shapefile.m: kmlset_shapefile(filename); This script simply converts the .kml file into .shp files (including additional .shx and .dbf files). The filename parameter has been added, to support resuming the file conversion. This script might run for a very long time if you have many files. plotdaynightterminator.m: plotdaynightterminator(day,month,year,UTChour,UTCmin,UTCsec); This helper function plots a day-night terminator onto an area as created by the commands: load coast; mapshow(long,lat,'Color","black'); The "night" area of the plot is filled with dark grey colour. As the day-night terminator changes with time, the date and time (in UTC) have to be supplied to the function. This function is called by makemovie.m makemovie.m: ./makemovie(lat,long) This script creates an image for each .shp file found in the current folder. Based on the information of the .shp file (and .shx and .dbf files), the function plots the world map first, then a heatmap of the location of the game clients, with brighter colours marking a higher concentration of clients, then it plots the day-night terminator and finally it also plots a CDF over the longitude. The graph is saved as .png image, in a format to easily feed ffmpeg (http://ffmpeg.org/) for movie creation. The lat,long variables can be obtained issuing the command: load coast; ---------------------------------------------- KNOWN LIMITATIONS ---------------------------------------------- These scripts have been developed for a specific project, although they should be ready for generic use and should work out of the box. The scripts assume the correct data collection with tcpdump, and the correct use of the Python scripts for data extraction. The plotdaynightterminator function only contains the equinox data for 2009 and 2010. See the source file for more information. ---------------------------------------------- PROJECT PAGES ---------------------------------------------- http://caia.swin.edu.au/sting/ ---------------------------------------------- ACKNOWLEDGEMENTS ---------------------------------------------- This project has been made possible in part by a grant from APNIC Pty. Ltd., Canberra, Australia