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

商丘公司做网站/清远头条新闻

商丘公司做网站,清远头条新闻,自己制作网站的方法,网站备案 两个域名ArduPilot开源飞控之AP_InertialNav 1. 源由2. 调用关系3. 重要例程3.1 read_inertia3.2 update 4. 封装接口4.1 get_filter_status4.2 get_position_neu_cm4.3 get_position_xy_cm4.4 get_position_z_up_cm4.5 get_velocity_neu_cms4.6 get_velocity_xy_cms4.7 get_speed_xy_c…

ArduPilot开源飞控之AP_InertialNav

  • 1. 源由
  • 2. 调用关系
  • 3. 重要例程
    • 3.1 read_inertia
    • 3.2 update
  • 4. 封装接口
    • 4.1 get_filter_status
    • 4.2 get_position_neu_cm
    • 4.3 get_position_xy_cm
    • 4.4 get_position_z_up_cm
    • 4.5 get_velocity_neu_cms
    • 4.6 get_velocity_xy_cms
    • 4.7 get_speed_xy_cms
    • 4.8 get_velocity_z_up_cms
  • 5. 参考资料

1. 源由

AP_InternationalNav类是NavEKF的封装,提供关于导航相关的信息:

  1. 坐标位置
  2. 相对位置
  3. 运动速度
  4. 导航状态

2. 调用关系

状态更新函数调用嵌套关系。

FAST_TASK(read_inertia)└──> Copter::read_inertia└──> AP_InertialNav::update

3. 重要例程

3.1 read_inertia

  1. current_loc.lat
  2. current_loc.lng
  3. current_loc.alt
Copter::read_inertia││  // inertial altitude estimates. Use barometer climb rate during high vibrations├──> inertial_nav.update(vibration_check.high_vibes);││  // pull position from ahrs├──> Location loc;├──> ahrs.get_location(loc);├──> current_loc.lat = loc.lat;├──> current_loc.lng = loc.lng;││  // exit immediately if we do not have an altitude estimate├──> <!inertial_nav.get_filter_status().flags.vert_pos>│   └──> return;││  // current_loc.alt is alt-above-home, converted from inertial nav's alt-above-ekf-origin├──> const int32_t alt_above_origin_cm = inertial_nav.get_position_z_up_cm();├──> current_loc.set_alt_cm(alt_above_origin_cm, Location::AltFrame::ABOVE_ORIGIN);└──> <!ahrs.home_is_set() || !current_loc.change_alt_frame(Location::AltFrame::ABOVE_HOME)>│  // if home has not been set yet we treat alt-above-origin as alt-above-home└──> current_loc.set_alt_cm(alt_above_origin_cm, Location::AltFrame::ABOVE_HOME);

3.2 update

  1. _relpos_cm
  2. _velocity_cm
AP_InertialNav::update││  // get the NE position relative to the local earth frame origin├──> Vector2f posNE;├──> <_ahrs_ekf.get_relative_position_NE_origin(posNE)>│   ├──> _relpos_cm.x = posNE.x * 100; // convert from m to cm│   └──> _relpos_cm.y = posNE.y * 100; // convert from m to cm││  // get the D position relative to the local earth frame origin├──> float posD;├──> <_ahrs_ekf.get_relative_position_D_origin(posD)>│   └──> _relpos_cm.z = - posD * 100; // convert from m in NED to cm in NEU││  // get the velocity relative to the local earth frame├──> Vector3f velNED;└──> <_ahrs_ekf.get_velocity_NED(velNED)>│  // during high vibration events use vertical position change├──> <high_vibes>│   ├──> float rate_z;│   └──> <_ahrs_ekf.get_vert_pos_rate_D(rate_z)>│       └──> velNED.z = rate_z;├──> _velocity_cm = velNED * 100; // convert to cm/s└──> _velocity_cm.z = -_velocity_cm.z; // convert from NED to NEU

4. 封装接口

4.1 get_filter_status

