-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
speed is always 0 #229
Comments
你的数据包含很多的静止点,移动距离为0,所以速度为0. |
感谢,但是前面几组数据似乎速度不应该为0,我在尝试运行更多数据集,看看速度是否为0,可以请问下速度的单位是什么吗? |
我更换了数据集,但是速度依然全部为0,@cyang-kth |
可能是精度的原因,可以试试输出spdist来看看结果,可能是临近的点都匹配到端点上了,建议你需要对gps可视化看一下具体位置。 |
以下是计算的速度 import pandas as pd import transbigdata as tbd # 读入GPS数据
data=pd.read_csv('./part_data.csv',sep=';') data.tail(4)
# 创建新的df,用于错位存储经纬度
pointPair=pd.DataFrame() pointPair['Lng1']=data.iloc[:-1,1:2]
pointPair['Lat1']=data.iloc[:-1,2:3]
pointPair['Lng2']=data.iloc[1:,1:2].reset_index(drop=True)
pointPair['Lat2']=data.iloc[1:,2:3].reset_index(drop=True) pointPair.head(4)
# 求两点之间的距离
pointPair['Dis']=tbd.getdistance(pointPair['Lng1'],pointPair['Lat1'],pointPair['Lng2'],pointPair['Lat2']) def getSpeed(row):
return row['Dis'] / 3 * 3.6; pointPair['speed(km/h)']=pointPair.apply(getSpeed,axis=1) # pointPair=pointPair.drop(['speed','speed(km/sh)'],axis=1) pointPair
|
你的r和gps_error设置有问题,需要缩小,单位是你的gps数据的单位,就是经纬度,速度的单位是经纬度每秒,参考#138 (comment) |
你的意思是我的参数都给的太大了对吗(除了k),明天再试试,非常感谢你!!! |
Describe the bug
In the results output using fmm or stmatch, the speed is always 0. Is the speed output by subtracting of longitude and latitude?I think the speed unit should be kilometers per second or something.
在运行fmm或者stmatch算法后,输出的结果中速度一直为0,速度是经纬度变化做减法得出的吗?我认为速度单位应该是千米每秒之类的。
Expected behavior
Get the average speed of each interval, in km / s or something.
得到每个间隔的平均速度,单位为km每秒等等
Screenshots
output
程序输出结果
dataset
我的数据集
command arguments
命令参数
The text was updated successfully, but these errors were encountered: