After CZML load, set LagrangePolynomialApproximation

Hello forum,

I have some CZML that describes aircraft flight information, testing sucessfully on the globe and showing a entity path graphic as well as the point representation of the aircraft.

In the cesiumViewer.dataSources.dataSourceAdded callback method I say:

entity.position.setInterpolationOptions({
   interpolationDegree : 5,
   interpolationAlgorithm : $wnd.Cesium.LagrangePolynomialApproximation
});

On playback, the aircraft position obeys the LagrangePolynomialApproximation Interpolation, but the path still consists of straight line segments. Is this because the path graphic was created BEFORE my callback?

How can I get that path graphic to have the LagrangePolynomialApproximation ?

Thanks in advance for any pointers or other experiences.
-Tom

Could this be a bug? The path graphic was not drawn with the Interpolation, but the entity did follow the Interpolation.

Hello Tom,

This sounds like it could be a bug. Could you please provide a code sample?
Also, see this interpolation demo: http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Interpolation.html&label=Showcases

The path re-draws correctly using setInterpolationOptions in this example. You could look at that code to see if there’s something different than your code. It’s also possible that it’s a CZML specific bug.

Best,

Hannah

Also note that you can set the interpolation options from the CZML. Here is an example:

{
  "id": "InternationalSpaceStation",
  "position": {
    "referenceFrame": "INERTIAL",
    "epoch": "2012-05-02T12:00:00Z",
    "cartesian": [
      0.0, -6668447.2211117, 1201886.45913705, 146789.427467256,
      60.0, -6711432.84684144, 919677.673492462, -214047.552431458,
      90.0, -6721319.92231553, 776899.784034099, -394198.837519575,
      150.0, -6717826.447064, 488820.628328182, -752924.980158179,
      180.0, -6704450.41462847, 343851.784836767, -931084.800346031,
      240.0, -6654518.44949696, 52891.726433174, -1283967.69137678
    ],
    "nextTime": 300.0,
    "interpolationAlgorithm": "LAGRANGE",
    "interpolationDegree": 5
  }
}

-Hannah