Hi all,
I’m wondering if there’s a way to avoid explicitly specifying an orientation property for an entity created in CZML. Is there a way to do something like:
“position”:{
“reference”:“Satellite/gps-06_svn36#position”
},
But for “orientation” instead of position?
I’m specifically trying to create an agi_* sensor, per https://github.com/jlouns/cesium-sensor-volumes, attach it to a satellite, and point it in the sat’s nadir direction. See the attached .czml file (lifted from the same github repo) for an example of one of these sensors implemented. It would be really nice if I don’t have to actually add a nadir quaternion at every timestep for every satellite in my czml file, but rather could reference some property of the satellite itself.
Exploring a satellite entity from the console in a Cesium-rendering webpage (see attached screencap, actually from another sim I’m running, not from the same .czml file), I see that its “orientation” is undefined - which makes sense, considering I didn’t actually define that field for the sat. But I DO inherently have information about the satellite’s nadir direction, because I have its position. Is there a convenient way to extract the nadir quaternion from that, hopefully without adding a ton of overhead?
I’m not terribly familiar with JS, but could I somehow attach a function to the satellite entity that returns an orientation quaternion and is called for anything that has a reference property referring to the sat’s orientation? (ha, I might have answered my own question there. But if anyone has a better idea!..)
thanks!
-Kit Kennedy
LotsOfSensors.czml (4.31 MB)