0
0
Files
build/sensor/include/sensor_optical.h

54 lines
2.4 KiB
C
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef _SENSOR_OPTICAL_H_
#define _SENSOR_OPTICAL_H_
#include <stdint.h>
#define OPTIC_FRAME_LENGTH 60+164+4
typedef struct __attribute__((__packed__))
{
uint16_t FRAME_HEAD ; //帧头
uint8_t length;
float AI01; //远距离测距m精度0.1m
float AI02; //近距离测距(m)精度0.02m
int16_t AI03; //远距离摆镜水平角(角秒)
int16_t AI04; //近距离摆镜俯仰角(角秒)
uint8_t AI05; //远距离测距3.3V电源遥测
uint8_t AI06; //近距离测距5V电源遥测
uint16_t AI07; //远距离激光测量计数
uint16_t AI08; //近距离激光测量计数
uint8_t AI09; //接收指令计数
uint8_t AI10; //遥测计数
int32_t AI11; //遥测时间戳
uint16_t AI12; //远距离相机工作状态
int32_t AI13; //远距离相机曝光时间参数单位us
uint8_t AI14; //远距离相机增益设置参数
uint8_t AI15; //远距离相机输出图像帧计数
uint8_t AI16; //远距离相机3.3V电压遥测1
uint8_t AI17; //远距离相机5V电压遥测1
uint16_t AI18; //近距离相机工作状态
int32_t AI19; //近距离相机曝光时间参数单位us
uint8_t AI20; //近距离相机增益设置参数
uint8_t AI21; //近距离相机输出图像帧计数
uint8_t AI22; //近距离相机3.3V电压遥测
uint8_t AI23; //近距离相机5V电压遥测
uint8_t AI_far; //远距激光测量有效标志
uint8_t AI_close; //近距激光测量有效标志
uint8_t AI25; //图像处理3.3V电压遥测
uint8_t AI26; //图像处理5V电压遥测
int32_t AI27; //综合控制板工作状态
uint8_t AI28; //综合控制板3.3V电压遥测
uint8_t AI29; //综合控制板5V电压遥测
uint32_t AI_time_s;
uint16_t AI_time_ms;
uint8_t resvd[164];
uint8_t Check_sum; //校验和
} OPTICAL_TLM_STR; //OPTICAL遥测数据包
void generate_xgd_frame(uint8_t *frame, double TarRVECI[6], double ChaRVECI[6], double MtxECI2VVLH[3][3], double MtxVVLH2Body[3][3], double LOS_Remote[9], double Euler[3], double R_Plane[2], int TargetFLAG);
void generate_photo_frame(uint8_t *frame);
#endif