Created
March 2, 2016 11:00
-
-
Save colek42/bc4d1a09807dabf07418 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Paste this into http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html replacing exisiting code | |
var date = new Cesium.JulianDate.now(); | |
var outObj = [] | |
for(var i = 0; i < 100; i++){ | |
var rand = Math.floor((Math.random() * 10000000) + 1); | |
var newDate = new Cesium.JulianDate(); | |
Cesium.JulianDate.addMinutes(date, rand, newDate); | |
outObj.push({ | |
ISO: Cesium.JulianDate.toIso8601(newDate), | |
JulianDayNumber: newDate.dayNumber, | |
JulianSecondsofDay: newDate.secondsOfDay | |
}) | |
} | |
console.log(JSON.stringify(outObj, null, 2)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment