*[Orekit](https://gitlab.orekit.org/orekit/orekit) >= V 1.12
*[junit-jupiter](https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter) >= V 5.10.2
*[czml-writer](https://github.com/AnalyticalGraphicsInc/czml-writer) >= V 3.0.0
* A directory and a path of the inputs if there are some.
* A directory and a path of the output.
In order to generate a CZML file, we will first describe the intern architecture of a CZML file :
## Installation
## CZML Structure
A CZML file is a subset of [JSON files](https://en.wikipedia.org/wiki/JSON). Hence, a CZML file contains only one array of a JSON file. Objects inside the CZML are nammed **[packet]()**, all the objects we will use are in fact packets.
### The Header
[Doc here](Header)
The header describes the entire scene and the time the simulation will lasts. It is absolutly mandatory that the header is the first object created while writing in the CZML file.
### Objects that can be added :
#### Satellite
[Doc here](Satellite)
The satellite object will create a satellite and its path. The path will be computed with a propagation for the duration of the scene. (**A propagator can create the header in order to setup the propagation parameters before**).
#### Ground Station
[Doc here](CZMLGroundStation)
The ground station object will create and display a ground station at the surface of the earth.
#### Visibility Cone
[Doc here](VisibilityCone)
The visibility cone is an object that can be build in order to create a [Line Of Visibility](LineOfVisibility) of to display what the station sees. It can be created only with a station then it will not be bounded to a specific satellite. Or it can be created with a satellite and the visiblity cone will have the height of the satellite.
#### Line of visibility
[Doc here](LineOfVisibility)
### With maven
The line of visibility is a line that will be displayed only when a satellite is visible in the local sky of a ground station.
Orekit and junit can be installed with maven using a pom.xml with dependencies :
For the czml writer you will need to install it differently, because no maven repository exists, two methos can be used :
The constellation object creates several [Satellites](Satellite) at the same time in order to build a constellation with the number of satellites given and orbital planes given.
## Functions to use
After each object is created, the function `.generateCZML()` is callable to write the object into the CZML file. When the last object is written, the function `.endFile()` will need to be called in order to finish the CZML file (Be careful to use `endFile()` only on the last object of the file).
Here is an example of what a classic OreCZML call can look like :
// Input : An LEO orbit of 550 km of altitude, with an inclination of 60°, a perigee argument of 90° and a //right ascension of the ascending node of 90°
* You download the .jar and you install it directly. Let name the groupId `com.custom`, the artifactId `cesium` and the version iwll be `1.0`. You will need to add in the pom.xml the following lines to do so :
```xml
<dependency>
<groupId>com.custom</groupId>
<artifactId>cesium</artifactId>
<version>1.0</version>
</dependency>
```
Now that the dependency is added you can now use the following command in maven to install it :
The [cesium sandbox](https://sandcastle.cesium.com) is a web interface that allows the user to display online [CesiumJS](https://cesium.com/platform/cesiumjs/) code for visualisation. CesiumJS is a javascript library that can displays 3D scenes around central bodies. CesiumJS understands CZML file and can load them into the scene.
The cesium sandcastle is good to display small czml files, but when file are quite bigger, it is advised to load cesium locally in order to compute bigger simulations. To do so a [repository]() has been created to work with OreCZML. You will find there all instructions to launch cesium locally.