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

2023-11-27 09:15

本文主要是介绍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 secondRotationalAcceleration = 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,
}));

实现效果

这篇关于STK Components 二次开发-地面站传感器的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/427419

相关文章

Superset二次开发之Select 筛选器源码分析

路径:superset-frontend/src/filters/components/Select  源码文件: 功能点: 作用 交互 功能 index.ts作为模块的入口点,导出其他文件中定义的主要组件和函数。它使其他文件中的导出可以被外部模块使用。 SelectFilterPlugin.tsx 定义主要的插件类 SelectFilterPlugin 和组件 Sele

了解elementUI的底层源码, 进行二次开发

Element UI 是一个基于 Vue.js 的桌面端组件库,广泛用于构建美观、交互友好的用户界面。要深入理解 Element UI 的底层源码并进行二次开发,你需要掌握以下几个关键点: Vue.js 原理 Element UI 是基于 Vue.js 构建的,因此首先需要熟悉 Vue.js 的核心概念和机制,包括: ● 组件系统:Vue.js 的组件化思想,如何定义组件、使用组件、传递属性和事

关于武汉高芯coin417G2红外机芯的二次开发

文章目录 前言一、外观和机芯参数二、SDK的使用1、打开相机2、回调函数中获取全局温度和图像3、关闭相机 前言 最近工作中接触了一款基于武汉高芯科技有限公司开发的红外模组,即coin417g2(测温型)+9.1mm镜头.使用此模组,开发了一套红外热成像检测桌面应用程序.下面简单记录下该模组的使用. 一、外观和机芯参数 如下是该机芯的外观和机芯参数: 二、SDK

人体红外传感器简介

人体红外传感器的工作原理是利用热释电效应,将人体发出的特定波长的红外线转化为电信号,从而实现对人体的检测和感知。               具体来说,人体红外传感器主要由滤光片、热释电探测元和前置放大器组成。滤光片的作用是使特定波长的红外辐射选择性地通过,到达热释电探测元,而在其截止范围外的红外辐射则不能通过。热释电探测元是传感器的核心元件,当它受到非恒定强度的红外光照射时,会产生

NX二次开发—进阶(二)

一、创建圆弧 在NX上通过代码画出圆弧,定义起始和终止位置,还有圆心位置和半径 创建圆弧,需要获取CSYS的矩阵ID,通过UF_CURVE_create_arc函数进行创建 //定义参数UF_CURVE_arc_t arc;arc.start_angle = 0.0;arc.end_angle = 225 * DEGRA;//DEGRA=PI/180//中心坐标arc.arc_center

NIFI汉化_替换logo_二次开发_Idea编译NIFI最新源码_详细过程记录_全解析_Maven编译NIFI避坑指南001

由于需要对NFI进行汉化,以及二次开发,首先要下载源码以后编辑通过,NIFI的源码,项目非常多,编译过程中需要编译超过570个jar包,同时编译过程很慢需要30多分钟. 1.首先下载NIFI源码,根据需要下载对应版本: https://github.com/kemixkoo/orchsym-runtime/   首先介绍一下,这个是一个公司根据nifi进行定制开发的,已经汉化,但是不能商

NX二次开发——进阶(一)

一、链表及相关函数的用法 函数说明UF_MODL_create_list创建一个链表,并返回链表的头指针UF_MODL_put_list_item插入元素到链表中,不检验对象是否重复,或者已经存在UF_MODL_ask_list_count获取链表对象数量,从头开始遇到null_tag结束UF_MODL_ask_list_item查询链表对象标识,给个位置返回标识UF_MODL_delete_l

​​NIFI汉化_替换logo_二次开发_Idea编译NIFI最新源码_详细过程记录_全解析_Maven编译NIFI避坑指南002

继续,执行pom.xml引入依赖以后,发现以下几种报错: 可以看到在下载aws-java-sdk-bundle 1.12.710版本的时候报错了 可以看到日志信息,就是在阿里云上下载的,因为阿里云上缺少这个jar包 aws-java-sdk-bundle-1.12.710.jar 这个jar包,我还特意去阿里云上查询了一下 https://developer.aliyun.com/

恋爱相亲交友系统源码原生源码可二次开发APP 小程序 H5,web全适配

直播互动:平台设有专门的直播间,允许房间主人与其他异性用户通过视频连线的方式进行一对一互动。语音视频交流:异性用户可以发起语音或视频通话,以增进了解和交流。群组聊天:用户能够创建群聊,邀请自己关注的异性朋友加入,以便进行多人在线交流。虚拟礼品赠送:平台提供多样化的虚拟礼物,不同礼物有不同的价值,用户可以用来表达好感或支持。私人消息:异性用户之间可以互相发送私人信息,不过平台为了维护用户体验,对

UG二次开发CreateDialog函数在UI.hxx文件和WinUser.h中的冲突

文章出自https://blog.csdn.net/qq_41843732/article/details/91422764 在UG二次开发中,若使用MFC库,一旦加上#include<Afx.h>头文件,下面这句话就报错 theDialog = GetPoints::theUI->CreateDialog(theDlxFileName); 解决CreateDialog函数在UI.hx