中文亚洲精品无码_熟女乱子伦免费_人人超碰人人爱国产_亚洲熟妇女综合网

當(dāng)前位置: 首頁 > news >正文

金塔凱元建設(shè)集團有限公司官方網(wǎng)站網(wǎng)絡(luò)營銷的特點有幾個

金塔凱元建設(shè)集團有限公司官方網(wǎng)站,網(wǎng)絡(luò)營銷的特點有幾個,.red域名做網(wǎng)站好不好,黑龍江網(wǎng)站建設(shè)公司起因:看了cesium官網(wǎng)衛(wèi)星通信示例發(fā)現(xiàn)只有cmzl版本的,決定自己動手寫一個。歡迎大家一起探討,評論留言。 效果 全部代碼在最后 起步 尋找衛(wèi)星軌跡數(shù)據(jù),在網(wǎng)站space-track上找的,自己注冊賬號QQ郵箱即可。 衛(wèi)星軌道類…

起因:看了cesium官網(wǎng)衛(wèi)星通信示例發(fā)現(xiàn)只有cmzl版本的,決定自己動手寫一個。歡迎大家一起探討,評論留言。

效果

在這里插入圖片描述

全部代碼在最后

起步

尋找衛(wèi)星軌跡數(shù)據(jù),在網(wǎng)站space-track上找的,自己注冊賬號QQ郵箱即可。

  1. 衛(wèi)星軌道類型 軌道高度 衛(wèi)星用途
  2. LEO (低地球軌道) 500-2000km 對地觀測、測地、通信、導(dǎo)航等
  3. MEO (中地球軌道) 2000-35786km 導(dǎo)航
  4. GEO(地球靜止軌道) 35786km 通信 導(dǎo)航、氣象觀測等
  5. SSO (太陽同步軌道) <6000km 觀測等
  6. IGSO(傾斜地球同步軌道) 35786km 導(dǎo)航
    在這里插入圖片描述
    點擊TLE就可以得到衛(wèi)星的兩個軌道數(shù)據(jù)
    在這里插入圖片描述
    當(dāng)然這個數(shù)據(jù)需要相對應(yīng)的插件satellite.js轉(zhuǎn)換成我們熟悉的經(jīng)緯高;
    拔下來的數(shù)據(jù)存入json文件中:
    在這里插入圖片描述
    最后構(gòu)造衛(wèi)星軌跡對象
