1. A concise explanation of the problem you’re experiencing.
I’m trying to draw the path of a orbit around Earth given the semi major axis, along with the point of perigee and apogee. Also, I’d like to incline the orbit, longitude of the ascending node and argument of periapsis. Basically everything that defines an orbit without having to say where the object is along the orbit.
I tried using a EllipseGeometry, but that didn’t work since it kept being attached to the surface of the Earth or curved with the surface when I added height.
2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.
I can sort of get what I want using a polyline for a circular orbit:
var meo_orbit = 20000000;
var inclination = 30;
var meoline = viewer.entities.add({
name : ‘Blue dashed line’,
polyline : {
positions : Cesium.Cartesian3.fromDegreesArrayHeights(
[0, 0, meo_orbit,
90, inclination, meo_orbit,
180, 0, meo_orbit,
270,inclination * -1 , meo_orbit,
0, 0, meo_orbit
]),
width : 1,
material : new Cesium.PolylineDashMaterialProperty({
color: Cesium.Color.GRAY
})
}
});
The issue I’m having is generalizing the calculation of the 4 vertex points. I’m assuming there is a way I can calculate those with the given inputs but I want to make sure this is the best/proper approach as I’m just starting to learn space, orbits and such.
3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
My goal is to create a simply panel for quickly visualizing different orbits (LEO, HEO, MEO, etc) paths without having to propagate a satellite or object around to get it. I want to visualize how the orbits change as different parameters are adjusted.
4. The Cesium version you’re using, your operating system and browser.
1.44. Linux. Firefox.
Thank you for help.