鹰眼轨迹分析类接口提供停留点分析和驾驶行为分析功能:
1. 停留点分析接口:一段轨迹中有多少个停留点、停留在何处、停留了多久
2. 驾驶行为分析:一段轨迹中有多少个超速点、急加/减速点、急转弯点,其中超速点功能支持依据百度地图路网实际道路限速计算,也支持开发者设置固定的限速值
注意:如使用轨迹分析相关接口,轨迹点上传时请务必同步上传speed(速度)和direction(方向)字段,否则该接口将不进行分析计算。鹰眼SDK在GPS定位下会自动采集这些数据。
目前中国主要有以下三种坐标系:
WGS84:为一种大地坐标系,也是目前广泛使用的GPS全球卫星定位系统使用的坐标系
GCJ02:是由中国国家测绘局制订的地理信息系统的坐标系统。由WGS84坐标系经加密后的坐标系
BD09:为百度坐标系,在GCJ02坐标系基础上再次加密。其中bd09ll表示百度经纬度坐标,bd09mc表示百度墨卡托米制坐标
非中国地区地图,统一使用WGS84坐标
查询entity在指定时间段内的停留点。停留点判断规则为:在stay_radius半径范围内,滞留stay_time以上,被认为是一次停留,将取一个代表性坐标作为停留点,其中 stay_radius 默认为20米,stay_time 默认为 600秒。
https://yingyan.baidu.com/api/v3/analysis/staypoint
//GET请求
https://yingyan.baidu.com/api/v3/analysis/staypoint?ak=用户的'''AK'''&service_id=用户的service_id&entity_name=car_plate&start_time=1467734400&end_time=1467817200&stay_time=300
{"status": 0,"message": "成功",staypoint_num: 3,stay_points: [{start_time: 1464164829,end_time: 1464166832,duration: 2003,stay_point: {longitude: 113.22167932597,latitude: 23.411219209009,coord_type: 3}},{start_time: 1464170138,end_time: 1464171664,duration: 1526,stay_point: {longitude: 113.20923398543,latitude: 23.411707425027,coord_type: 3}},{start_time: 1464172067,end_time: 1464172952,duration: 885,stay_point: {longitude: 113.207836,latitude: 23.40664,coord_type: 3}}]}
查询entity在指定时间段内的驾驶行为,返回以下分析结果:
1. 总体信息:起终点信息、里程、耗时、平均速度、最高速度
2. 异常信息:超速、急加速、急刹车、急转弯
https://yingyan.baidu.com/api/v3/analysis/drivingbehavior
//GET 请求
https://yingyan.baidu.com/api/v3/analysis/drivingbehavior?ak=<用户的'''AK>'''&service_id=用户的service_id&entity_name=car_plate&start_time=1464105600&end_time=1464191940&speeding_threshold=80
{status: 0,message: "成功",distance: 79707.90026776,duration: 38441,average_speed: 7.4646455858052,max_speed: 56.7,start_point: {longitude: 113.2075,latitude: 23.40675,coord_type: "bd09ll",loc_time: 1464134680,address: "新景豪苑内,新凤凰酒店-休闲会所附近9米"},end_point: {longitude: 113.208055,latitude: 23.406561,coord_type: "bd09ll",loc_time: 1464173121,address: "盛业行东南49米"},speeding_num: 2,harsh_acceleration_num: 1,harsh_breaking_num: 1,harsh_steering_num: 1,speeding: [{speeding_distance: 59.189285867195,speeding_points: [{longitude: 113.20710875909,latitude: 23.39908060312,coord_type: "bd09ll",loc_time: 1464138828,actual_speed: 87.5,limit_speed: 60},{longitude: 113.20697265531,latitude: 23.399597906861,coord_type: "bd09ll",loc_time: 1464138843,actual_speed: 108.9,limit_speed: 80}]},{speeding_distance: 989.53701539415,speeding_points: [{longitude: 113.21499929275,latitude: 23.413317284437,coord_type: "bd09ll",loc_time: 1464141367,actual_speed: 32.4,limit_speed: 15},{longitude: 113.21692508544,latitude: 23.408488134541,coord_type: "bd09ll",loc_time: 1464141794,actual_speed: 16.2,limit_speed: 15}]}],harsh_acceleration: [{longitude: 113.21725316042,latitude: 23.412958154234,coord_type: "bd09ll",loc_time: 1464143029,acceleration: 2.75,initial_speed: 0,end_speed: 19.8}],harsh_breaking: [{longitude: 113.2149819651,latitude: 23.411143610036,coord_type: "bd09ll",loc_time: 1464141265,acceleration: -2.25,initial_speed: 34.2,end_speed: 26.1}],harsh_steering: [{longitude: 113.2399844062,latitude: 23.415216724914,coord_type: "bd09ll",loc_time: 1464158589,centripetal_acceleration: 5.0324216823668,turn_type: "left",speed: 36.44}]}
上一篇
下一篇
本篇文章对您是否有帮助?