140 lines
7.0 KiB
Protocol Buffer
140 lines
7.0 KiB
Protocol Buffer
|
|
syntax = "proto3";
|
|||
|
|
|
|||
|
|
package xlsyn;
|
|||
|
|
option java_package = "com.xinglusyn.proto";
|
|||
|
|
import "traj.proto";
|
|||
|
|
|
|||
|
|
// 每个GPS点经过预处理后的标记分类
|
|||
|
|
enum gps_status_t {
|
|||
|
|
GpsStatus_Normal = 0; // 正常点
|
|||
|
|
GpsStatus_JumpPoint = 1; // 跳点
|
|||
|
|
GpsStatus_StayPoint = 2; // 停驻点
|
|||
|
|
GpsStatus_DriftPoint = 3; // 漂移点
|
|||
|
|
GpsStatus_MessyPoint = 4; // 散乱点
|
|||
|
|
GpsStatus_ZigzagPoint = 5; // ZigZag点
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// 整条轨迹经过预处理后的标记分类
|
|||
|
|
enum traj_status_t {
|
|||
|
|
TrajStatus_OK = 0; // 正常轨迹
|
|||
|
|
TrajStatus_FewPoints = 1; // 点数过少
|
|||
|
|
TrajStatus_MessyTraj = 2; // 散乱轨迹
|
|||
|
|
TrajStatus_StayTraj = 4; // 停驻轨迹
|
|||
|
|
TrajStatus_ShortTraj = 8; // 过短轨迹
|
|||
|
|
TrajStatus_DriftTraj = 16; // 漂移轨迹
|
|||
|
|
TrajStatus_ZigzagTraj = 32; // ZigZag轨迹
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// 每个GPS点的匹配状态
|
|||
|
|
enum gps_matcher_status_t {
|
|||
|
|
UNMATCHED = 0; // 未匹配
|
|||
|
|
MATCH_SUCC = 1; // 成功匹配
|
|||
|
|
TIMESTAMP_ERROR = 2; // 时间戳异常
|
|||
|
|
ADSORB_ERROR = 3; // 吸附错误
|
|||
|
|
ROUTE_ERROR = 4; // 规划算路错误
|
|||
|
|
CAPACITY_ERROR = 5; // 超出容量限制
|
|||
|
|
MATCH_1_POINT = 6; // 匹配到前一个点
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// 匹配到的link信息(带方向)
|
|||
|
|
message rtt_seg_t {
|
|||
|
|
uint64 link_id = 1; // 不含方向的linkid
|
|||
|
|
bool link_dir = 2; // 0顺向,1逆向
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// 【暂未使用】gps_spot其他可能的匹配link信息
|
|||
|
|
message rtt_gps_extra_match_info_t {
|
|||
|
|
rtt_seg_t seg = 1;
|
|||
|
|
int32 seg_offset = 2;
|
|||
|
|
int32 forwared_offset = 3;
|
|||
|
|
int32 rightward_offset = 4;
|
|||
|
|
int32 clockwise_offset = 5;
|
|||
|
|
int32 prev_match_index = 6;
|
|||
|
|
int32 path_length = 7;
|
|||
|
|
int32 proirity = 8;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// 【暂未使用】gps点携带的车道信息
|
|||
|
|
message rtt_gps_lane_info_t {
|
|||
|
|
uint64 timestamp = 1; // 高精定位时间戳,单位ms
|
|||
|
|
int64 lon = 2; // 高精定位的经度坐标,原始经度浮点数 * 10的7次方
|
|||
|
|
int64 lat = 3; // 高精定位的纬度坐标,原始纬度浮点数 * 10的7次方
|
|||
|
|
int32 course = 4; // 高精定位朝向角
|
|||
|
|
uint32 cur_lane_num = 5; // 车道序号,表示从内侧到外侧的车道序号,例如:1表示最内侧车道(或者路肩)
|
|||
|
|
uint32 tile_id = 6; // 吸附车道的tileID,高32位
|
|||
|
|
uint32 lane_id = 7; // 吸附车道的laneID,低32位
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// 单个gps点的匹配信息
|
|||
|
|
message rtt_gps_spot_t {
|
|||
|
|
uint32 timestamp = 1; // gps设备时间戳,unix秒格式
|
|||
|
|
uint32 lon = 2; // 轨迹点原始经度*10的7次方
|
|||
|
|
uint32 lat = 3; // 轨迹点原始纬度*10的7次方
|
|||
|
|
uint32 dir = 4; // 轨迹点的方向,(0, 360], default 0
|
|||
|
|
uint32 speed = 5; // 轨迹点的速度,(0,255] km/h, default 0
|
|||
|
|
uint32 gps_acc = 6; // gps定位精度,单位米
|
|||
|
|
int32 altitude = 7; // gps定位高程,单位mm
|
|||
|
|
int32 ms = 8; // ms part of timestamp if exists
|
|||
|
|
xlsyn.load_status_t load_status = 9; // 车辆状态
|
|||
|
|
xlsyn.vehicle_event_t vehicle_event = 10; // 车辆载客事件
|
|||
|
|
xlsyn.order_status_t order_status = 11; // 网约车订单状态分类
|
|||
|
|
//以上是基础属性
|
|||
|
|
//以下mapmatch后的可选字段
|
|||
|
|
uint32 xf_timestamp = 12; // gps点的匹配时间戳,unix秒格式
|
|||
|
|
int32 xf_ms = 13; // gps点的匹配时间戳的毫秒,用于精细化区分gps的匹配时间
|
|||
|
|
rtt_seg_t seg_info = 14; // 匹配到的link信息
|
|||
|
|
int32 seg_offset = 15; // 轨迹坐标离link_id起始点的距离(cm)
|
|||
|
|
int32 reliability = 16; // 匹配结果的可靠度,区间为[0,100],越大越可靠。仅考虑相对概率,不考虑路网基础数据不完备的影响。
|
|||
|
|
int32 forward_offset = 17; // gps在link切向投影相对匹配处的提前量(cm)
|
|||
|
|
int32 rightward_offset = 18; // gps在link法向投影的右向偏移(cm)
|
|||
|
|
int32 clockwise_offset = 19; // 角度偏差[-180,180]
|
|||
|
|
int32 path_length = 20; // 匹配后道路里程(cm)
|
|||
|
|
int32 dist_similarity = 21; // 距离相似指标,区间为[0,100]
|
|||
|
|
int32 dir_similarity = 22; // 方向相似指标,区间为[0,100]
|
|||
|
|
repeated rtt_seg_t mid_matches = 23; // 与后一个gps点存在跨link匹配结果时,保存中间经过的路径信息, 不包含已有的起终点
|
|||
|
|
gps_matcher_status_t match_status = 24; // gps点的匹配状态
|
|||
|
|
gps_status_t gps_status = 25; // 每个GPS点经过预处理后的标记分类
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// 【在线/离线匹配使用】单条轨迹匹配后的原始结构体
|
|||
|
|
message rtt_gps_spot_bucket_t {
|
|||
|
|
uint64 device_id = 1; // 设备唯一标识, 64bits, md5 hash if exceed
|
|||
|
|
xlsyn.gps_source_t gps_src = 2; // 轨迹渠道
|
|||
|
|
xlsyn.travel_type_t travel_type = 3; // 车辆类型
|
|||
|
|
uint32 traj_status = 4; // 整条轨迹经过预处理后的标记分类
|
|||
|
|
repeated rtt_gps_spot_t gpss = 5; // 单个gps点的匹配信息
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// 【在线/离线匹配使用】按照link聚合后的匹配信息
|
|||
|
|
message rtt_seg_gpss_t {
|
|||
|
|
rtt_seg_t seg_info = 1; // 匹配到的link信息
|
|||
|
|
repeated rtt_gps_spot_t gpss = 2; // 匹配到该link的gps点信息
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// 【在线/离线匹配使用】按照link串重新整理后的轨迹匹配结果
|
|||
|
|
message rtt_traj_match_t {
|
|||
|
|
uint64 device_id = 1; // 设备唯一标识, 64bits, md5 hash if exceed
|
|||
|
|
xlsyn.gps_source_t gps_src = 2; // 轨迹渠道
|
|||
|
|
xlsyn.travel_type_t travel_type = 3; // 车辆类型
|
|||
|
|
uint32 traj_status = 4; // 整条轨迹经过预处理后的标记分类
|
|||
|
|
repeated rtt_seg_gpss_t match_links = 5;// 按照link聚合后的匹配信息
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// 【流式实时匹配使用】gps点对的匹配结果
|
|||
|
|
message rtt_gps_t {
|
|||
|
|
uint64 device_id = 1; // 出租车id 或者用户id
|
|||
|
|
xlsyn.gps_source_t gps_src = 2; // 轨迹渠道
|
|||
|
|
xlsyn.travel_type_t travel_type = 3; // 车辆类型
|
|||
|
|
uint32 city_id = 4; // 城市的area_id , 由吸附模块赋值
|
|||
|
|
rtt_gps_spot_t gps = 5; // 轨迹的起点(gps点对存在跨link匹配结果时,中间经过的路径信息保存在gps.mid_matches中)
|
|||
|
|
rtt_gps_spot_t gps_end = 6; // 轨迹的终点
|
|||
|
|
gps_matcher_status_t match_status = 7; // gps点对的匹配状态
|
|||
|
|
uint32 stand_still_timestamp = 8; // 开始异常停车的时间戳
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// 【流式实时匹配使用】gps列表,所有dispatcher存的格式
|
|||
|
|
message rtt_gps_bucket_t {
|
|||
|
|
repeated rtt_gps_t gps_bucket = 1;
|
|||
|
|
bytes info = 2;
|
|||
|
|
}
|