Billboard Sampled Position Cuts through the Earth

I’m trying to animate a billboard moving between two points hundreds of miles apart on the Earth. What I see happening is that my billboard is visible at the endpoints, but as it interpolates between them it sinks into the earth and disappears then emerges on the other end. My billboard snippet of CZML looks like this:

"billboard": {
  "eyeOffset": {
    "cartesian": [ 0, 0, 0 ]
  },
  "heightReference": {
    "heightReference": "RELATIVE_TO_GROUND"
  },
  "horizontalOrigin": "CENTER",
  "verticalOrigin": "CENTER",
  "image": "../images/logo.png",
  "pixelOffset": {
    "cartesian2": [ 0, 0 ]
  },
  "scale": 0.05
}

I’ve also tried with heightReference set to CLAMP_TO_GROUND to no avail. Any clues as to what I might be doing wrong?

I think I need to add a third point (e.g. the midpoint) so that the LAGRANGE position interpolation has more to work with. Does that make sense? It doesn’t really explain why RELATIVE_TO_GROUND and CLAMP_TO_GROUND don’t really seem to work for Billboards (i.e. I would have thought CLAMP_TO_GROUND would have projected the billboard onto the terrain surface).

@vicatcu

Thank you for providing such a detailed description of your problem. Due to the curvature of the earth, I suspect that the entity is sinking into the earth. Adding various additional points in between the starting and ending points should help fix this issue. Have you given this a try yet?

-Sam