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

国内室内设计优化是什么意思?

国内室内设计,优化是什么意思?,jsp网站制作详细教程,霞山网站建设公司机型M350RTK#xff0c;其飞行记录文件为加密的#xff0c;我的完善代码如下 gitgithub.com:huashu996/DJFlightRecordParsing2TXT.git 一、下载安装官方的DJIFlightRecord git clone gitgithub.com:dji-sdk/FlightRecordParsingLib.git飞行记录文件在打开【我的电脑】其飞行记录文件为加密的我的完善代码如下 gitgithub.com:huashu996/DJFlightRecordParsing2TXT.git 一、下载安装官方的DJIFlightRecord git clone gitgithub.com:dji-sdk/FlightRecordParsingLib.git飞行记录文件在打开【我的电脑】进入遥控器内存 文件路径此电脑 pm430 内部共享存储空间 DJI com.dji.industry.pilot FlightRecord  二、注册成为大疆开发者获取SDK 密钥 网址如下DJI Developer 注册完之后新建APP获得密钥 登录 DJI 开发者平台点击创建应用App Type 选择 Open API自行填写“App 名称”“分类”和“描述”点击 创建。 通过个人邮箱激活 App在开发者网平台个人点击查看对应 App 信息其中 App Key 即为下文所需的 SDK 密钥参数。  三、编译运行 编译  cd FlightRecordParsingLib-master/dji-flightrecord-kit/build/Ubuntu/FlightRecordStandardizationCpp sh generate.sh 运行 cd ~/FlightRecordParsingLib-master/dji-flightrecord-kit/build/Ubuntu/FRSample export SDK_KEYyour_sdk_key_value ./FRSample /home/cxl/FlightRecordParsingLib-master/DJrecord/DJIFlightRecord_2023-07-18_[16-14-57].txt 此时会在终端打印出一系列无人机的状态信息但还是不能够使用 于是我更改了main.cc文件使它能够保存数据到txt文件 四、获取单个数据 上一步生成的txt文件由于参数众多是巨大的这里我写了一个py文件用于提取重要的信息例如提取经纬度和高度 import json# Read JSON fragment from txt file with open(output.txt, r) as file:json_data json.load(file)# Extract all aircraftLocation and altitude data location_altitude_data [] for frame_state in json_data[info][frameTimeStates]:aircraft_location frame_state[flightControllerState][aircraftLocation]altitude frame_state[flightControllerState][altitude]location_altitude_data.append({latitude: aircraft_location[latitude], longitude: aircraft_location[longitude], altitude: altitude})# Write values to a new txt file with open(xyz_output.txt, w) as f:for data in location_altitude_data:f.write(flatitude: {data[latitude]}, longitude: {data[longitude]}, altitude: {data[altitude]}\n)print(Values extracted and written to output.txt file.) 就能够生成只有这几个参数的txt文件  五、生成轨迹 将经纬度和高度生成xyz坐标和画图暂定以前20个点的均值作为投影坐标系的原点 from pyproj import Proj import matplotlib.pyplot as plt import mpl_toolkits.mplot3d as mplot3d def read_coordinates_from_txt(file_path):coordinates []with open(file_path, r) as file:for line in file:parts line.strip().split(,)latitude float(parts[0].split(:)[1].strip())longitude float(parts[1].split(:)[1].strip())altitude float(parts[2].split(:)[1].strip())coordinates.append((latitude, longitude, altitude))return coordinatesdef calculate_avg_coordinates(coordinates):num_points len(coordinates)avg_latitude sum(coord[0] for coord in coordinates) / num_pointsavg_longitude sum(coord[1] for coord in coordinates) / num_pointsreturn avg_latitude, avg_longitudedef project_coordinates_to_xyz(coordinates, avg_latitude, avg_longitude, origin_x, origin_y):# Define the projection coordinate system (UTM zone 10, WGS84 ellipsoid)p Proj(projutm, zone20, ellpsWGS84, preserve_unitsFalse)# Project all points in the coordinates list to xy coordinate systemprojected_coordinates [p(longitude, latitude) for latitude, longitude, _ in coordinates]# Calculate the relative xyz values for each point with respect to the originrelative_xyz_coordinates []for (x, y), (_, _, altitude) in zip(projected_coordinates, coordinates):relative_x x - origin_xrelative_y y - origin_yrelative_xyz_coordinates.append((relative_x, relative_y, altitude))return relative_xyz_coordinatesdef three_plot_coordinates(coordinates):# Separate the x, y, z coordinates for plottingx_values, y_values, z_values zip(*coordinates)# Create a new figure for the 3D plotfig plt.figure()ax fig.add_subplot(111, projection3d)# Plot points as a 3D scatter plotax.scatter(x_values, y_values, z_values, cblue, labelPoints)# Connect points with linesfor i in range(1, len(x_values)):ax.plot([x_values[i - 1], x_values[i]], [y_values[i - 1], y_values[i]], [z_values[i - 1], z_values[i]], k-, linewidth0.5)# Add labels and titleax.set_xlabel(X (meters))ax.set_ylabel(Y (meters))ax.set_zlabel(Z (meters))ax.set_title(Projected Coordinates - 3D)# Display the 3D plot in a separate windowplt.show()def two_plot_coordinates(coordinates):# Separate the x, y, z coordinates for plottingx_values, y_values, z_values zip(*coordinates)# Create a new figure for the 2D plotfig plt.figure()# Plot pointsplt.scatter(x_values, y_values, cblue, labelPoints)# Connect points with linesfor i in range(1, len(x_values)):plt.plot([x_values[i - 1], x_values[i]], [y_values[i - 1], y_values[i]], k-, linewidth0.5)# Add labels and titleplt.xlabel(X (meters))plt.ylabel(Y (meters))plt.title(Projected Coordinates - 2D)plt.legend()# Display the 2D plot in a separate windowplt.show()if __name__ __main__:input_file_path xyz_output.txt # Replace with the actual input file pathcoordinates read_coordinates_from_txt(input_file_path)# Use the first 10 points to define the projection coordinate systemnum_points_for_avg 20avg_coordinates coordinates[:num_points_for_avg]avg_latitude, avg_longitude calculate_avg_coordinates(avg_coordinates)# Project the average latitude and longitude to xy coordinate systemp Proj(projutm, zone20, ellpsWGS84, preserve_unitsFalse)origin_x, origin_y p(avg_longitude, avg_latitude)print(fAverage Latitude: {avg_latitude}, Average Longitude: {avg_longitude})print(fProjected Coordinates (x, y): {origin_x}, {origin_y})# Project all points in the coordinates list to xy coordinate systemfirst_coordinates [(0, 0, 0)] * min(len(coordinates), num_points_for_avg)projected_coordinates2 project_coordinates_to_xyz(coordinates[num_points_for_avg:], avg_latitude, avg_longitude, origin_x, origin_y)projected_coordinates first_coordinatesprojected_coordinates2# Save projected coordinates to a new text fileoutput_file_path projected_coordinates.txtwith open(output_file_path, w) as output_file:for x, y, z in projected_coordinates:output_file.write(fx: {x}, y: {y}, z: {z}\n)three_plot_coordinates(projected_coordinates)two_plot_coordinates(projected_coordinates)生成xyz的txt文档  上述只以坐标为例子想获取其他数据改变参数即可。
http://www.zqtcl.cn/news/911955/

