【类 型】:feat mavlink库底层函数 修改(此版本有bug 为解决)
【原 因】:封装取 home点的相关定义 打包 解包函数等 【过 程】: 【影 响】:
This commit is contained in:
parent
b4b175b316
commit
2814793479
38
lib/mavlink/common/mavlink_msg_homeposion.h
Normal file
38
lib/mavlink/common/mavlink_msg_homeposion.h
Normal file
@ -0,0 +1,38 @@
|
||||
#define MAVLINK_MSG_ID_HOME_POSITION 242
|
||||
|
||||
typedef struct __mavlink_home_position_t
|
||||
{
|
||||
int32_t latitude; // Latitude (WGS84), in degrees * 1E7
|
||||
int32_t longitude; // Longitude (WGS84), in degrees * 1E7
|
||||
int32_t altitude; // Altitude (MSL), in meters * 1000
|
||||
float x; // Local X position in the local coordinate frame (NED)
|
||||
float y; // Local Y position in the local coordinate frame (NED)
|
||||
float z; // Local Z position in the local coordinate frame (NED, positive down)
|
||||
float q[4]; // Quaternion
|
||||
float approach_x; // Local X position of the end of the approach vector
|
||||
float approach_y; // Local Y position of the end of the approach vector
|
||||
float approach_z; // Local Z position of the end of the approach vector
|
||||
uint64_t time_usec; // Timestamp
|
||||
} mavlink_home_position_t;
|
||||
|
||||
#define MAVLINK_MSG_ID_HOME_POSITION_LEN 44
|
||||
#define MAVLINK_MSG_ID_242_LEN 44
|
||||
|
||||
#define MAVLINK_MESSAGE_INFO_HOME_POSITION \
|
||||
{ \
|
||||
"HOME_POSITION", \
|
||||
10, \
|
||||
{ \
|
||||
{"latitude", NULL, MAVLINK_TYPE_INT32_T, 0, 0, offsetof(mavlink_home_position_t, latitude)}, \
|
||||
{"longitude", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_home_position_t, longitude)}, \
|
||||
{"altitude", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_home_position_t, altitude)}, \
|
||||
{"x", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_home_position_t, x)}, \
|
||||
{"y", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_home_position_t, y)}, \
|
||||
{"z", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_home_position_t, z)}, \
|
||||
{"q", NULL, MAVLINK_TYPE_FLOAT, 4, 24, offsetof(mavlink_home_position_t, q)}, \
|
||||
{"approach_x", NULL, MAVLINK_TYPE_FLOAT, 0, 40, offsetof(mavlink_home_position_t, approach_x)}, \
|
||||
{"approach_y", NULL, MAVLINK_TYPE_FLOAT, 0, 44, offsetof(mavlink_home_position_t, approach_y)}, \
|
||||
{"approach_z", NULL, MAVLINK_TYPE_FLOAT, 0, 48, offsetof(mavlink_home_position_t, approach_z)}, \
|
||||
{"time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 52, offsetof(mavlink_home_position_t, time_usec)}, \
|
||||
} \
|
||||
}
|
Loading…
Reference in New Issue
Block a user