I'm a beginner of Cesium and Javascript code. I need to create the orbit of a satellite (ESEO) around the globe. The satellite have to move according to SGP4 model. How can I create it in Cesium sandcastle? I'm in trouble because I'm not finding any tutorials or examples online that explain how to do it. Right now I have only positioned the ground station where I want on the globe.
var viewer = new Cesium.Viewer ('cesiumContainer', {
scene3DOnly: false,
selectionIndication: false,
baseLayerPicker: true
});
Cesium.Ion.defaultAccessToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI4ODY0ZjkwMy03YmZlLTRlNGEtYmNhOS0xMDBlZGVmNDRkZGMiLCJpZCI6OTE4MSwic2NvcGVzIjpbImFzciIsImdjIl0sImlhdCI6MTU1MzYxMjM5Mn0.aYYX1f1MQfg9zLFu0vnP3A56Neo4Y_N3G2O5tuTS0XM';
// Enable lighting based on sun/moon positions
viewer.scene.globe.enableLighting = true;
//Stazione di terra
var entity = viewer.entities.add({
position: Cesium.Cartesian3.fromDegrees(12.04, 44.23),
ellipse : {
semiMinorAxis : 150000.0,
semiMajorAxis : 150000.0,
material : Cesium.Color.YELLOW.withAlpha(0.5)
}
});
var ellipse = entity.ellipse;
ellipse.material = new Cesium.GridMaterialProperty({
color : Cesium.Color.YELLOW,
cellAlpha : 0.2,
lineCount : new Cesium.Cartesian2(8, 8),
lineThickness : new Cesium.Cartesian2(2.0, 2.0)
});
var GroundStation = viewer.entities.add({
name : 'Ground Station',
position : Cesium.Cartesian3.fromDegrees(12.07, 44.23),
point : {
pixelSize : 5,
color : Cesium.Color.RED,
outlineColor : Cesium.Color.WHITE,
outlineWidth : 2
},
label : {
text : 'Ground Station',
font : '14pt monospace',
style: Cesium.LabelStyle.FILL_AND_OUTLINE,
outlineWidth : 2,
verticalOrigin : Cesium.VerticalOrigin.BOTTOM,
pixelOffset : new Cesium.Cartesian2(0, -9)
}
});