import {twoline2satrec, gstime, eciToGeodetic,PositionAndVelocity, propagate, EciVec3,degreesLong
} from 'satellite.js';fetch("data/points.json").then(res => res.json()).then(data => {for (const key in data) {if (Object.prototype.hasOwnProperty.call(data, key)) {const element = data[key];const satrec = twoline2satrec(element.data[0], element.data[1]);const positionAndVelocity: PositionAndVelocity = propagate(satrec, time);const positionEci = positionAndVelocity.position as EciVec3<number>;obj[key] = {country: element.country,times: [],positions: []};let lon, lat, alt;//一年365天 一天為間隔for (let index = min; index <= nowTime; index = index + 86400000) {const gmst = gstime(new Date(index));const positionGd = eciToGeodetic(positionEci, gmst)lon = positionGd.longitude,lat = positionGd.latitude,alt = positionGd.height;obj[key].times.push(index)obj[key].positions.push([degreesLong(lon), degreesLong(lat), alt])}}}})

加載衛(wèi)星和軌跡線

//用數(shù)據(jù)集方便管理
const satellites = new Cesium.CustomDataSource("satellite");
const polylines = new Cesium.CustomDataSource("statelliteLine");
function computeCirclularFlight(arr: Obj, hasLine: boolean = true) {for (const key in arr) {if (Object.prototype.hasOwnProperty.call(arr, key)) {const element = arr[key];const property = new Cesium.SampledPositionProperty();const length = element.positions.lengthconst positions: number[] = []let p, tfor (let index = 0; index < length; index++) {p = element.positions[index]t = element.times[index]property.addSample(Cesium.JulianDate.addHours(Cesium.JulianDate.fromDate(new Date(t)), 8, new Cesium.JulianDate()), Cesium.Cartesian3.fromDegrees(p[0], p[1], p[2]));positions.push(...element.positions[index])}satellites.entities.add({id: key,model: {uri: element.country === 'US' ? 'models/satellite/satellite1/Satellite.gltf': element.country === 'PRC' ? 'models/satellite/satellite2/10477_Satellite_v1_L3.gltf' : 'models/satellite/satellite3/satellite.gltf',minimumPixelSize: 32},position: property,});if (hasLine)polylines.entities.add({id: key,polyline: {width: 1,material: Cesium.Color.BLUE.withAlpha(.5),positions: Cesium.Cartesian3.fromDegreesArrayHeights(positions)}})}}viewer.dataSources.add(satellites);viewer.dataSources.add(polylines);
}

加載衛(wèi)星和軌跡的效果
在這里插入圖片描述

加載地面雷達

const radars = new Cesium.CustomDataSource("radar");
const radarpoints: {id: string;lon: number;lat: number;radius: number
}[] = [{ id: 'radar1', lon: 104, lat: 34, radius: 300000 },{ id: 'radar2', lon: -100, lat: 55, radius: 300000 },{ id: 'radar3', lon: 109.70841, lat: 19.365791, radius: 300000 },]//添加雷達radarpoints.forEach(i => {createRadar(i.id, i.lon, i.lat, i.radius)})function createRadar(id: string, lon: number, lat: number, radius: number) {radars.entities.add({id: id,model: {uri: 'models/antenna_07.glb',minimumPixelSize: 32,},position: Cesium.Cartesian3.fromDegrees(lon, lat),})viewer.dataSources.add(radars)new LCesiumApi.RadarPrimitive({radius: radius,stackPartitions: 10,slicePartitions: 10,stackDegrees: {x: 0,y: 90,},sliceDegrees: {x: 0,y: 360,},color: Cesium.Color.GREEN.withAlpha(0.2),lineColor: Cesium.Color.RED,scanColor: Cesium.Color.YELLOW.withAlpha(0.2),scanLineColor: Cesium.Color.RED,scene: viewer.scene,center: Cesium.Cartesian3.fromDegrees(lon, lat),scanSpeed: 5000,show: true,scan: true,});
}

在這里插入圖片描述

關(guān)于雷達效果在我之前文章里面有

衛(wèi)星與地面雷達通信

  • 暫時只做了m(雷達)-n(衛(wèi)星),m*n;沒有做衛(wèi)星之間的通信判斷,不過原理都是一樣的.
  • 網(wǎng)上搜索了一下通信距離一般是3,580km
  • 計算此時衛(wèi)星距雷達的距離,其實就是計算帶高度的經(jīng)緯度之間的距離
Cartesian3.distance(point1: Cartesian3, point2: Cartesian3)

當(dāng)衛(wèi)星和地面衛(wèi)星通信時,創(chuàng)建連線,離開設(shè)置為隱藏。

function computeRange() {satellites.entities.values.forEach(i => {radars.entities.values.forEach(j => {const po1 = i.position?.getValue(viewer.clock.currentTime)const po2 = j.position?.getValue(viewer.clock.currentTime)if (po1 && po2) {const len = LCesiumApi.Tool.getDistanceFromCartesian3(po1, po2)if (len <= communicationRange) {if (showFlyObject[`${i.id}-${j.id}`]) {showFlyObject[`${i.id}-${j.id}`].show = trueshowFlyObject[`${i.id}-${j.id}`].po1 = LCesiumApi.Tramsform.degreesFromCartesian(po1)showFlyObject[`${i.id}-${j.id}`].po2 = LCesiumApi.Tramsform.degreesFromCartesian(po2)}else {showFlyObject[`${i.id}-${j.id}`] = {entity: null,show: true,po1: LCesiumApi.Tramsform.degreesFromCartesian(po1),po2: LCesiumApi.Tramsform.degreesFromCartesian(po2)}}} else {if (showFlyObject[`${i.id}-${j.id}`]) showFlyObject[`${i.id}-${j.id}`].show = false}}})})setLine()
}
function setLine() {for (const key in showFlyObject) {if (Object.prototype.hasOwnProperty.call(showFlyObject, key)) {const element = showFlyObject[key];if (element.entity === null) element.entity = createFlyLine(key)element.entity.show = element.show}}
}
function createFlyLine(id: string) {var material = new PolylineTrailLinkMaterialProperty({color: Cesium.Color.fromCssColorString('#7ffeff'),duration: 3000,});const line = Connection.entities.add({id: id,polyline: {positions: new Cesium.CallbackProperty(() => {return Cesium.Cartesian3.fromDegreesArrayHeights([showFlyObject[id].po1.longitude,showFlyObject[id].po1.latitude,showFlyObject[id].po1.height,showFlyObject[id].po2.longitude,showFlyObject[id].po2.latitude,showFlyObject[id].po2.height,])}, false),width: 8,material}})return line
}

完整代碼

<template><Map @onViewerLoaded="onViewerLoaded" :options="options" />
</template>
<script lang="ts" setup>
import Map from "@/components/Cesium/lib/Map.vue";
import * as Cesium from "cesium";
import { message } from 'ant-design-vue'
import {twoline2satrec, gstime, eciToGeodetic,PositionAndVelocity, propagate, EciVec3,degreesLong
} from 'satellite.js';
import LCesiumApi from "@lib/main";
//@ts-ignore
import { PolylineTrailLinkMaterialProperty } from './PolylineTrailMaterialProperty.js'
const options = {imageryProvider: new Cesium.ArcGisMapServerImageryProvider({url: 'https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer'}),
}
let viewer: Cesium.Viewer
let start: Cesium.JulianDate
let stop: Cesium.JulianDate
let handler: Cesium.ScreenSpaceEventHandler;
const communicationRange = 3580000;
const time = new Date()
let max = time.getTime()
let year = 31622400000;
let min = max - year;
type Obj = {[index: string]: {country: string;times: number[];positions: [[number, number, number]] | number[][]}
}
const showFlyObject: {[index: string]: any
} = {}
let obj: Obj = {}
const radarpoints: {id: string;lon: number;lat: number;radius: number
}[] = [{ id: 'radar1', lon: 104, lat: 34, radius: 300000 },{ id: 'radar2', lon: -100, lat: 55, radius: 300000 },{ id: 'radar3', lon: 109.70841, lat: 19.365791, radius: 300000 },]
const onViewerLoaded = (Viewer: Cesium.Viewer) => {viewer = Viewerhandler = new Cesium.ScreenSpaceEventHandler(viewer.canvas);//設(shè)置時間軸setTimeline()//讀取衛(wèi)星分布兩行數(shù)據(jù)const nowTime = time.getTime()fetch("data/points.json").then(res => res.json()).then(data => {for (const key in data) {if (Object.prototype.hasOwnProperty.call(data, key)) {const element = data[key];const satrec = twoline2satrec(element.data[0], element.data[1]);const positionAndVelocity: PositionAndVelocity = propagate(satrec, time);const positionEci = positionAndVelocity.position as EciVec3<number>;obj[key] = {country: element.country,times: [],positions: []};let lon, lat, alt;//一年365天 一天為間隔for (let index = min; index <= nowTime; index = index + 86400000) {const gmst = gstime(new Date(index));const positionGd = eciToGeodetic(positionEci, gmst)lon = positionGd.longitude,lat = positionGd.latitude,alt = positionGd.height;obj[key].times.push(index)obj[key].positions.push([degreesLong(lon), degreesLong(lat), alt])}}}computeCirclularFlight(obj)})//添加點擊事件addPick()//添加雷達radarpoints.forEach(i => {createRadar(i.id, i.lon, i.lat, i.radius)})//添加過境掃描; (viewer as any).frameUpdate.addEventListener((delta: any) => {computeRange()});
}
function setTimeline() {start = Cesium.JulianDate.fromDate(new Date(min));  // 獲取當(dāng)前時間 這不是國內(nèi)的時間start = Cesium.JulianDate.addHours(start, 8, new Cesium.JulianDate());  // 添加八小時,得到我們東八區(qū)的北京時間stop = Cesium.JulianDate.fromDate(new Date(max));  // 設(shè)置一個結(jié)束時間,意思是360秒之后時間結(jié)束viewer.clock.startTime = start.clone();   // 給cesium時間軸設(shè)置開始的時間,也就是上邊的東八區(qū)時間viewer.clock.stopTime = stop.clone();     // 設(shè)置cesium時間軸設(shè)置結(jié)束的時間viewer.clock.currentTime = start.clone(); // 設(shè)置cesium時間軸設(shè)置當(dāng)前的時間viewer.clock.clockRange = Cesium.ClockRange.LOOP_STOP;  // 時間結(jié)束了,再繼續(xù)重復(fù)來一遍//時間變化來控制速度 // 時間速率,數(shù)字越大時間過的越快viewer.clock.multiplier = 1;//給時間線設(shè)置邊界viewer.timeline.zoomTo(start, stop);
}
const satellites = new Cesium.CustomDataSource("satellite");
const polylines = new Cesium.CustomDataSource("statelliteLine");
const radars = new Cesium.CustomDataSource("radar");
const Connection = new Cesium.CustomDataSource("connection");
function computeCirclularFlight(arr: Obj, hasLine: boolean = true) {for (const key in arr) {if (Object.prototype.hasOwnProperty.call(arr, key)) {const element = arr[key];const property = new Cesium.SampledPositionProperty();const length = element.positions.lengthconst positions: number[] = []let p, tfor (let index = 0; index < length; index++) {p = element.positions[index]t = element.times[index]property.addSample(Cesium.JulianDate.addHours(Cesium.JulianDate.fromDate(new Date(t)), 8, new Cesium.JulianDate()), Cesium.Cartesian3.fromDegrees(p[0], p[1], p[2]));positions.push(...element.positions[index])}satellites.entities.add({id: key,model: {uri: element.country === 'US' ? 'models/satellite/satellite1/Satellite.gltf': element.country === 'PRC' ? 'models/satellite/satellite2/10477_Satellite_v1_L3.gltf' : 'models/satellite/satellite3/satellite.gltf',minimumPixelSize: 32},position: property,});if (hasLine)polylines.entities.add({id: key,polyline: {width: 1,material: Cesium.Color.BLUE.withAlpha(.5),positions: Cesium.Cartesian3.fromDegreesArrayHeights(positions)}})}}viewer.dataSources.add(satellites);viewer.dataSources.add(polylines);viewer.dataSources.add(Connection)
}
const addPick = () => {handler.setInputAction((movement: any) => {const pickedObject = viewer.scene.pick(movement.position);if (Cesium.defined(pickedObject)) {message.info(pickedObject.id.id)}}, Cesium.ScreenSpaceEventType.LEFT_CLICK)
}
function createRadar(id: string, lon: number, lat: number, radius: number) {radars.entities.add({id: id,model: {uri: 'models/antenna_07.glb',minimumPixelSize: 32,},position: Cesium.Cartesian3.fromDegrees(lon, lat),})viewer.dataSources.add(radars)new LCesiumApi.RadarPrimitive({radius: radius,stackPartitions: 10,slicePartitions: 10,stackDegrees: {x: 0,y: 90,},sliceDegrees: {x: 0,y: 360,},color: Cesium.Color.GREEN.withAlpha(0.2),lineColor: Cesium.Color.RED,scanColor: Cesium.Color.YELLOW.withAlpha(0.2),scanLineColor: Cesium.Color.RED,scene: viewer.scene,center: Cesium.Cartesian3.fromDegrees(lon, lat),scanSpeed: 5000,show: true,scan: true,});
}
function computeRange() {satellites.entities.values.forEach(i => {radars.entities.values.forEach(j => {const po1 = i.position?.getValue(viewer.clock.currentTime)const po2 = j.position?.getValue(viewer.clock.currentTime)if (po1 && po2) {const len = LCesiumApi.Tool.getDistanceFromCartesian3(po1, po2)if (len <= communicationRange) {if (showFlyObject[`${i.id}-${j.id}`]) {showFlyObject[`${i.id}-${j.id}`].show = trueshowFlyObject[`${i.id}-${j.id}`].po1 = LCesiumApi.Tramsform.degreesFromCartesian(po1)showFlyObject[`${i.id}-${j.id}`].po2 = LCesiumApi.Tramsform.degreesFromCartesian(po2)}else {showFlyObject[`${i.id}-${j.id}`] = {entity: null,show: true,po1: LCesiumApi.Tramsform.degreesFromCartesian(po1),po2: LCesiumApi.Tramsform.degreesFromCartesian(po2)}}} else {if (showFlyObject[`${i.id}-${j.id}`]) showFlyObject[`${i.id}-${j.id}`].show = false}}})})setLine()
}
function setLine() {for (const key in showFlyObject) {if (Object.prototype.hasOwnProperty.call(showFlyObject, key)) {const element = showFlyObject[key];if (element.entity === null) element.entity = createFlyLine(key)element.entity.show = element.show}}
}
function createFlyLine(id: string) {var material = new PolylineTrailLinkMaterialProperty({color: Cesium.Color.fromCssColorString('#7ffeff'),duration: 3000,});const line = Connection.entities.add({id: id,polyline: {positions: new Cesium.CallbackProperty(() => {return Cesium.Cartesian3.fromDegreesArrayHeights([showFlyObject[id].po1.longitude,showFlyObject[id].po1.latitude,showFlyObject[id].po1.height,showFlyObject[id].po2.longitude,showFlyObject[id].po2.latitude,showFlyObject[id].po2.height,])}, false),width: 8,material}})return line
}
</script>
http://www.risenshineclean.com/news/55161.html

相關(guān)文章:

  • 網(wǎng)站建設(shè)的信息安全防范技術(shù)google國外入口
  • 南京做網(wǎng)站yuanmus2024小學(xué)生時事新聞十條
  • 做網(wǎng)站周記湖南seo網(wǎng)站開發(fā)
  • 學(xué)做網(wǎng)站網(wǎng)站統(tǒng)計器
  • 建立帶數(shù)據(jù)庫的網(wǎng)站關(guān)鍵詞排名網(wǎng)絡(luò)推廣
  • 東莞網(wǎng)站開發(fā)報價廣州網(wǎng)站排名優(yōu)化公司
  • 網(wǎng)站的開發(fā)平臺網(wǎng)頁點擊量統(tǒng)計
  • 藝術(shù)培訓(xùn)學(xué)校系統(tǒng)網(wǎng)站怎么做惠州企業(yè)網(wǎng)站建設(shè)
  • java做博客網(wǎng)站網(wǎng)站怎么添加外鏈
  • 網(wǎng)站詳情頁怎么做的競價關(guān)鍵詞優(yōu)化軟件
  • 房地產(chǎn)網(wǎng)站建設(shè)批發(fā)互聯(lián)網(wǎng)推廣工作好做嗎
  • 青島網(wǎng)站關(guān)鍵詞優(yōu)化公司競價外包托管費用
  • 手機版網(wǎng)站建設(shè)seo優(yōu)化的搜索排名影響因素主要有
  • 鄭州軟件公司排名荊州網(wǎng)站seo
  • 網(wǎng)站建設(shè)維護員是做什么的seo簡介
  • 網(wǎng)站建設(shè)定制開發(fā)價格廣告推廣渠道有哪些
  • wordpress修改郵件地址搜索引擎營銷優(yōu)化
  • 中國十大品牌網(wǎng)官網(wǎng)seo工具下載
  • 邯鄲網(wǎng)站建設(shè)效果注冊推廣賺錢一個80元
  • 備案不關(guān)閉網(wǎng)站的方法電腦版百度
  • 創(chuàng)意網(wǎng)站十大教育培訓(xùn)機構(gòu)排名
  • 用wordpress建仿站信陽百度推廣公司電話
  • 在萬網(wǎng)上域名了怎么做網(wǎng)站寧波網(wǎng)站推廣公司報價
  • wordpress仿站全套百度引擎搜索
  • 畢設(shè)做網(wǎng)站可能遇到的問題搜索引擎優(yōu)化涉及的內(nèi)容
  • 如何做產(chǎn)品網(wǎng)站網(wǎng)頁設(shè)計登封網(wǎng)站設(shè)計
  • 網(wǎng)站優(yōu)化內(nèi)鏈怎么做如何做網(wǎng)站推廣私人
  • 做的網(wǎng)站沒給我備案騰訊競價廣告
  • 醫(yī)藥招商網(wǎng)站大全北京百度關(guān)鍵詞推廣
  • 重慶那里做網(wǎng)站外包好推蛙網(wǎng)絡(luò)