-
Notifications
You must be signed in to change notification settings - Fork 0
/
tdoa.proto
173 lines (148 loc) · 5.92 KB
/
tdoa.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
syntax = "proto3";
package zb.sensor.tdoa; //c++:对应于zb::sensor::tdoa命名空间
option java_multiple_files = true;
option java_package = "com.zb.sensor.tdoa";
option java_outer_classname = "TDOAProto";
import "sensor.proto"; //依赖sensor.proto的消息定义
import "google/protobuf/empty.proto";
//目标的信号特征(待定位的目标)
message TargetSignal {
double center_freq = 1; //中心频率,单位 Hz
double bandwidth = 2; //信号带宽,单位 Hz
double power = 3; //允许节点上传数据的最低电平要求,参与任务的节点设备在采集时,只有高于该值才会将采集的数据上传到中心
int32 attenuation_gain = 4; //采集该信号时的增益衰减,[-30, 20],对于小信号应是开启增益
int32 antenna = 5; //天线选择[0,1]
}
//选项
message TDOAOption{
bool enable_spectrum = 1; //频谱输出
bool enable_iq = 2; //iq输出
bool enable_coorelation = 3; //互相关结果输出
}
//tdoa任务参数
message TDOAParams {
repeated TargetSignal target_signals = 1; //要定位的目标
Timestamp sync_acquire_time = 2; //同步采集起始时刻
uint32 interval_msec = 3; //采集的时间间隔,单位 ms
TDOAOption option = 4;
}
message TDOAIndex{
uint32 position_idx = 1; //属于第几次定位
uint32 signal_idx = 2; //第几个信号
}
//启动tdoa任务请求
message StartTDOARequest{
repeated NodeDevice task_runner = 1; //参与任务的单元
TDOAParams task_parms = 2; //任务参数
}
message TDOAStatistic
{
int32 confidence = 1; //置信度[1-99],设为0将不使能统计
int32 sample_space_size = 2; //样本空间大小[10-1000]
int32 zone_outline_points = 3; //轮廓线的点数
}
//定位结果统计
message StatisticRequest{
TaskId task_id = 1;
TDOAStatistic statistic_parms = 2;
}
//水平的方位信息
message GeogCoord {
double ln = 1; //经度,单位 度
double lt = 2; //纬度,单位 度
}
//tdoa错误码
enum TDOAError {
TDOA_ERR_NONE = 0; //无错误
TDOA_ERR_LACK_QUALIFIED_BLOCK = 1; //缺少合格的数据块
TDOA_ERR_NO_QULIFIED_CORRELATE = 2; //无合格的互相关结果
TDOA_ERR_POSITION = 3; //定位算法无法求解
TDOA_ERR_QUESTIONABLE_POSITION = 4; //位置可疑(在置信椭圆之外)
}
//数据块摘要
message BlockBrief{
NodeDevice block_source = 1; //block的来源
GeogCoord acquire_position = 2; //位置
Timestamp acquire_time = 3; //时刻
bool uploaded_data = 4; //是否有数据
float peak_level = 5;
}
//两站的互相关
message Correlation{
NodeDevice block_source = 1; //block的来源
int64 time_offset = 2; //时间戳偏移, 单位 纳秒
double sensor_distance = 3; //两个传感器之间的距离,单位 米
double signal_arrival_difference = 4; //信号到达的距离差,单位 米(互相关解算的结果)
bool qualified = 5; //是否合格
}
//一个定位批次互相关信息
message BatchCorrelation{
NodeDevice ref_block = 1; //参考
repeated Correlation correlations = 2; //所有互相关的结果
}
//目标的定位信息
message RawTargetPosition{
enum ResolveMethod{
DIRECTION = 0; //双站测向
FAST_POSITION = 1; //快速定位
PRECISE_POSITION = 2; //精确定位
}
ResolveMethod mtd = 1; //解算方式
repeated GeogCoord target_position = 2; //目标位置,解的可能个数[0,2]
}
message ConfidenceZone{
int32 confidence = 1; //置信度
repeated GeogCoord zone_outline = 2; //置信椭圆的轮廓线
}
//tdoa过程数据(各种迹线)
message TDOATrace {
enum TraceType {
TDOA_SPECTRUM = 0; //频谱
TDOA_IQ = 1; //iq
TDOA_CORRELATE = 2; //相关线
}
TraceType type = 1; //迹线类型
repeated NodeDevice result_from = 2; //数据来源
repeated float trace_data = 3; //迹线数据
}
//TDOA任务产生的数据
message TDOAProduction{
TDOAIndex index = 1; //索引
TDOAError error_code = 2; //错误码
repeated BlockBrief block_brief = 3; //数据块摘要
repeated TDOATrace details = 4; //过程迹线(频谱、IQ、互相关)
BatchCorrelation correlation_info = 5; //互相关结果
RawTargetPosition raw_position = 6; //本次定位结果(原始数据)
ConfidenceZone located_zone = 7; //统计得到的坐落区域
}
//tdoa 数据传输状态
message SensorAcquireProgress{
NodeDevice sensor = 1; //节点设备id
TDOAIndex last_received = 2; //收到的最新索引
}
//tdoa任务的进展情况
message TDOAProgress{
repeated SensorAcquireProgress progress = 1;
}
//tdoa记录
message TDOARecord{
uint32 tid = 1; //定位任务id
int32 num_target = 2; //要定位的目标个数
int32 num_participant = 3; //参与定位的节点数量
uint32 start_time = 4; //定位发起的UTC秒值
TDOAParams task_param = 5; //任务参数
}
message TDOARecordList{
repeated TDOARecord record_list = 1;
}
//tdoa API
service TDOAService {
rpc Start(StartTDOARequest) returns (TaskAccount) {} //启动任务
rpc SetStatistic(StatisticRequest) returns(google.protobuf.Empty){} //设置统计参数
rpc GetProduction(TaskId) returns (stream TDOAProduction) {} //获取任务数据
rpc GetTaskProgress(TaskId) returns (TDOAProgress) {} //获取任务各节点的数据传输进度
rpc Stop(TaskId) returns (NodeReply) {} //停止任务
rpc ListAllRecord(google.protobuf.Empty) returns(TDOARecordList){} //获取TDOA的任务记录
rpc StartReplay(TaskId) returns(TaskAccount){} //启动回放
rpc StopReplay(TaskId) returns (google.protobuf.Empty) {} //停止回放
}