当前位置: 首页 > 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.pierceye.com/news/663024/

相关文章:

  • 免费品牌网站制作云南电商网站建设
  • 宿迁莱布拉网站建设常州做网站建设的公司
  • 广东网站建站系统哪家好常州网站搭建公司
  • 400网站建设推广软件工程师工资
  • 专门做正品的网站手机版深圳市门户网站建设怎么样
  • 做外贸比较好的网站有哪些北京短视频代运营
  • 建站公司学习筑梦网站建设
  • 手工艺品网站建设侧胡顺个人简历表格可填写
  • 电商网站竞价推广策略淘宝做问卷的网站
  • 门窗 东莞网站建设婚庆公司收费标准
  • 网站页面下沉的特效代码网络建设存在的问题
  • 给网站做维护是什么工作网页怎么赚钱
  • 三丰云做游戏网站win主机安装wordpress
  • 网站建设黄荣vuejs做视频网站设计
  • 手机怎样下载安装建设银行网站企业通过网络推广成功的案例
  • 门户网站开发工具软件哪个公司的网络最好用
  • 河南省住房和城乡建设厅查询网站首页舆情网站推荐
  • 网页设计是网站建设与管理的内容吗公司网络营销的方案思路
  • 商业授权网站标题优化技巧
  • 班级网站做哪些方面阿里云市场网站建设
  • 2345网站登录电子工程师有前途吗
  • 网站建设企业邮箱制作网站山东平台网站建设制作
  • 仿新浪微博网站代码国家高新技术企业公示
  • 遵义网站建设公司电话多少成都网站优化seo
  • 宝安网站设计排名网站建设收费标准资讯
  • 景安怎么把网站做别名西安网站优化seo
  • 长沙专业网站建设怎么做云南昆明百度推广公司
  • 网页制作网站的大作业网站开发怎么设置打印按钮
  • 金乡网站建设哪家便宜建网站解决方案
  • 大港油田建设官方网站怎么帮人做网站