相关文章:

  • 什么网站时候做伪静态开发软件定制
  • 找人做网站 多少钱西宁市公司网站建设
  • 网页设计 教程网站找权重高的网站方法
  • 网站建设本地还是外地重庆seo排名方法
  • 那个网站做网编好昨晚兰州发生了什么事
  • 温州建设局网站首页哪里可以学做资料员的网站
  • 网站怎样在360做优化wordpress文章图片在线裁剪
  • 彭州建设网站建设网站哪间公司比较好
  • qq空间网站根目录慧聪网首页
  • 制作小程序和网站的公司杭州品牌设计公司
  • 显示网站翻页代码wordpress 金融 模板下载
  • 用双语网站做seo会不会phpmysql网站
  • 长沙专业网站建设公司优惠券怎么做自己的网站
  • 做网站如何宣传怎么弄公众号
  • seo网站策划书网站建设资金投入
  • 做网站东莞东莞建网站wordpress 多文件上传
  • 公司注册流程聊城网站优化案例
  • 化妆品网站建设实施方案杭州seo代理公司
  • 网站小图片素材高质量外链
  • 福州个人建站模板有没有一些有试卷做的网站
  • 教你如何建设网站阿里去旺道seo优化
  • 想做一个个人网站怎么做网站组成部分
  • 旅游门户网站模板下载全国最新产品代理商
  • 老河口网站设计中企动力科技做什么的
  • 如何建立网站管理系统甘孜州住房和城乡规划建设局网站
  • 阿里网站建设新闻门户网站什么意思
  • 桂林微信网站wordpress 连接信息
  • 电商网站开发简历跨境电商怎么搞
  • php小型网站开发百度知道小程序
  • 风铃网站具体是做那方面的contact form7 v2.1.2 wordpress