STK Components 二次开发- StarLink

1.星链数据下载

CelesTrak: Current GP Element Sets

下载二根数就可以。

2.处理数据

下载下来的数据是这样,要将字符串转为 二根数对象

TwoLineElementSet tle = new TwoLineElementSet(tleString);
Sgp4Propagator propagator = new Sgp4Propagator(tle);

3.批量创建卫星 设置名称和轨迹线


var issPoint = new Sgp4Propagator(tleList).CreatePoint();
var satellite = new Platform
{
	Name = tleList.Name,
	LocationPoint = issPoint,
	OrientationAxes = new AxesVehicleVelocityLocalHorizontal(m_earth.FixedFrame, issPoint),
};

satellite.Extensions.Add(new IdentifierExtension(tleList.Name));
var labelExtension = new LabelGraphicsExtension(new LabelGraphics
{
	Text = new ConstantCesiumProperty<string>(satellite.Name),
	FillColor = new ConstantCesiumProperty<Color>(STKUtil.GetColors(i)),
	Font = new ConstantCesiumProperty<string>("10px"),
});
satellite.Extensions.Add(labelExtension);


var markerGraphics = new BillboardGraphics
{
	Image = new CesiumResource(GetModelUri("Markers/Satellite.png"), CesiumResourceBehavior.LinkTo),
};
satellite.Extensions.Add(new BillboardGraphicsExtension(markerGraphics));

// Configure a glTF model for the satellite.
satellite.Extensions.Add(new ModelGraphicsExtension(new ModelGraphics
{
	// Link to a binary glTF file.
	Model = new CesiumResource(GetModelUri("satellite.glb"), CesiumResourceBehavior.LinkTo),
	// By default, Cesium plays all animations in the model simultaneously, which is not desirable.
	RunAnimations = false,
}));


satellite.Extensions.Add(new PathGraphicsExtension(new PathGraphics
{
	Material = new PolylineOutlineMaterialGraphics
	{
		Color = new ConstantCesiumProperty<Color>(STKUtil.GetColors(i)),
		OutlineWidth = new ConstantCesiumProperty<double>(1.0),
		OutlineColor = new ConstantCesiumProperty<Color>(Color.Black),
	},
	Width = 1,
	LeadTime = Duration.FromMinutes(20).TotalSeconds,
	TrailTime = Duration.FromMinutes(20).TotalSeconds,
}));

4 效果

1000颗星轨迹线加名字看着好乱

5.去掉名称和轨迹线

卫星视角

缩小看到的是图片,放大看到的是模型

全量数据不到5000颗卫星。

  • 8
    点赞
  • 15
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值