当前位置: 首页 > news >正文

STK Components 二次开发-创建卫星

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  36272 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);

4.设置卫星模型

 // Configure a glTF model for the satellite.
m_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,}));

设置卫星轨迹线颜色

// Configure graphical display of the orbital path of the satellite
m_satellite.Extensions.Add(new PathGraphicsExtension(new PathGraphics
{// Configure the visual appearance of the line.Material = new PolylineOutlineMaterialGraphics{Color = new ConstantCesiumProperty<Color>(Color.White),OutlineWidth = new ConstantCesiumProperty<double>(1.0),OutlineColor = new ConstantCesiumProperty<Color>(Color.Black),},Width = 2,// Lead and Trail time indicate how much of the path to render.LeadTime = Duration.FromMinutes(44).TotalSeconds,TrailTime = Duration.FromMinutes(44).TotalSeconds,
}));

完成后的样子

完整代码

        private void CreateSatellite(){// Get the current TLE for the given satellite identifier.var tleList = TwoLineElementSetHelper.GetTles(m_satelliteIdentifier, JulianDate.Now);// Use the epoch of the first TLE, since the TLE may have been loaded from offline data.m_epoch = tleList[0].Epoch;// Propagate the TLE and use that as the satellite's location point.var locationPoint = new Sgp4Propagator(tleList).CreatePoint();m_satellite = new Platform{Name = "Satellite " + m_satelliteIdentifier,LocationPoint = locationPoint,// Orient the satellite using Vehicle Velocity Local Horizontal (VVLH) axes.OrientationAxes = new AxesVehicleVelocityLocalHorizontal(m_earth.FixedFrame, locationPoint),};// Set the identifier for the satellite in the CZML document.m_satellite.Extensions.Add(new IdentifierExtension(m_satelliteIdentifier));// Configure a glTF model for the satellite.m_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,}));// Configure a label for the satellite.m_satellite.Extensions.Add(new LabelGraphicsExtension(new LabelGraphics{// Use the name of the satellite as the text of the label.Text = m_satellite.Name,// Change the color of the label after 12 hours. This demonstrates specifying that // a value varies over time using intervals.FillColor = new TimeIntervalCollection<Color>{// Green for the first half day...new TimeInterval<Color>(JulianDate.MinValue, m_epoch.AddDays(0.5), Color.Green, true, false),// Red thereafter.new TimeInterval<Color>(m_epoch.AddDays(0.5), JulianDate.MaxValue, Color.Red, false, true),},// Only show label when camera is far enough from the satellite,// to avoid visually clashing with the model.DistanceDisplayCondition = new Bounds(1000.0, double.MaxValue),}));// Configure graphical display of the orbital path of the satellite.m_satellite.Extensions.Add(new PathGraphicsExtension(new PathGraphics{// Configure the visual appearance of the line.Material = new PolylineOutlineMaterialGraphics{Color = Color.White,OutlineWidth = 1.0,OutlineColor = Color.Black,},Width = 2.0,// Lead and Trail time indicate how much of the path to render.LeadTime = Duration.FromMinutes(44.0).TotalSeconds,TrailTime = Duration.FromMinutes(44.0).TotalSeconds,}));}

生成czml

        public void WriteDocument(TextWriter writer){// Configure the interval over which to generate data.// In this case, compute 1 day of data.var dataInterval = new TimeInterval(m_epoch, m_epoch.AddDays(1));// Create and configure the CZML document.var czmlDocument = new CzmlDocument{Name = "CesiumDemo",Description = "Demonstrates CZML generation using STK Components",RequestedInterval = dataInterval,// For this demonstration, include whitespace in the CZML// to enable easy inspection of the contents. In a real application,// this would usually be false to reduce file size.PrettyFormatting = true,// Configure the clock on the client to reflect the time for which the data is computed.Clock = new Clock{Interval = dataInterval,CurrentTime = dataInterval.Start,Multiplier = 15.0,},};// Add all of our objects with graphical extensions.czmlDocument.ObjectsToWrite.Add(m_satellite);// Write the CZML.czmlDocument.WriteDocument(writer);}

相关文章:

STK Components 二次开发-创建卫星

1.卫星数据 可以用stk 里面自带的 参数帮助文档。 也可以自己下载 CelesTrak: Current GP Element Sets 这里你所需要的最新卫星数据全有。 其实创建需要的就是卫星的二根数。 给定二根数也可以。 读取数据库中的卫星数据 这个接口优先下载最新的。 var tleList TwoL…...

【深度学习】因果推断与机器学习的高级实践 | 数学建模

文章目录 因果推断因果推断的前世今生&#xff08;1&#xff09;潜在结果框架&#xff08;Potential Outcome Framework&#xff09;&#xff08;2&#xff09;结构因果模型&#xff08;Structual Causal Model&#xff0c;SCM&#xff09; 身处人工智能爆发式增长时代的机器学…...

【华为OD】B\C卷真题 100%通过:字符串统计 C/C++实现

目录 题目描述&#xff1a; 示例1 代码实现&#xff1a; 【华为OD】B\C卷真题 100%通过:字符串统计 C/C实现 题目描述&#xff1a; 给定两个字符集合&#xff0c;一个为全量字符集&#xff0c;一个为已占用字符集。已占用的字符集中的字符不能再使用&#xff0c;要求输出剩…...

SparkSession介绍

一、 介绍 SparkSession是Spark 2.0中引入的新概念&#xff0c;它是Spark SQL、DataFrame和Dataset API的入口点&#xff0c;是Spark编程的统一API&#xff0c;也可看作是读取数据的统一入口&#xff1b;它将以前的SparkContext、SQLContext和HiveContext组合在一起&#xff0…...

Error PostCSS plugin autoprefixer requires PostCSS 8

文章目录 一、情况一二、情况二三、总结 在启动 vue项目时&#xff0c;突然控制台报错&#xff1a; Error: PostCSS plugin autoprefixer requires PostCSS 8。然后依次出现下面几种情况&#xff0c;依次解决完&#xff0c;项目就可以正常启动了 一、情况一 error in ./src/…...

纵观手机市场,手机即鏖战全面屏

9月13日&#xff0c;在相继发布Apple TV、Apple Watch 和iPhone 8/8 Plus之后&#xff0c;当大家都以为苹果新品发布会临近结束之时&#xff0c;苹果前CEO史蒂夫乔布斯的这句经典名言再现屏幕&#xff0c;iPhone X终于揭开了神秘面纱。 “One more thing”。 9月13日&#xff…...

基于C#实现Dijkstra算法

或许在生活中&#xff0c;经常会碰到针对某一个问题&#xff0c;在众多的限制条件下&#xff0c;如何去寻找一个最优解&#xff1f;可能大家想到了很多诸如“线性规划”&#xff0c;“动态规划”这些经典策略&#xff0c;当然有的问题我们可以用贪心来寻求整体最优解&#xff0…...

【数据结构】树与二叉树(廿三):树和森林的遍历——层次遍历(LevelOrder)

文章目录 5.3.1 树的存储结构5. 左儿子右兄弟链接结构 5.3.2 获取结点的算法5.3.3 树和森林的遍历1. 先根遍历&#xff08;递归、非递归&#xff09;2. 后根遍历&#xff08;递归、非递归&#xff09;3. 森林的遍历4. 层次遍历a. 算法LevelOrderb. 算法解读c. 时间复杂度d.代码…...

常用连接池的使用(jdbc)java 连接数据库

C3P0 导入依赖 <!-- https://mvnrepository.com/artifact/c3p0/c3p0 --><dependency><groupId>c3p0</groupId><artifactId>c3p0</artifactId><version>0.9.1.2</version></dependency><!-- https://mvnrepository.c…...

linux嵌入式时区问题

目录 操作说明实验参考 最近有个针对时区的需求&#xff0c;研究了下。 查询网上的一些设置&#xff0c;发现基本都是系统中自带的一些文件&#xff0c;然后开机时解析&#xff0c;或者是有个修改的命令。 操作 但针对嵌入式常用到的 busybox 制作的最小系统&#xff0c;并没…...

Spring基于xml注入bean的几种方式; Spring 框架中都用到了哪些设计模式;Spring的自动装配

文章目录 Spring基于xml注入bean的几种方式&#xff1a;Spring的自动装配&#xff1a;在Spring框架xml配置中共有5种自动装配&#xff1a;基于注解的方式&#xff1a; Spring 框架中都用到了哪些设计模式&#xff1f; Spring基于xml注入bean的几种方式&#xff1a; &#xff0…...

name 属性:提高 Vue 应用可维护性的关键

&#x1f90d; 前端开发工程师&#xff08;主业&#xff09;、技术博主&#xff08;副业&#xff09;、已过CET6 &#x1f368; 阿珊和她的猫_CSDN个人主页 &#x1f560; 牛客高级专题作者、在牛客打造高质量专栏《前端面试必备》 &#x1f35a; 蓝桥云课签约作者、已在蓝桥云…...

百战python04-循环结构

文章目录 趣味进度条:通过一个简单的进度条来进入循环的世界吧for-in循环语法内置函数range()练习:累和下面是使用for循环对字符串(第一个for)、range函数的循环取值示例for循环对字典、列表取值(后面会讲解字典,列表)while循环while循环实现猜数字小游戏结束循环的操…...

JVM字节码文件的相关概述解读

Java全能学习面试指南&#xff1a;https://javaxiaobear.cn 1、字节码文件 从下面这个图就可以看出&#xff0c;字节码文件是可以跨平台使用的 想要让一个Java程序正确地运行在JVM中&#xff0c;Java源码就必须要被编译为符合JVM规范的字节码。 https://docs.oracle.com/java…...

什么是轻量应用服务器?可以从亚马逊云科技的优势入手了解

什么是轻量应用服务器&#xff1f; 随着如今各行各业对云计算的需求越来越多&#xff0c;云服务器也被越来越多的企业所广泛采用。其中&#xff0c;轻量应用服务器是一种简单、高效、可靠的云计算服务&#xff0c;能够为开发人员、企业和个人提供轻量级的虚拟专用服务器&#x…...

HUAWEI华为MateBook X Pro 2022 12代酷睿版(MRGF-16)笔记本电脑原装出厂Windows11系统工厂模式含F10还原

链接&#xff1a;https://pan.baidu.com/s/1ZI5mR6SOgFzMljbMym7u3A?pwdl2cu 提取码&#xff1a;l2cu 华为原厂Windows11系统工厂包&#xff0c;带F10一键智能还原恢复功能。 自带指纹、面部识别、声卡、网卡、显卡、蓝牙等所有驱动、出厂主题壁纸、Office办公软件、华为…...

Vue3 响应式数据 reactive使用

ref 与 reactive 是 vue3 提供给我们用于创建响应式数据的两个方法。 reactive 常用于创建引用数据&#xff0c;例如&#xff1a;object、array 等。 reactive 则是通过 proxy 来实现的响应式数据&#xff0c;并配合 reflect 操作的源对象。 reactive 创建引用数据&#xff1…...

Kafka 如何实现顺序消息

版本说明 本文所有的讨论均在如下版本进行&#xff0c;其他版本可能会有所不同。 Kafka: 3.6.0Pulsar: 2.9.0RabbitMQ 3.7.8RocketMQ 5.0Go1.21github.com/segmentio/kafka-go v0.4.45 结论先行 Kafka 只能保证单一分区内的顺序消息&#xff0c;无法保证多分区间的顺序消息…...

什么是 Jest ? Vue2 如何使用 Jest 进行单元测试?Vue2 使用 Jest 开发单元测试实例

什么是Jest? Jest 是一个流行的 JavaScript 测试框架,由 Facebook 开发并维护,专注于简单性和速度。它通常用于编写 JavaScript 和 TypeScript 应用程序的单元测试、集成测试和端到端测试。 特点: 简单易用: Jest 提供简洁的 API 和易于理解的语法,使得编写测试用例变得…...

【云原生 Prometheus篇】Prometheus架构详解与核心组件的应用实例(Exporters、Grafana...)

Prometheus Part1 一、常用的监控系统1.1 简介1.2 Prometheus和zabbix的区别 二、Prometheus2.1 简介2.2 Prometheus的主要组件1&#xff09;Prometheus server2&#xff09;Exporters3&#xff09;Alertmanager4&#xff09;Pushgateway5&#xff09;Grafana 2.3 Prometheus的…...

从零开始:Pytorch源码编译Libtorch实战指南

1. 环境准备&#xff1a;打造专属编译沙盒 编译Libtorch的第一步就是搭建一个干净的开发环境。我强烈建议使用conda创建独立环境&#xff0c;这能避免与系统Python环境产生冲突。去年我在帮团队搭建深度学习平台时&#xff0c;就遇到过因为系统Python版本混乱导致的编译失败问题…...

Verilog 语言中的系统任务和系统函数

这里写自定义目录标题一、 Verilog 语言中的系统任务和系统函数2、 $write 用于输出、 打印信息3、 $strobe 用于输出、 打印信息4、 $monitor 用于持续监测变量5、 $stop 用于暂停仿真&#xff0c; $finish 用于结束仿真6、 $time 为时间函数&#xff0c; 返回 64 位当前仿真时…...

Qwen-Image-2512-Pixel-Art-LoRA 结合YOLOv8:为生成的像素画智能添加检测框标注

Qwen-Image-2512-Pixel-Art-LoRA 结合YOLOv8&#xff1a;为生成的像素画智能添加检测框标注 你有没有想过&#xff0c;自己生成的像素画&#xff0c;能不能像游戏里的场景一样&#xff0c;自动识别出里面的房子、树木和人物&#xff1f;最近我在尝试一个挺有意思的组合&#x…...

Umi-OCR完整指南:5分钟掌握免费离线文字识别技巧

Umi-OCR完整指南&#xff1a;5分钟掌握免费离线文字识别技巧 【免费下载链接】Umi-OCR OCR software, free and offline. 开源、免费的离线OCR软件。支持截屏/批量导入图片&#xff0c;PDF文档识别&#xff0c;排除水印/页眉页脚&#xff0c;扫描/生成二维码。内置多国语言库。…...

保姆级教程:用RV1126开发板和RKISP Tuner搞定ISP黑电平(BLC)校准(附避坑指南)

RV1126开发板ISP黑电平校准实战指南&#xff1a;从原理到避坑全解析 当你第一次拿到RV1126开发板&#xff0c;准备调试图像质量时&#xff0c;黑电平校准(BLC)往往是第一个需要攻克的难关。作为ISP处理流水线的第一道工序&#xff0c;BLC校准的质量直接影响后续所有图像处理效果…...

告别传统整流:手把手教你用MATLAB仿真Boost PFC电路,搞定电流谐波与低功率因数

告别传统整流&#xff1a;手把手教你用MATLAB仿真Boost PFC电路&#xff0c;搞定电流谐波与低功率因数 在电源设计领域&#xff0c;工程师们长期面临一个棘手难题&#xff1a;传统整流滤波电路虽然结构简单&#xff0c;却不可避免地带来电流谐波污染和低功率因数问题。想象一下…...

别再只会用SPI了!手把手教你用STM32的QSPI驱动外部Flash(附完整代码)

突破SPI性能瓶颈&#xff1a;STM32 QSPI驱动外部Flash的实战优化指南 在嵌入式系统开发中&#xff0c;外部Flash存储器已成为存储固件、图形资源和日志数据的标配组件。许多开发者习惯使用传统的SPI接口与Flash通信&#xff0c;但当遇到高分辨率图形加载、实时数据记录或OTA升级…...

告别Init.d!用Magisk实现安卓开机自启动的3个实战场景(含批量部署脚本)

告别Init.d&#xff01;用Magisk实现安卓开机自启动的3个实战场景&#xff08;含批量部署脚本&#xff09; 在安卓设备管理中&#xff0c;开机自启动功能一直是开发者与企业用户的核心需求之一。无论是安全监控、自动化测试还是后台服务保活&#xff0c;能否在系统启动时可靠执…...

UniApp打包小程序,从‘巨无霸’到‘苗条身材’的完整瘦身方案(HBuilderX CLI双版本指南)

UniApp打包小程序&#xff0c;从‘巨无霸’到‘苗条身材’的完整瘦身方案&#xff08;HBuilderX & CLI双版本指南&#xff09; 在移动互联网时代&#xff0c;小程序因其轻量级特性而广受欢迎&#xff0c;但这也意味着对包大小的严格限制。当UniApp项目逐渐壮大&#xff0c…...

为什么我的树莓派需要降级Python?从3.9到3.7的兼容性解决方案

为什么树莓派用户需要降级Python&#xff1f;从3.9到3.7的实战指南 当你在树莓派上兴奋地打开最新系统镜像时&#xff0c;Python 3.9已经静静地躺在你的设备里。但很快你会发现&#xff0c;某些关键库拒绝工作&#xff0c;错误提示像一堵墙挡在你和项目之间。这不是你的代码问题…...