VelocityOrientationProperty error

Hi all,

I would like to add VelocityOrientationProperty in my javascript to run so that when my data points will orientate itself based on its previous positions as it move.
However, I cant seems to get it to run.
The data is supposed to be live feeding, and it will render itself to get new data point, so how do I add VelocityOrientationProperty into my javascript.

I have tried

var property = new Cesium.SamplePositionProperty();
var position = Cesium.Cartesian3.fromDegrees(data.lon, data.lat)
//*i am not sure what to put for the time variable though, as it should be live feed, how do I go about adding this time variable?*
var time = new.Cesium.JulianDate();
property.addSample(time,position);

so in the later part in viewer.entities.add,
position : property,
orientation : new Cesium.VelocityOrientationProperty(position),

Correct? what i am doing it wrong? is it the "time" variable that is affecting it?

Hello,

Have you seen this example: http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Interpolation.html&label=Showcases

It shows how to use a VelocityOrientationProperty.

Best,

Hannah

Hi Hannah, I have look through the example, however, as the data is generated rather than a live feed data, I am not sure how to integrate it into my code