Animation and CZML

I have a time series with lat/lon/alt that I am converting to CZML.

How do I enable the animation to play an aircraft back against the time parameters?

Thanks,

Robert

Hi Robert,

Here’s a good overview of loading and styling entities you load in with data sources like CZML.

Something like this should work:

var czml = [{

"id" : "document",

"name" : "CZML Point - Time Dynamic",

"version" : "1.0"

}, {

"id" : "aircraft",

"availability" :"2012-08-04T16:00:00Z/2012-08-04T16:05:00Z",

"position" : {

    "epoch" : "2012-08-04T16:00:00Z",

    "cartographicDegrees" : [

        0,   -70, 20, 150000,

        100, -80, 44, 150000,

        200, -90, 18, 150000,

        300, -98, 52, 150000

    ]

},

"model": {

    "gltf" : "../../SampleData/models/CesiumAir/Cesium_Air.glb",

    "scale" : 2.0,

    "minimumPixelSize": 128

}

}];

var viewer = new Cesium.Viewer(‘cesiumContainer’);

var dataSource = viewer.dataSources.add(Cesium.CzmlDataSource.load(czml));

dataSource.then(function(dataSource){

var aircraft = dataSource.entities.getById('aircraft');



aircraft.orientation = new Cesium.VelocityOrientationProperty(aircraft.position);

});

Thanks!

Gabby

Whoops, forgot to include the link to the tutorial: https://cesiumjs.org/tutorials/Cesium-Workshop/#loading-and-styling-entities