mirror of
https://github.com/nasa/openmct.git
synced 2025-06-12 20:28:14 +00:00
added mock values to compass for example imagery. (#3999)
This commit is contained in:
@ -49,6 +49,10 @@ define([
|
|||||||
];
|
];
|
||||||
const IMAGE_DELAY = 20000;
|
const IMAGE_DELAY = 20000;
|
||||||
|
|
||||||
|
function getCompassValues(min, max) {
|
||||||
|
return min + Math.random() * (max - min);
|
||||||
|
}
|
||||||
|
|
||||||
function pointForTimestamp(timestamp, name) {
|
function pointForTimestamp(timestamp, name) {
|
||||||
const url = IMAGE_SAMPLES[Math.floor(timestamp / IMAGE_DELAY) % IMAGE_SAMPLES.length];
|
const url = IMAGE_SAMPLES[Math.floor(timestamp / IMAGE_DELAY) % IMAGE_SAMPLES.length];
|
||||||
const urlItems = url.split('/');
|
const urlItems = url.split('/');
|
||||||
@ -59,6 +63,9 @@ define([
|
|||||||
utc: Math.floor(timestamp / IMAGE_DELAY) * IMAGE_DELAY,
|
utc: Math.floor(timestamp / IMAGE_DELAY) * IMAGE_DELAY,
|
||||||
local: Math.floor(timestamp / IMAGE_DELAY) * IMAGE_DELAY,
|
local: Math.floor(timestamp / IMAGE_DELAY) * IMAGE_DELAY,
|
||||||
url,
|
url,
|
||||||
|
sunOrientation: getCompassValues(0, 360),
|
||||||
|
cameraPan: getCompassValues(0, 360),
|
||||||
|
heading: getCompassValues(0, 360),
|
||||||
imageDownloadName
|
imageDownloadName
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user