STK Components 二次开发-地面站传感器

上一篇我们说了创建地面站,那么这次我们在地面站添加一些特效。

1. 创建地面站

var locationPoint1 = new PointCartographic(m_earth, new Cartographic(Trig.DegreesToRadians(117.17066), Trig.DegreesToRadians(31.84056), 240.359));
m_facility = new Platform
{
	Name = "DMZ",
	LocationPoint = locationPoint1,
	// Orient the facility using East-North-Up (ENU) axes.
	OrientationAxes = new AxesEastNorthUp(m_earth, locationPoint1),
};

// Set the identifier for the facility in the CZML document. 
m_facility.Extensions.Add(new IdentifierExtension("DSS"));

// Configure a glTF model for the facility.
m_facility.Extensions.Add(new ModelGraphicsExtension(new ModelGraphics
{
	// Link to a binary glTF file.
	Model = new CesiumResource(GetModelUri("facility.glb"), CesiumResourceBehavior.LinkTo),
	RunAnimations = false,
	HeightReference = CesiumHeightReference.ClampToGround,
}));

// Configure label for AGI HQ.
m_facility.Extensions.Add(new LabelGraphicsExtension(new LabelGraphics
{
	Text = m_facility.Name,
	FillColor = Color.White,
	Font = new ConstantCesiumProperty<string>("20px"),
	// 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),
	HeightReference = CesiumHeightReference.ClampToGround,
}));

2.创建传感器

// Define the location of the facility using cartographic coordinates.
var locationPoint = new PointCartographic(m_earth, new Cartographic(Trig.DegreesToRadians(117.17066), Trig.DegreesToRadians(31.84056), 272.359));

m_sensorDome = new Platform
{
	Name = "Sensor Dome",
	LocationPoint = locationPoint,
	OrientationAxes = new AxesEastNorthUp(m_earth, locationPoint),
};

// Set the identifier for the facility in the CZML document. 
m_sensorDome.Extensions.Add(new IdentifierExtension("SensorDome"));

// Define the sensor geometry.
var dome = new ComplexConic();
dome.SetHalfAngles(0.0, Math.PI);
dome.SetClockAngles(0.0, Math.PI * 2);
dome.Radius = 10000.0;
m_sensorDome.Extensions.Add(new FieldOfViewExtension(dome));

// Configure graphical display of the sensor dome.
m_sensorDome.Extensions.Add(new FieldOfViewGraphicsExtension(new SensorFieldOfViewGraphics
{
	//遮罩线颜色
	DomeSurfaceMaterial = new GridMaterialGraphics
	{
		Color = Color.Transparent,
		CellAlpha = 0.0,
	},

	EllipsoidHorizonSurfaceMaterial = new SolidColorMaterialGraphics
	{
		Color = Color.YellowGreen,
	},
	//贴地透明色
	EllipsoidSurfaceMaterial = new SolidColorMaterialGraphics
	{
		Color = Color.Transparent,
	},
	EnvironmentIntersectionColor = new ConstantCesiumProperty<Color>(Color.Red),

	EnvironmentOcclusionMaterial = new SolidColorMaterialGraphics
	{
		Color = Color.Green,
	},
	IntersectionColor = new ConstantCesiumProperty<Color>(Color.Transparent),//贴地轮廓
	LateralSurfaceMaterial = new SolidColorMaterialGraphics
	{
		Color =  Color.Red,
	},

   

	EnvironmentConstraint =true,
	ViewshedOccludedColor = new ConstantCesiumProperty<Color>(Color.Red),
	ViewshedVisibleColor = new ConstantCesiumProperty<Color>(Color.Red)
}));

// Define a rotating axes.
var rotatingAxes = new AxesLinearRate
{
	ReferenceAxes = new AxesEastNorthUp(m_earth, locationPoint),
	ReferenceEpoch = m_epoch,
	InitialRotation = UnitQuaternion.Identity,
	SpinAxis = UnitCartesian.UnitZ,
	InitialRotationalVelocity = Trig.DegreesToRadians(5.0), // 5 degrees per second
	RotationalAcceleration = 0.0,
};

// Define a rotation around X.
UnitQuaternion quaternion = new UnitQuaternion(new AngleAxisRotation(Math.PI / 3.0, UnitCartesian.UnitX));
// Define an angular offset for the rotating axes.
var rotatedOffsetAxes = new AxesFixedOffset(rotatingAxes, quaternion);

m_rotatingSensor = new Platform
{
	Name = "Rotating Sensor",
	LocationPoint = locationPoint,
	OrientationAxes = rotatedOffsetAxes
};

