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

网站宣传的重要性怎么自学互联网技术

网站宣传的重要性,怎么自学互联网技术,系统学做网站,手游推广平台哪个好机型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/663024/

相关文章:

  • 深圳最好的网站建设广西论坛网站建设
  • html5网站设计网站建设 广西
  • 顺德手机网站设计价位网站开发学习流程图
  • 班级网站设计合肥蜀山网站开发
  • 杭州网站建设培训ck播放器整合WordPress
  • 网站建设是什么软件品牌策划公司哪家好推荐
  • 网站转跳怎么做餐饮vi设计
  • 刘连康seo培训哪家强网站优化推广平台
  • 网站推广内容滁州做网站的
  • 黄山做网站公司山东省住房和城乡建设厅举报电话
  • 中医科网站建设素材上海文明城市建设网站
  • html课程教学网站模板手机微信小程序开发教程
  • 用电脑做兼职的网站比较好食品网站建设网站定制开发
  • 网站开发 加密保护小程序制作开发进度表
  • 深圳坪山站外贸展示型网站建设
  • 手机端自定义做链接网站济南网站制作方案
  • 软件网站是怎么做的帮别人做网站赚多少钱
  • 纯静态网站 搜索功能佛山网站建设 奇锐科技
  • 四川省建设厅官方网站联系电话自己网站做虚拟币违法吗
  • 同城招聘网站自助建站2014 网站建设
  • 个人网站空间大小江油官方网站建设
  • 怎样建网站做什么网站能吸引流量
  • 做vi设计的网站网络营销推广思路
  • 简述网站设计流程沁水做网站
  • 南京公司网站建设怎么收费获奖网页设计
  • 网站域名试用期水墨风格网站源码
  • 长沙网站开长沙手机网站建设哪些内容
  • 网站建设算固定资产吗做泵阀生意到哪个网站
  • 佛山网站建设定制杭州人防质监站网址
  • 什么网站可以做微官网定制小程序制作一个需要多少钱