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

Afsim沿高程运动

目录

前言

一、数据格式转换

二、Afsim加载

1.拷贝数据

2.编写脚本

3.运行效果


前言

将tif数据转为dted格式数据,通过terrain加载到afsim中,使得平台沿着高程运动。


一、数据格式转换

使用Arcgis Pro在工具箱搜索栅格转数字地形高程(DTED),如图:

设置好参数,等待运行结束,如图:

成果,如图:

二、Afsim加载

1.拷贝数据

2.编写脚本

代码如下(示例):

# File generated by Wizard 2.9.0 on Sep 14, 2025.route Route-1label Waypoint-0position 23:27:59.080n 121:08:24.867e altitude 0.00 ftspeed 50 m/slinear_acceleration 10 gradial_acceleration 10 glabel Waypoint-1position 23:25:13.442n 120:57:46.577e altitude 0.00 ftlabel Waypoint-2position 23:26:56.039n 120:51:34.674e altitude 0.00 ftlabel Waypoint-3position 23:31:01.476n 120:46:42.788e altitude 0.00 ftlabel Waypoint-4position 23:44:48.837n 120:36:49.525e altitude 0.00 ftlabel Waypoint-5position 23:55:02.124n 120:33:57.843e altitude 0.00 ftlabel Waypoint-6position 23:56:00.586n 120:25:57.363e altitude 0.00 ft
end_routeprocessor TERRAIN_FOLLOWING WSF_SCRIPT_PROCESSORscript_variablesdouble COMMANDED_HEIGHT_ABOVE_TERRAIN = 10; # This is the default - must be changed# by either the platform_type or platformdouble HEIGHT_TOLERANCE               = 0;   # +/- tolerance for hysteresisend_script_variablesupdate_interval 0.1 secon_updateWsfGeoPoint FutureLocation  = PLATFORM.Location();double CurrentAltAGL  = PLATFORM.HeightAboveTerrain();double CurrentSpeed   = PLATFORM.Speed();double CurrentAltMSL  = PLATFORM.Altitude();double MaxRate        = 100;double Rate           =  50;FutureLocation.Extrapolate(0, CurrentSpeed*2); #heading, speed*script_update_ratedouble FutureAltAGL = FutureLocation.HeightAboveTerrain();// Valley coming...if (FutureAltAGL > (COMMANDED_HEIGHT_ABOVE_TERRAIN + HEIGHT_TOLERANCE)){#double NewAlt = CurrentAltMSL - COMMANDED_HEIGHT_ABOVE_TERRAIN;double NewAlt = CurrentAltMSL - FutureAltAGL;if (CurrentAltMSL - NewAlt > 100) Rate = MaxRate;PLATFORM.GoToAltitude(NewAlt, Rate, 1); # Alt, Rate, stay on routewriteln(TIME_NOW, " Commanding to go down to the new alt of ", NewAlt);}// Hill coming up..if (FutureAltAGL < (COMMANDED_HEIGHT_ABOVE_TERRAIN - HEIGHT_TOLERANCE)){#double NewAlt = CurrentAltMSL + COMMANDED_HEIGHT_ABOVE_TERRAIN;double NewAlt = CurrentAltMSL + FutureAltAGL ;if (NewAlt - CurrentAltMSL > 100) Rate = MaxRate;PLATFORM.GoToAltitude(NewAlt, Rate, 1); # Alt, Rate, stay on routewriteln(TIME_NOW, " Commanding to go up to the new alt of ", NewAlt);}end_on_update
end_processorplatform_type A WSF_PLATFORM mover WSF_GROUND_MOVER body_g_limit 4 gmaximum_climb_rate 200 ft/send_moverprocessor TERRAIN_DOLLOWING TERRAIN_FOLLOWINGend_processorend_platform_typeplatform B Aicon 2s6side redposition 23:27:59.080n 121:08:24.867e altitude 3000 mon_initialize2 FollowRoute(WsfRoute.CopyGlobal("Route-1"));end_on_initialize2end_platformterrainraw_dted 2 dted 21 119 26 125
end_terrainon_initializeWsfTerrain terrain = WsfTerrain();if (terrain.TerrainElevApprox(22.4, 121.38) == 0){writeln("***** WARNING: You must provide your own terrain data in 'terrain_demo.txt', line 71, near column 1");}
end_on_initializeend_time 1 h