// Set the identifier for the sensor in the CZML document. 
m_rotatingSensor.Extensions.Add(new IdentifierExtension("RotatingSensor"));

// Define the sensor geometry.
m_rotatingSensor.Extensions.Add(new FieldOfViewExtension(new RectangularPyramid
{
	XHalfAngle = Trig.DegreesToRadians(30),
	YHalfAngle = Trig.DegreesToRadians(30),
	Radius = 10000.0,
}));

// Configure graphical display of the sensor.
m_rotatingSensor.Extensions.Add(new FieldOfViewGraphicsExtension(new SensorFieldOfViewGraphics
{
	DomeSurfaceMaterial = new GridMaterialGraphics
	{
		Color = Color.Green,
		CellAlpha = 0.5,
	},
	LateralSurfaceMaterial = new GridMaterialGraphics
	{
		Color = Color.Pink,
		CellAlpha = 0.5,
	},
	IntersectionColor = Color.White,
	ShowIntersection = true,
	ShowEllipsoidHorizonSurfaces = true,
}));

实现效果

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mfbz.cn/a/191359.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

计算机视觉面试题-01

计算机视觉面试通常涉及广泛的主题&#xff0c;包括图像处理、深度学习、目标检测、特征提取、图像分类等。以下是一些可能在计算机视觉面试中遇到的常见问题&#xff1a; 图像处理和计算机视觉基础 图像是如何表示的&#xff1f; 图像在计算机中可以通过不同的表示方法&…

以非常规思维去做一个嵌入式音视频开发项目!

前言&#xff1a; 大家好&#xff0c;在上周的文章里面&#xff0c;给大家介绍了一个音视频项目&#xff0c;本周继续来分享音视频项目&#xff0c;之前说过&#xff0c;如果你不知道做什么功能开发嘛&#xff0c;因为接触的少&#xff1b;我突然想到&#xff0c;可以去参考市面…

JVM的小知识总结

加载时jvm做了这三件事&#xff1a; 1&#xff09;通过一个类的全限定名来获取该类的二进制字节流 什么是全限定类名&#xff1f; 就是类名全称&#xff0c;带包路径的用点隔开&#xff0c;例如: java.lang.String。 即全限定名 包名类型 非限定类名也叫短名&#xff0c;就…

利用STM32和MFRC522 IC实现智能卡的读取和数据存储

利用STM32微控制器和MFRC522 RFID读写器芯片&#xff0c;可以实现智能卡的读取和数据存储功能。智能卡是一种集成了RFID技术和存储芯片的卡片&#xff0c;它可以用于身份验证、门禁控制、支付系统等应用场景。下面将介绍如何使用STM32和MFRC522芯片进行智能卡的读取和数据存储&…

【计算机视觉】【图像处理综合应用】路沿检测

实验内容&#xff1a;针对给定的视频&#xff0c;利用图像处理基本方法实现道路路沿的检测&#xff1b; 提示&#xff1a;可利用Hough变换进行线检测&#xff0c;融合路沿的结构信息实现路沿边界定位&#xff08;图中红色的点位置&#xff09;。 处理视频文件 处理视频文件的主…

Nginx(资源压缩)

建立在动静分离的基础之上&#xff0c;如果一个静态资源的Size越小&#xff0c;那么自然传输速度会更快&#xff0c;同时也会更节省带宽&#xff0c;因此我们在部署项目时&#xff0c;也可以通过Nginx对于静态资源实现压缩传输&#xff0c;一方面可以节省带宽资源&#xff0c;第…

GPT4测试 — 答题能力及文档处理能力

创建gdp.txt文件&#xff08;使用word 2013创建的文档测试了也可以&#xff0c;WPS建的不行&#xff09; 上传文件&#xff0c;输入prompt: 请帮我答题&#xff0c;把那个正确答案的选项的字母序号填在&#xff08;&#xff09;中&#xff0c;并返回文件blabla… 给我一个文件…

第二十三章 解析PR曲线、ROC曲线、AUC、AP(工具)

混淆矩阵Confusion Matrix 混淆矩阵定义 混淆矩阵是机器学习中总结分类模型预测结果的情形分析表&#xff0c;以矩阵形式将数据集中的记录按照真实的类别与分类模型预测的类别判断两个标准进行汇总。其中矩阵的行表示真实值&#xff0c;矩阵的列表示预测值&#xff0c;下面我…

可燃气体监测仪助力燃气管网安全监测,效果一览

城市地下管线是指城市范围内供应水、排放水、燃气等各类管线及其附属设施&#xff0c;它们是保障城市正常运转的重要基础设施且影响着城市生命线。其中燃气引发的事故近些年不断增加&#xff0c;由于燃气管线深埋地下环境复杂&#xff0c;所以仅仅依赖人工巡查难以全面有效地防…

