These services return Czml for visualization in Cesium.
Cesium is an open source JavaScript globe and map for visualizing dynamic objects and data.
The Sgp4 Czml service returns a Czml stream that can be loaded into a Cesium window, or saved as a file. This service provides the orbit for a user-specified satellite, over a given duration.
{ "Start": "YYYY-MM-DDTHH:mm:ss", "Stop" : "YYYY-MM-DDTHH:mm:ss", "SSC": 12345, "TLEs": ["TLE string 1","TLE string 2"], "PathColor": "Red", "LeadTime": 2700, "TrailTime": 2700, "SatelliteName": "Satellite Name", "OutputSettings": (see output POST Data Example) }
Generates an orbit for the ISS with a green orbit path.
{ "Start": "2014-07-15T13:02:55", "Stop": "2014-07-15T14:02:55", "SSC": 25544, "PathColor": "Green", "SatelliteName": "ISS", "OutputSettings": { "Step": 300, "TimeFormat": "Epoch", "CoordinateFormat": { "Coord": "XYZ", "Frame": "Inertial" } } }
The output is a Czml document stream that can be directly used in Cesium.
[ { "id": "document", "name": "SGP4 route", "description": "Route for a satellite object", "version": "1.0", "clock": { "interval": "20140715T130255Z/20140715T140255Z", "currentTime": "20140715T130255Z" } }, { "id": "907de8fc-2cfd-41ed-9ad8-1c81146ce7f7", "name": "ISS", "label": { "text": "ISS", "scale": 0.5, "eyeOffset": { "cartesian": [ 1000, 1000, 0 ] }, "fillColor": { "rgba": [ 0, 128, 0, 255 ] } }, "path": { "width": 2, "leadTime": 2700, "trailTime": 2700, "material": { "polylineOutline": { "color": { "rgba": [ 0, 128, 0, 255 ] } } } }, "point": { "pixelSize": 5, "color": { "rgba": [ 0, 255, 0, 255 ] }, "outlineColor": { "rgba": [ 255, 255, 255, 255 ] }, "outlineWidth": 1 }, "position": { "interpolationAlgorithm": "LAGRANGE", "interpolationDegree": 5, "referenceFrame": "INERTIAL", "epoch": "20140715T130255Z", "cartesian": [ 0, -4523158.946108278, 4974755.3926670505, 973796.9219644082, 300, -5483598.473258102, 3927485.6504392726, -819481.5189799711, 600, -5822099.923416168, 2434745.8688244275, -2519573.1542970072, 900, -5500958.93829691, 666108.8794233681, -3933426.426193799, 1200, -4557448.977191549, -1177939.650874888, -4901041.271107068, 1500, -3098994.8713867627, -2888937.858212128, -5313358.452854597, 1800, -1290649.589421391, -4273782.676854467, -5124088.224063983, 2100, 663410.8341995103, -5176047.322256854, -4354598.270790426, 2400, 2542457.57322875, -5493341.630953689, -3091609.989793312, 2700, 4133775.7529580663, -5189045.694134789, -1477839.6869088674, 3000, 5256798.781596554, -4296946.519933884, 303782.83779966214, 3300, 5783988.569934239, -2917815.8451058124, 2050865.8454086138, 3600, 5655669.575847693, -1207990.387488192, 3564872.9572488293 ] } } ]
The Gps Czml service returns a Czml stream that can be loaded into a Cesium window, or saved as a file. This service provides all of the current Gps satellite orbits for a given time, colored by Gps Block Type. Optionally, the service will highlight those orbits for which the Gps satellite is unhealthy.
/vehiclePath/Czml/Gps?u=APIKEY&start=YYYY-MM-DDTHH:mm:ss&stop=YYYY-MM-DDTHH:mm:ss&highlightOutages=true&outageColor=White&inertial=false
/vehiclePath/Czml/Gps?u=APIKEY&start=2014-07-15&stop=2014-07-16
To load this Czml directly into a Cesium window, create your Cesium environment first, using the instructions here. Once your Cesium environment is up, add some javascript that will populate the Cesium globe with the Czml from this Url, similar to the following.
<script> var viewer = new Cesium.Viewer('cesiumContainer'); var czmlDataSource = new Cesium.CzmlDataSource(); var baseURL = '.../vehiclePath/Czml/Gps?start='; var startStr = '2014-07-15'; var stopStr = '&stop=2014-07-16'; var highlightStr = '&highlightOutages=true'; var outageColorStr = '&outageColor=White'; var url = baseURL + startStr + stopStr + highlightStr + outageColorStr; czmlDataSource.loadUrl(url).then(function () { viewer.dataSources.add(czmlDataSource); }) </script>
The Airspace Volumes Czml service returns a Czml stream that can be loaded into a Cesium window, or saved as a file. This service provides graphical volumes representing airspaces used in these services. Volumes can be retrieved by using the airspace search criteria defined in the Defining Airspace Options help section.
[ { "AirspaceOptions": {options defined here}, "Color": "Red", "Translucency" : 50, "Outline": "true", "OutlineColor": "Black", "DisplayStart": "2017-01-17T13:02:55", "DisplayStop" : "2017-01-17T18:53:43", }, { ... }, ... ]
Note that the input supports an array of request objects; you can request many different types of airspace volumes with one call.
Also note that Cesium does not handle large numbers of czml items well. A few hundred will work fine, whereas several thousand will drop the Cesium frame rate dramatically. It's suggested that you use the airspace filtering capabilities in the 'AirspaceOptions' parameter to make the number of returned czml objects as small as possible. If you were to leave off the optional 'AirspaceOptions', this service will return over 20000 items, which will not be viewable in Cesium at all.
Returns czml for park airspaces and colors them green. Also returns airport airspaces, coloring them gray. Both are displaying at different times and have different properties.
[ { "AirspaceOptions": { "Categories": [ "Parks" ], "RegionCenter": { "Latitude": 37.13328, "Longitude": -76.41104, "Altitude": 0 }, "MeanSeaLevel": true, "UseRegionalAirspaceQuery": true, "RegionRadius": 100000 }, "Color": "green", "OutlineColor": "LimeGreen", "DisplayStart": "2017-01-01T01:00:00", "DisplayStop": "2017-01-01T06:59:59" }, { "AirspaceOptions": { "Categories": [ "Airport" ], "RegionCenter": { "Latitude": 37.13328, "Longitude": -76.41104, "Altitude": 0 }, "MeanSeaLevel": true, "UseRegionalAirspaceQuery": true, "RegionRadius": 5000 }, "Color": "gray", "Outline": "false", "DisplayStart": "2017-01-01T06:00:00", "DisplayStop": "2017-01-01T11:59:59" } ]
The output contains a Czml document string that can be directly used in Cesium as well as a list of unrecognized airspaceIds that were sent to the service, if any.
{ "Czml": "[{\"id\":\"document\",\"name\":\"AirspaceRegions\",\"description\":\"Airspace regions for a set of provided airspace ids\",\"version\":\"1.0\",...truncated for brevity", "UnrecognizedIds": [] }