0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

cesiumで「みちびき」の軌道をプロットした。その2

Posted at

概要

cesiumで「みちびき」の軌道をプロットした。

参考にしたページ

サンプルコード

const viewer = new Cesium.Viewer('cesiumContainer', {
	imageryProvider: new Cesium.TileMapServiceImageryProvider({
		url: Cesium.buildModuleUrl("Assets/Textures/NaturalEarthII"),
	}),
	baseLayerPicker: false, 
	geocoder: false, 
	homeButton: false, 
	infoBox: false,
	navigationHelpButton: false, 
	sceneModePicker: false
});
viewer.scene.globe.enableLighting = true;
const tle = {
   "name": 'mitibiki',
    "first_line": "1 37158U 10045A   11015.18584668 -.00000050  00000-0  10000-3 0   607",
    "second_line": "2 37158 040.9221 193.2641 0749201 270.0188 212.6145 01.00271298  1281"
}
const now = new Date();    
for (var i = 0; i < 24; i++)
{
  now.setHours(now.getHours() + 1);
	var satrec = satellite.twoline2satrec(tle.first_line, tle.second_line);
  var positionAndVelocity = satellite.propagate(satrec, now);
  var gmst = satellite.gstime(now);
  var position = satellite.eciToGeodetic(positionAndVelocity.position, gmst);
  viewer.entities.add({
    position: Cesium.Cartesian3.fromRadians(position.longitude, position.latitude, position.height * 1000),
	  point: { 
	    pixelSize: 5, 
	    color: Cesium.Color.RED 
	  }    
  });    
}
viewer.zoomTo(viewer.entities);




成果物

以上。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?