/*** get_filter_status : returns filter status as a series of flags*/
nav_filter_status AP_InertialNav::get_filter_status() const
{nav_filter_status status;_ahrs_ekf.get_filter_status(status);return status;
}union nav_filter_status {struct {bool attitude           : 1; // 0 - true if attitude estimate is validbool horiz_vel          : 1; // 1 - true if horizontal velocity estimate is validbool vert_vel           : 1; // 2 - true if the vertical velocity estimate is validbool horiz_pos_rel      : 1; // 3 - true if the relative horizontal position estimate is validbool horiz_pos_abs      : 1; // 4 - true if the absolute horizontal position estimate is validbool vert_pos           : 1; // 5 - true if the vertical position estimate is validbool terrain_alt        : 1; // 6 - true if the terrain height estimate is validbool const_pos_mode     : 1; // 7 - true if we are in const position modebool pred_horiz_pos_rel : 1; // 8 - true if filter expects it can produce a good relative horizontal position estimate - used before takeoffbool pred_horiz_pos_abs : 1; // 9 - true if filter expects it can produce a good absolute horizontal position estimate - used before takeoffbool takeoff_detected   : 1; // 10 - true if optical flow takeoff has been detectedbool takeoff            : 1; // 11 - true if filter is compensating for baro errors during takeoffbool touchdown          : 1; // 12 - true if filter is compensating for baro errors during touchdownbool using_gps          : 1; // 13 - true if we are using GPS positionbool gps_glitching      : 1; // 14 - true if GPS glitching is affecting navigation accuracybool gps_quality_good   : 1; // 15 - true if we can use GPS for navigationbool initalized         : 1; // 16 - true if the EKF has ever been healthybool rejecting_airspeed : 1; // 17 - true if we are rejecting airspeed databool dead_reckoning     : 1; // 18 - true if we are dead reckoning (e.g. no position or velocity source)} flags;uint32_t value;
};

4.2 get_position_neu_cm

/*** get_position_neu_cm - returns the current position relative to the EKF origin in cm.** @return*/
const Vector3f &AP_InertialNav::get_position_neu_cm(void) const 
{return _relpos_cm;
}

4.3 get_position_xy_cm

/*** get_position_xy_cm - returns the current x-y position relative to the EKF origin in cm.** @return*/
const Vector2f &AP_InertialNav::get_position_xy_cm() const
{return _relpos_cm.xy();
}

4.4 get_position_z_up_cm

/*** get_position_z_up_cm - returns the current z position relative to the EKF origin, frame z-axis up, in cm.* @return*/
float AP_InertialNav::get_position_z_up_cm() const
{return _relpos_cm.z;
}

4.5 get_velocity_neu_cms

/*** get_velocity_neu_cms - returns the current velocity in cm/s** @return velocity vector:*      		.x : latitude  velocity in cm/s* 				.y : longitude velocity in cm/s* 				.z : vertical  velocity in cm/s*/
const Vector3f &AP_InertialNav::get_velocity_neu_cms() const
{return _velocity_cm;
}

4.6 get_velocity_xy_cms

/*** get_velocity_xy_cms - returns the current x-y velocity relative to the EKF origin in cm.** @return*/
const Vector2f &AP_InertialNav::get_velocity_xy_cms() const
{return _velocity_cm.xy();
}

4.7 get_speed_xy_cms

/*** get_speed_xy_cms - returns the current horizontal speed in cm/s** @returns the current horizontal speed in cm/s*/
float AP_InertialNav::get_speed_xy_cms() const
{return _velocity_cm.xy().length();
}

4.8 get_velocity_z_up_cms

/*** get_velocity_z_up_cms - returns the current z-axis velocity, frame z-axis up, in cm/s** @return z-axis velocity, frame z-axis up, in cm/s*/
float AP_InertialNav::get_velocity_z_up_cms() const
{return _velocity_cm.z;
}

5. 参考资料

【1】ArduPilot开源飞控系统之简单介绍
【2】ArduPilot之开源代码Task介绍
【3】ArduPilot飞控启动&运行过程简介
【4】ArduPilot之开源代码Library&Sketches设计
【5】ArduPilot之开源代码Sensor Drivers设计

相关文章:

ArduPilot开源飞控之AP_InertialNav

ArduPilot开源飞控之AP_InertialNav 1. 源由2. 调用关系3. 重要例程3.1 read_inertia3.2 update 4. 封装接口4.1 get_filter_status4.2 get_position_neu_cm4.3 get_position_xy_cm4.4 get_position_z_up_cm4.5 get_velocity_neu_cms4.6 get_velocity_xy_cms4.7 get_speed_xy_c…...

DataX工具部署与使用(PostgreSQL to Oracle)

目录&#xff1a; 一、准备环境&#xff08;1&#xff09;安装JDK&#xff08;2&#xff09;检查Python版本&#xff08;3&#xff09;DataX 解压及测试 二、同步测试1、配置清单2、操作示例&#xff08;1&#xff09;同步测试环境&#xff08;2&#xff09;准备测试表&#xf…...

【PyTorch2 之027】在 PyTorch 中的R-CNN、Fast R-CNN和 Faster R-CNN

一、说明 亮点&#xff1a;对象检测是计算机视觉中最重要的任务之一。在这篇文章中&#xff0c;我们将概述最有影响力的对象检测算法家族之一&#xff1a;R-CNN、Fast R-CNN 和 Faster R-CNN。我们将重点介绍它们中的每一个的主要新颖性和改进。 最后&#xff0c;我们将专注于 …...

C++学习——C++函数的编译、成员函数的调用、this指针详解

以下内容源于C语言中文网的学习与整理&#xff0c;非原创&#xff0c;如有侵权请告知删除。 从博文的分析中可以看出&#xff0c;对象的内存中只保留了成员变量&#xff0c;除此之外没有任何其他信息&#xff0c;程序运行时不知道 stu 的类型为 Student&#xff0c;也不知道它…...

Pulsar Manager和dashboard部署和启用认证

Pulsar Manager部署和启用认证 官方地址: https://pulsar.apache.org/docs/zh-CN/next/administration-pulsar-manager/ Pulsar Manager 是一个网页式可视化管理与监测工具&#xff0c;支持多环境下的动态配置。可用于管理和监测租户、命名空间、topic、订阅、broker、集群等…...

K8S环境搭建

K8S环境搭建 前置条件 部署3台VM&#xff0c;一台作为master,两台作为slave需要保障vm之间网络是互通的 为vm安装docker # 安装/更新 yum-utils yum install -y yum-utils#添加阿里镜像稳定版仓库 sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce…...

常用的软件项目管理工具一览

软件项目管理工具是帮助团队成功管理和完成软件开发项目的软件程序和应用程序。根据项目及其规模和复杂性&#xff0c;可以使用各种各样的这些工具来协助完成任务&#xff0c;从任务跟踪和调度&#xff0c;到项目报告&#xff0c;到版本控制和协作。 项目经理对软件项目的整体成…...

关于网络协议的若干问题(五)

1、DH 算法会因为传输随机数被破解吗&#xff1f; 答&#xff1a;DH 算法的交换材料要分公钥部分和私钥部分&#xff0c;公钥部分和其他非对称加密一样&#xff0c;都是可以传输的&#xff0c;所以对于安全性是没有影响的&#xff0c;而且传输材料远比传输原始的公钥更加安全。…...

TensorFlow入门(十七、神经元的拟合原理)

深度学习的概念源于人工神经网络的研究,神经网络是由多个神经元组成,。一个神经元由以下几个关键知识点组成: ①激活函数 ②损失函数 ③梯度下降 单个神经元的网络模型如图所示 用计算公式表达如下: z为输出的结果,x为输入,w为权重,b为偏置值。z…...

VSCODE配置C和C++

VSCode 运行 C/C 怎么配置&#xff1f; - 忆梦怀思的回答 - 知乎 https://www.zhihu.com/question/577315418/answer/3232537840 这个很好用&#xff0c;简单明白。 其中最后我的只配置了tasks.json就成功了。...

位于同一子网下的ip在子网掩码配置错误的情况下如何进行通信(wireshrak抓包分析)

前言 最近看书发现个问题&#xff0c;正好想学习下wireshark的使用&#xff0c;于是抓包做了下实验。 问题是这样的&#xff0c;假设有服务器A和服务器B&#xff0c;正确配置下两者处于同一子网&#xff1b;此时B的网络配置正确&#xff0c;而A在配置子网掩码时出了错&#xff…...

Dockerfile镜像实战

目录 1、构建SSH镜像 2、Systemctl镜像 3、nginx镜像 4、tomcat 镜像 5、mysql镜像 1、构建SSH镜像 cd /opt/sshd vim Dockerfile #第一行必须指明基于的基础镜像 FROM centos:7 #作者信息 MAINTAINER this is ssh image <hmj> #镜像的操作指令 RUN yum -y update R…...

企业如何选择安全又稳定的文件传输协议

企业无论是内部的数据共享&#xff0c;还是与外部的合作交流&#xff0c;都需要通过网络进行文件的传输和交换。然而&#xff0c;文件传输它涉及到多方面的因素&#xff0c;例如文件的大小、数量、类型、敏感性、传输距离、网络环境等。这些因素都会影响到文件传输的各个方面&a…...

Linux Kernel 4.13 RC6发布:正式版9月3日发布

美国当地时间上周末&#xff0c;大神Linus Torvalds发布了Linux Kernel 4.13内核的又一候选版本。上周发布的RC5版本更新幅度也要比上上周的RC4要小&#xff0c;Linus Torvalds表示本周发布的RC6版本属于常规更新&#xff0c;在过去一周的开发过程中并没有出现任何意外。RC6版本…...

C++学习——C++中const的新花样

以下内容源于C语言中文网的学习与整理&#xff0c;非原创&#xff0c;如有侵权请告知删除。 关于C语言中const的用法&#xff0c;见《C语言const的用法详解》。 一、C中const的新花样 在C语言中&#xff0c;const用来限制一个变量&#xff0c;表示这个变量不能被修改&#xf…...

【Linux环境搭建】五、Linux(CentOS7)编译源码安装Subversion

Subversion&#xff08;简称为SVN&#xff09;是一种版本控制系统&#xff0c;能够管理和跟踪项目开发中的代码变化。Subversion最初由CollabNet公司开发&#xff0c;现已成为Apache软件基金会的顶级项目之一。 Subversion使用一个中央仓库来存储所有项目文件和历史记录。开发人…...

微信小程序入门讲解【超详细】

一. 微信小程序简介 1.1 什么是小程序 2017年度百度百科十大热词之一 微信小程序&#xff08;wei xin xiao cheng xu&#xff09;&#xff0c;简称小程序&#xff0c;英文名Mini Program&#xff0c;是一种不需要下载安装即可使用的应用( 张小龙对其的定义是无需安装&#xf…...

AtCoder ABC239G 最小割集

题意 传送门 AtCoder ABC239G Builder Takahashi 题解 将原图中每个节点拆为入点 v v v 与出点 v ′ v v′&#xff0c;对于原图任一边 ( u , v ) (u,v) (u,v) 则 u ′ → v , v → u u\rightarrow v, v\rightarrow u u′→v,v→u 连一条容量为 ∞ \infty ∞ 的边&…...

Simple RPC - 01 框架原理及总体架构初探

文章目录 概述RPC 框架是怎么调用远程服务的&#xff1f;客户端侧的逻辑服务端侧的逻辑完整流程 客户端是如何找到服务端地址的呢&#xff1f;核心&#xff1a;NamingService跨语言的RPC实现原理 RPC 框架的总体结构对外接口服务注册中心如何使用业务服务接口客户端服务端 模块…...

VScode运行C/C++

VScode运行C/C VScode的安装这里不讲 一、mingw64的下载 二、VS code打开文件夹与创建C文件 ----------------这一步给萌新看&#xff0c;有C和VScode的基础可跳过---------------- 1.创建一个文件夹 2.vscode打开刚刚创建的文件夹 3.新建文件&#xff0c;在输入文件名1.c后…...

#智能车项目(三)串口初始化

串口1初始化 初始化串口1PA9 PA10 流程 1、声明结构体 GPIO_InitTypeDef GPIO_InitStructure; NVIC_InitTypeDef NVIC_InitStructure; USART_InitTypeDef USART_InitStructure; 2、打开时钟 // 打开串口GPIO的时钟 RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOA , ENABLE); /…...

网络通信错误代码列表 HTTP 、FTP

HTTP 1xx&#xff08;临时响应&#xff09;&#xff1a;表示临时响应并需要请求者继续执行操作的状态代码。 100 &#xff08;继续&#xff09; 请求者应当继续提出请求。服务器返回此代码表示已收到请求的第一部分&#xff0c;正在等待其余部分。 101 &#xff08;切换协议…...

最新开源ThinkPHP6框架云梦卡社区系统源码/亲测可用(全新开发)

源码简介&#xff1a; 最新开源ThinkPHP6云梦卡社区系统源码&#xff0c;它是一款基于ThinkPHP 6框架开发的开源社区系统源码。该系统源码具有强大而稳定的后端架构&#xff0c;和简洁易操作的前端界面&#xff0c;能够给人们提供完整的社区功能和更具体的服务。 全新云梦卡社…...

[ROS2系列] ubuntu 20.04测试rtabmap

目录 背景&#xff1a; 一、配置 turtlebot3 二、安装RTAB-Map ROS2包&#xff1a; 三、启动 Turtlebot3 模拟器&#xff1a; 四、启动 RTAB 地图&#xff1a; 五、启动导航&#xff08;nav2_bringup应安装软件包&#xff09;&#xff1a; 背景&#xff1a; 1、设备&…...

【Java学习之道】JavaFx 框架与组件介绍

引言 如果你曾经尝试过使用Java编写一个漂亮的窗口应用程序&#xff0c;那么你一定知道JavaFX这个强大的工具。JavaFX是Java 8中引入的一个GUI开发框架&#xff0c;它提供了丰富的组件和功能&#xff0c;使得我们可以轻松地创建出功能强大、界面美观的桌面应用程序。无论你是想…...

Windows bat 脚本设计-开机自启动服务的方法、bat 调用另外的 bat 脚本 -没有java环境也能运行jar,在不安装jdk下如何运行jar包

目录 一、start.bat 启动服务 bat 脚本代码设计 && 没有java环境也能运行jar&#xff0c;在不安装jdk下如何运行jar包二、关闭 bat 启动的服务三、Windows 开机自启动服务的方法四、bat 调用另外的 bat 脚本参考链接 一、start.bat 启动服务 bat 脚本代码设计 &&am…...

zabbix触发器与动作

一、触发器&#xff08;Trigger&#xff09; 1、概念&#xff1a; 在 Zabbix 中&#xff0c;触发器用于监测 Zabbix 监控系统中的各种指标和条件&#xff0c;并在特定条件满足时触发警报。&#xff08;触发器用于定义监控项的报警阈值&#xff09; 2、触发器对象&#xff1a…...

华纳云:Nginx服务器可视化配置问题怎么解决

Nginx服务器可视化配置问题通常是由于缺少适当的工具或配置导致的。要解决这些问题&#xff0c;您可以考虑以下几种方法&#xff1a; 使用Nginx配置管理工具&#xff1a; 有一些第三方工具可用于可视化配置Nginx服务器&#xff0c;以简化配置过程。其中一些工具包括cPanel、Ple…...

C指针与一维二维数组、数组指针与指针数组、函数指针_数组的理解使用

文章目录 一、指针数组 和 数组指针① 数组指针② 指针数组 二、函数指针与函数指针数组① 函数指针② 函数指针数组 三、指针与一维、二维数组① 指针与一维数组② 指针与二维数组 一、指针数组 和 数组指针 ① 数组指针 数组指针&#xff08;Array Pointer&#xff09;是指…...

安装运行vue-element-admin的报错问题-解决办法

文章目录 1.第一处2.第二处3.安装运行 在使用vue-element-admin时&#xff0c;使用命令安装&#xff1a; npm install -registryhttps://registry.npm.taobao.org会报错&#xff0c;不通过。需要修改两处。 1.第一处 在目录vue-element-admin-master\src\components\Markdown…...