4G_module/custom/jt808/inc/jt808_electronic_fence.h

29 lines
1.1 KiB
C
Raw 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 JT808_ELECTRONIC_FENCE_H_
#define JT808_ELECTRONIC_FENCE_H_
#include "jt808_protocol.h"
#include "jt808_config.h"
#pragma pack(1)
typedef struct fence_Polygon_area_t{
uint32_t Area_ID; // 区域ID
uint16_t Area_att; // 区域属性
uint16_t Area_Points_Num; // 区域内点的数量
AreaPoint_t *Area_Points; // 区域内点的坐标集合
struct fence_Polygon_area_t *next; // 指向下一个区域
}fence_Polygon_area_t;
#pragma pack()
extern uint32_t Rsp_Bigscenic_Fence_Polygon_area_ID;
extern uint32_t Rsp_Bigban_Fence_Polygon_area_ID;
// 增加围栏区域(队尾增加) // Area_att == 0x0001 景区围栏Area_att == 0x0002 禁停区围栏
void jt808_add_tail_fence_Polygon_area(uint32_t area_id ,uint16_t Area_att, uint16_t Area_Points_Num, AreaPoint_t *big_Area_Points);
// 移除围栏区域(指定区域ID)
void jt808_remove_fence_Polygon_area(uint32_t area_id);
// 遍历围栏区域,判断指定坐标是否在围栏内
// 返回区域ID // 0 未在围栏内 // Area_att == 0x0001 景区围栏Area_att == 0x0002 禁停区围栏
uint32_t jt808_Polygon_fence_check(uint16_t Area_att, uint32_t lat, uint32_t lng);
#endif