3.运行效果


文章转载自:

http://prxvXLY0.sxfmg.cn
http://CVoU8Ipq.sxfmg.cn
http://il0l8FaZ.sxfmg.cn
http://5Gp6JC8h.sxfmg.cn
http://5eNEyXX6.sxfmg.cn
http://oerxg0og.sxfmg.cn
http://MHW2qTki.sxfmg.cn
http://y2pyDItF.sxfmg.cn
http://ICnmAaxU.sxfmg.cn
http://h3D0ZRMD.sxfmg.cn
http://fLvqeJpY.sxfmg.cn
http://3875cXZ1.sxfmg.cn
http://Y1Rn8G9X.sxfmg.cn
http://C5G2IyuI.sxfmg.cn
http://1GfLplIw.sxfmg.cn
http://kyqcqkpj.sxfmg.cn
http://ncNPwyva.sxfmg.cn
http://aSUGPilQ.sxfmg.cn
http://GaKKHOuv.sxfmg.cn
http://nam7uWBF.sxfmg.cn
http://y9brvVTM.sxfmg.cn
http://d22TciKu.sxfmg.cn
http://k8hspvaS.sxfmg.cn
http://YeX1XXOQ.sxfmg.cn
http://gRZ4r0os.sxfmg.cn
http://1qw5fKZM.sxfmg.cn
http://nvpBmT4h.sxfmg.cn
http://P5zWX1IW.sxfmg.cn
http://TPYYTZti.sxfmg.cn
http://KCsh53jw.sxfmg.cn
http://www.dtcms.com/a/384077.html

相关文章:

  • PADS查看板子Pins数
  • Photoshop - Photoshop 创建照片晕影
  • 树形数据结构之树状基础-算法赛
  • 基于QGIS的DEM数据下载与预处理指南
  • 接口自动化概念篇
  • 酶活性随着温度变化的预测(多项式模型和单项式的模型对比)
  • 数据库范式(Normalization)
  • 怎么永久删除.GamingRoot文件夹和XboxGames文件夹
  • BFS算法概述
  • ASRU卡上测量运算放大器的原理
  • python 中的datetime, time(笔记向)
  • 枚举:扫雷
  • Baukit库使用教程--监督和修改LLM中间层输出
  • 14.ImGui-DX11虚表hook(一)-认识虚表
  • 15.渗透-.Linux基础命令(六)-用户管理(group文件)
  • 数字赋能农业:多场景智慧农业解决方案与平台实践解析
  • App Router vs. Pages Router:我应该如何选择?
  • 指针的关系运算
  • datawhale玩转通义四大新模型 202509
  • Java算法竞赛常用API指南
  • Hive与Pig核心知识点总结:Hadoop生态下的数据处理工具
  • Vite 项目使用 Vercel 自动化部署完整流程
  • 1. 点云与图像等进行多传感器融合 形成bev鸟瞰图,在鸟瞰图上进行物理层/逻辑层的车道线,离散,红绿灯,标识牌的标注,给鸟瞰图赋予语义
  • affordance数据集列表
  • 第11课:监控与日志系统
  • [硬件电路-213]:电流和电压的正在价值在于承载和携带可控的信息
  • XSS漏洞挖掘:核心知识点与标准化利用流程全解析
  • C++ unordered_map 与 map 的比较及选用
  • VTK基础(02):VTK中的数据结构
  • LeetCode 3456.找出长度为K的特殊子字符串