我有以下文档的mongodb集合:
{
"_id" : ObjectId("5ba605ebf57bd40fb4900f76"),
"__v" : 0.0,
"Timestamp" : 20180823095157.0,
"Speed" : 3.0,
"Altitude" : 0.0,
"Latitude" : 23.19364,
"Longitude" : 72.638502,
"battery" : 90.0,
"VehicleId" : "ISG503"
}
{
"_id" : ObjectId("5ba605ebf57bd40fb4900f77"),
"__v" : 0.0,
"Timestamp" : 20180823095158.0,
"Speed" : 3.0,
"Altitude" : 0.0,
"Latitude" : 23.193662,
"Longitude" : 72.63849,
"battery" : 89.0,
"VehicleId" : "ISG503"
}
{
"_id" : ObjectId("5ba605ebf57bd40fb4900f78"),
"__v" : 0.0,
"Timestamp" : 20180823095159.0,
"Speed" : 3.0,
"Altitude" : 0.0,
"Latitude" : 23.193668,
"Longitude" : 72.638493,
"battery" : 90.0,
"VehicleId" : "ISG503"
}
此处的时间戳为YYYYMMDDhhmmss格式。
我每秒钟都有数据,但我只想在猫鼬查询中每隔15秒获取一次数据。