Trying to display vectors with a CZML file, polyline not following the reference

Hello Cesium community !

I am currently working on a way to display a reference system of a satellite with only a czml file. I use the CZML writer to write my CZML. I found that the ‘vector agi’ object is still not yet implemented in cesium, so I am using polylines instead.

To represent my reference system, I draw three polylines, each polyline is created by offsetting a component in each direction (x,y,z) so I can have something like this :

So my packet containing my polyline object in my czml looks like this :

  {
    "id":"REFERENCE SYSTEM/Keplerian parameters: {a: 6928000.0; e: 0.0; i: 60.00000000000001; pa: 0.0; raan: 90.0; v: 90.0;}org.example.CZMLObjects.Polyline@27c6e487",
    "name":"Reference system of : Satellite",
    "availability":"2022-01-17T12:00:00Z/2022-01-18T12:00:00Z",
    "position":{
      "reference":"Keplerian parameters: {a: 6928000.0; e: 0.0; i: 60.00000000000001; pa: 0.0; raan: 90.0; v: 90.0;}#position"
    },
    "polyline":{
      "width":10,
      "arcType":"NONE",
      "show":true,
      "material":{
        "solidColor":{
          "color":{
            "rgba":[
              255,10,10,255
            ]
          }
        }
      },
      "positions":{
        "cartesian":[
          -1557190.827699542,-3108469.9818882565,5992474.872523712,
          -1547190.827699542,-3108469.9818882565,5992474.872523712
        ],
        "referenceFrame":"INERTIAL"
      },
      "show":{
        "interval":"2022-01-17T12:00:00Z/2022-01-17T12:01:00Z",
        "boolean":true
      }
    }
  },

Now, as you can see, I use references to put my polyline in a given position (here it’s the id of my satellite where I added #position to use the position). But is seems like the polyline object is not following at all the satellite :

Here is the CZML file that I use

If you need more precisions do not hesitate,
Thank you,
JL

So, does anyone know how it would be possible to make a polyline that follows the satellite object using references ? My problem is that I only have one reference (the position of the satellite) while I need at least two to describe the position of the polyline.

Have a good day.

Solved :
For people wondering how to do it, I used a 3D model of a reference frame.
The model is basically the three arrows as shown previously, and the 3D model follow a reference in position of a point that evolve in time.
By doing so, we kind of have a solution for this type of issue. Because the library CzmlWriter still do not supports polylines as vectors.

Cheers.

Hi Zudo,

Glad you found a solution!

Vectors like this are implemented in Cesium ion SDK as their own primitive type. They are implemented in a similar fashion as you describe here, by using a glTF model to represent the “arrow” indicating the direction.

Since this type of primitive does not use any proprietary code, we have considered adding it to open source CesiumJS. I’ll note your use case for that consideration.

Thanks!
Gabby

1 Like