View
217
Download
0
Tags:
Embed Size (px)
Citation preview
1Electrical and Computer Engineering
Comprehensive Design Review
February 12, 2010Team Zink
Nicholas Cipriano, Ali Jameel, Jeremy Mestancik, Brian Simakauskas
2Electrical and Computer Engineering
Overview
Our advertising system allows advertisements to be scheduled and uploaded over the Internet
Advertisements are automatically sent to their corresponding buses
Ads are displayed based depending the current time and location of each bus
4Electrical and Computer Engineering
Website
Allows users to log in, view scheduled ads Displays the correct schedule for a given date
and bus route• schedule.txt contains all dates for reduced schedule and
no service
User can choose individual bus runs to advertise • During peak hours, buses run frequently – Users will
select time ranges rather than bus runs
7Electrical and Computer Engineering
Client update_schedule.sh daemon
At regular intervals, bus connects to server• Connection requires no password
Bus retrieves updated schedule.txt file from web server• Updated file replaces the old
Bus checks if filenames exist in local memory• If not, bus downloads ad from server
8Electrical and Computer Engineering
Google Map API
A map displays the bus route on the website
User is able to click points on the map, and the distance between those points is the ad distance
The selected interval is highlighted, for ease of use
The map displays the estimated time and distance of an interval
10Electrical and Computer Engineering
Ad Displaying
The scheduling information for each ad is parsed into structs called ads
These structs hold all the information relevant to displaying an ad
A struct is also constructed for the GPS coordinates
Having two structs makes comparing values and performing operations much more elegant
11Electrical and Computer Engineering
Ad Displaying
For each GPS coordinate, the distance from an ads start coordinates and end coordinates is made
The Haversine function is used to calculate this distance
When the Haversine function returns a distance that is in a certain range, the ad is either displayed or turned off