Rotation 3D object with using Quaternion

Why it is impossible to Orient the 3d model with respect to the earth’s surface when using quaternions in the czml file. For example, for lat = 50 N lon = 50 E ? object is not horizontal to the Ground and at an angle. Can anybody suggest a code snippet or czml. Thanks.

Hello,

Models are automatically oriented so they are parallel with the ground at the specified position. Take a look at this example: http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=CZML%20Model.html&label=CZML

What are you trying to use the quaternion orientation for?

Best,

Hannah

Ok.

See how the object is oriented in space. How to define the quaternions, that he was moving parallel to the surface?
var czml =

[

{

“id” : “document”,

“version” : “1.0”

},

{

“id” : “Plane”,

“availability” : “2015-08-21T00:00:00Z/2015-08-25T00:00:00Z”,

“model” :{

“gltf” : ‘Apps/SampleData/models/CesiumAir/Cesium_Air.glb’,

“scale” : 500,

“show” : [{

“interval” : “2015-08-21T00:00:00Z/2015-08-25T00:00:00Z”,

“boolean” : true

}]

},

“label” : {

“fillColor” : [{

“interval” : “2015-08-21T00:00:00Z/2015-08-25T00:00:00Z”,

“rgba” : [255, 255, 0, 255]

}],

“font” : “bold 10pt Segoe UI Semibold”,

“horizontalOrigin” : “LEFT”,

“outlineColor” : {

“rgba” : [0, 0, 0, 255]

},

“pixelOffset” : {

“cartesian2” : [10.0, 0.0]

},

“scale” : 1.0,

“show” : [{

“interval” : “2015-08-21T00:00:00Z/2015-08-25T00:00:00Z”,

“boolean” : true

}],

“style” : “FILL”,

“text” : “Air Show”,

“verticalOrigin” : “CENTER”

},

“position”:{

“referenceFrame”: “FIXED”,

“epoch” : “2015-08-21T00:00:00Z”,

“cartographicDegrees”:[

“2015-08-21T00:00:00Z”,60,70,150000,

“2015-08-22T00:00:00Z”,65,70,150000,

]

},

“orientation”: {

“interpolationAlgorithm”:“LINEAR”,

“interpolationDegree”: 1,

“epoch” : “2015-08-21T00:00:00Z”,

“unitQuaternion”:[

“2015-08-22T00:00:00Z”,0.0, 0.0, 0.707, 0.0,

“2015-08-23T00:00:00Z”,0.0, 0.7, 0.707, 0.0

]

}

}

]

Why it is impossible to Orient the 3d model with respect to the earth’s surface when using quaternions in the czml file. For example, for lat = 50 N lon = 50 E ? object is not horizontal to the Ground and at an angle. Can anybody suggest a code snippet or czml. Thanks.