Design
Constraints
Power
|
Less than 1500W
|
Conservation of gas
|
Must stay lit for duration of darkness (~9 hours)
|
Security
|
Must be secured from theft
|
Exposure
|
Must withstand extreme weather conditions
|
Autonomy
|
Must operate completely autonomously
|
Transportation
|
Must collapse to fit within small deployment vehicle (VW Golf)
|
Execution
Project management
|
Managed team of up to 10 volunteers at once
|
Funding
|
Self-funded with Some fund-raising
|
Education
|
Learn to weld Learn to program PIC micro-controller
|
Materials
Exterior Skin
|
Custom-Built Lycra Stretch Cover
|
Lighting
|
Green-colored interior incandescant lights
|
Power
|
Gas-powered generator Vented security enclosure
|
Edge Mechanics
|
Polyvinyl tubing suspended on spine-mounted wheel spokes
|
Primary Structure
|
Welded steel base Central steel spine Spine-mounted spoked-wheels
|
Software
|
PIC microcontroller assembly program with multiple lighting scenes.
|
Electronic Control System
|
PIC Microcontroller Custom circuitry LOTS of soldering!
|
//
// DAVES NOTE
// Despite what is said above, I plan to have multiple AJAX queries fired off from my page (one for each section)
// I'm going to use a function
function getAjaxRequest(url)
{
var request = false;
try {
request = new XMLHttpRequest();
} catch (trymicrosoft) {
try {
request = new ActiveXObject("Msxml2.XMLHTTP");
} catch (othermicrosoft) {
try {
request = new ActiveXObject("Microsoft.XMLHTTP");
} catch (failed) {
request = false;
}
}
}
if (!request)
alert("Error initializing XMLHttpRequest!");
return request;
}
// This section done with the help of...
// http://knol.google.com/k/gimme-some-closure-object-oriented-javascript-ajax-callbacks#
// I'm using OO JavaScript to create an object named PageDivObj... here is the notation
// NOTE: BAD things to watch out for...
//
// KEY POINT: The garbage collection mechanisms from the DOM, and from JavaScript are SEPARATE. Which means...
// Do not keep member variables of DOM objects in JavaScript objects. And vice-versa. This means, any JS callbacks
// on DOM objects should be cleared before the DOM object is deleted, by removeChild or the setting of innerHtml on
// any ancestor (see purgeDom fn below)
// from: http://javascript.crockford.com/memory/leak.html
// d is a dom obj
function purgeDom(d) {
if (!d)
return;
var a = d.attributes, i, l, n;
if (a) {
for (i = a.length - 1; i >= 0; i -= 1) {
n = a[i].name;
if (typeof d[n] === 'function') {
d[n] = null;
}
}
}
a = d.childNodes;
if (a) {
l = a.length;
for (i = 0; i < l; i += 1) {
purgeDom(d.childNodes[i]);
}
}
}
function onReadyStateChangeCb( r )
{
if (r) {
//console.log( "status = " + r.status + "response = " + r.responseText );
// server fullfilled the request => readystate 4
if (r.readyState == 4) {
// r status == 200 => requested data is ready
if (r.status == 200)
{
//alert("Server is done!");
//var xml = r.responseXml; // - get XHTML result
var txt = r.responseText; // - get result in text
//console.log("got good response" + txt);
}
}
}
}
//When using XMLHttpRequest to get the HTML of a remote webpage, it is often advantageous to turn that HTML string into DOM for easier manipulation. However, there are potential dangers involved in injecting remote content in a privileged context in your extension, so it can be desirable to parse the HTML safely.
//The function below will safely parse simple HTML and return a DOM object which can be manipulated like web page elements. This will remove tags like