OnLineTrajectoryKF
实时卡尔曼滤波类OnLineTrajectoryKF:
- 初始化
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
trajectory_df
|
DataFrame
|
轨迹数据 |
None
|
time_format
|
str
|
GPS轨迹数据中时间列的格式化字符串模板 |
'%Y-%m-%d %H:%M:%S'
|
time_unit
|
str
|
轨迹数据中时间列的时间单位 |
's'
|
x_field
|
str
|
轨迹数据表中表示经度的字段名称 |
'lng'
|
y_field
|
str
|
轨迹数据表中表示纬度的字段名称 |
'lat'
|
Source code in src/gotrackit/tools/kf.py
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 | |
OnLineTrajectoryKF类方法 - kf_smooth:
- 平滑:实时滤波平滑
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
p_deviation
|
list or float
|
过程噪声的标准差 |
0.01
|
o_deviation
|
list or float
|
观测噪声的标准差, 该值越小, 平滑后的结果就越接近原轨迹 |
0.1
|
time_gap_threshold
|
float
|
时间阈值,如果某agent的当前批GPS数据的最早定位时间和上批GPS数据的最晚定位时间的差值超过该值,则不参考历史概率链进行匹配计算 |
1800.0
|
Returns:
| Type | Description |
|---|---|
DataFrame or GeoDataFrame
|
平滑后的轨迹表 |
Source code in src/gotrackit/tools/kf.py
174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 | |
OnLineTrajectoryKF类方法 - renew_trajectory
- 更新数据:更新待处理的轨迹点数据
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
trajectory_df
|
DataFrame
|
轨迹数据 |
None
|
Returns:
| Type | Description |
|---|---|
|
None |
Source code in src/gotrackit/tools/kf.py
235 236 237 238 239 240 241 242 243 244 245 246 247 | |