1.卫星数据
可以用stk 里面自带的 参数帮助文档。
也可以自己下载
CelesTrak: Current GP Element Sets
这里你所需要的最新卫星数据全有。
其实创建需要的就是卫星的二根数。
给定二根数也可以。
读取数据库中的卫星数据
这个接口优先下载最新的。
var tleList = TwoLineElementSetHelper.GetTles(m_satelliteIdentifier, JulianDate.Now);
也可直接指定
var issTle =
new TwoLineElementSet(@"1 25544U 98067A 10172.34241898 .00007451 00000-0 60420-4 0 3627
2 25544 51.6459 209.3399 0009135 352.3227 186.5240 15.71934500664129");
2.创建卫星对象
// Propagate the TLE and use that as the satellite's location point.
var issPoint = new Sgp4Propagator(issTle).CreatePoint();
var m_satellite= new Platform
{
Name = "ISS",
LocationPoint = issPoint,
OrientationAxes = new AxesVehicleVelocityLocalHorizontal(earth.FixedFrame, issPoint),
};
3.设置卫星名称
var labelExtension = new LabelGraphicsExtension(new LabelGraphics
{
Text = new ConstantCesiumProperty<string>(m_satellite.Name),
FillColor = new ConstantCesiumProperty<Color>(Color.White),
});
m_satellite.Extensions.Add(labelExtension);