Updated image telemetry

This commit is contained in:
Henry 2016-04-25 16:38:29 -07:00
parent 275a80c4ee
commit 429933087d
2 changed files with 23 additions and 7 deletions

View File

@ -51,17 +51,13 @@ define(
var offsets = {};
function wrapSeries(telemetrySeries, offset) {
var phaseOffset = Math.floor(Math.random(1000));
function phaseShift(index, length) {
return (phaseOffset + index) % length;
}
return {
getDomainValue: function (index, domain) {
return telemetrySeries.getDomainValue(index, domain);
},
getRangeValue: function (index, range) {
// Sine wave 'carrier' signal, with random phase shift
return telemetrySeries.getRangeValue(phaseShift(index,telemetrySeries.getPointCount()) , range)
return telemetrySeries.getRangeValue(index, range)
// Introduce some random variability so that line is
// not straight or perfectly curved
+ Math.random(1)/50

View File

@ -30,11 +30,31 @@ define(
"use strict";
var firstObservedTime = Date.now(),
images = [
/*images = [
"http://www.nasa.gov/393811main_Palomar_ao_bouchez_10s_after_impact_4x3_946-710.png",
"http://www.nasa.gov/393821main_Palomar_ao_bouchez_15s_after_impact_4x3_946-710.png",
"http://www.nasa.gov/images/content/393801main_CfhtVeillet2_4x3_516-387.jpg",
"http://www.nasa.gov/images/content/392790main_1024_768_GeminiNorth_NightBeforeImpact_946-710.jpg"
"http://www.nasa.gov/images/content/392790main_1024_768_GeminiNorth_NightBeforeImpact_946-710.jpg"*/
images = [
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18731.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18732.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18733.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18734.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18735.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18736.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18737.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18738.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18739.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18740.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18741.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18742.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18743.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18744.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18745.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18746.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18747.jpg",
"https://www.hq.nasa.gov/alsj/a16/AS16-117-18748.jpg"
].map(function (url, index) {
return {
timestamp: firstObservedTime + 1000 * index,