PCIE链路训练-状态机描述3

Configuration.Idle 1.当使用8b/10b编码时&#xff0c;non-flit模式下&#xff0c;在所用配置的lane上发送s Idle data Symbols&#xff0c;在flit mode下发送IDLE flit。 2.linkup 0 link两端的component均支持64.0GT/s的速率&#xff0c;根据进入此状态之前发送的8个TS2或…

2023/11/26总结

一些学习记录&#xff1a; 在对数据库进行一系列操作的时候&#xff0c;遇到一个问题&#xff0c;在插入数据的时候&#xff0c;我数据库对应的是自增id&#xff0c;但是插入后想获取到这个id去使用。我以为是不可以马上获取的&#xff0c;然后看到 项目进度 购物车&#xff…

springboot核心原理之@SpringbootApplication

1.SpringbootApplication Configuration标志的类 在spring ioc启动的时候就会加载创建这个类对象 EnableAutoConfiguration 中有两个注解 &#xff08;1&#xff09;AutoConfigurationPackage 扫描主程序包(主程序main所在包及其子包) 可以看到这个类 &#xff1a; static c…

Ubuntu:安装VSCode

参考博客Ubuntu下安装VSCODE_ubuntu安装vscode-CSDN博客中的第二种方式【安装包方式安装】&#xff0c;即可&#xff0c;安装非常easy~~~ 安装包方式安装&#xff1a; 1. 从VSCode官网下载最新版的deb安装包&#xff1a; https://code.visualstudio.com/Download&#xff0c;…

【论文解读】Real-ESRGAN:使用纯合成数据训练真实世界的超分辨率图像

图一是4种超分方法的对比效果 。 0 摘要 尽管在盲超分辨率方面已经进行了许多尝试&#xff0c;以恢复具有未知和复杂退化的低分辨率图像&#xff0c;但它们仍然远远不能解决一般的真实世界退化图像。在这项工作中&#xff0c;我们将强大的 ESRGAN 扩展到一个实际的恢复应用程序…

85基于Matlab的交通设施识别

基于Matlab的交通设施识别。 GUI设计图像处理, 基于数字图像处理&#xff0c;设计实现一个自然场景下公路交通限速标志分割和识别的程序。要求系统具有界面&#xff0c;并实现以下功能&#xff1a; 1&#xff09;读入自然场景下包含交通标志的图像&#xff1b; 2&#xff09;对…

Java多线程并发中部分不并发的问题

写Java实验发现个有意思的问题 三个线程&#xff0c;一个线程打印字符a&#xff0c;一个线程打印字符b&#xff0c;另一个线程打印数字&#xff0c;多次运行结果都是先打印混合输出的ab&#xff0c;完了再打印数字 有图有真相&#xff0c;我运行了10次 完整的代码是这个 clas…

win10下载Remix IDE桌面版以及空白页面的解决

文章目录 Remix IDE 的下载Remix IDE 空白页面的解决 Remix IDE 的下载 到 github 地址 https://github.com/ethereum/remix-desktop/releases 选择exe文件或根据自己电脑版本选择对应的zip文件进行下载&#xff0c;然后正常安装即可。 Remix IDE 空白页面的解决 有时打开Remix…

7 通用数字量输入输出GPIO

文章目录 7.0 GPIO概念7.1 GPIO工作原理7.2 GPIO寄存器以及编程7.2.5 GPIO寄存器编程设置与应用 7.3 GPIO跑马灯7.3.1 LED 输出初始化7.3.2 跑马灯输出实验7.3.3 按键输入实验 7.0 GPIO概念 GPIO&#xff08;general purpose intput output&#xff09;是通用输入输出端口的简…

记一次Kotlin Visibility Modifiers引发的问题

概述 测试环境爆出ERROR告警日志java.lang.IllegalStateException: Didnt find report for specified language&#xff0c;登录测试环境ELK查到如下具体的报错堆栈日志&#xff1a; java.lang.IllegalStateException: Didnt find report for specified language at com.aba.…

7000字详解 动态代理(JDK动态代理 CGLIB动态代理)与静态代理

代理模式 1. 代理模式 概念2. 静态代理3. 动态代理3.1.JDK动态代理3.2.CGLIB动态代理3.3. JDK动态代理和CGLIB动态代理区别 4.静态代理和动态代理区别5.篇末 1. 代理模式 概念 代理模式是一种设计模式。 使用代理对象来替代真实对象&#xff0c;用代理对象去访问目标对象。这样…