Hyper’s, solution only works in the case of linear interpolation, which is not usually used for position and orientation (but if that’s what you are using, it will work). The correct way to do this is via CompositePositionProperty, which lets you manage a collection of intervals where each interval is associated with a different property.
Here’s some code to get you started.
//The sampled property is our motion, the constantProperty is the time it’s stopped.
var sampledProperty = new Cesium.SampledPositionProperty();
var constantProperty = new Cesium.ConstantPropertyProperty();
//Create a composite property
var property = new Cesium.CompositePositionProperty();
//Create an interval that covers the entire time span and associated it with our sampledProperty
property.intervals.addInterval(new Cesium.TimeInterval({
start : Cesium.Iso8601.MINIMUM_VALUE,
stop : Cesium.Iso8601.MAXIMUM_VALUE,
data : sampledProperty
}));
//Add a new interval over top of the above. This new interval will now return a constant position for the provided time.
//The sampledProperty interval will actually be split into 2 internally.
property.intervals.addInterval(new Cesium.TimeInterval({
start : new Cesium.JulianDate(), //Start of constant position
stop : new Cesium.JulianDate(), //End of constant position
data : constantProperty
}));
Any further intervals you add will overwrite what’s already in there, so you could easily manage a series of stops and starts. Of course the above is also not completely correct because what you really want to do is separate that sampledProperty into 2 sampled properties (1 for before the stop and 1 for after). This will ensure interpolation does not cross a moment of discontinuity which is created by having a velocity of 0.
Hopefully this all makes sense. It all depends on how much you care about the fidelity of your visualization and whether you are using anything other than linear interpolation or not. I’ll make a note to add a Sandcastle example that does everything correctly with a car model or something.