|
@@ -42,7 +42,7 @@ void car::do_business(const std::shared_ptr<site>&site,const point &pt,double ac
|
|
|
m_acc=acc;
|
|
|
m_area_tool->on_point(shared_from_this(),pt);
|
|
|
m_timeval = m_time;
|
|
|
- handle_three_rates(pt);
|
|
|
+ //handle_three_rates(pt);
|
|
|
handle_traffic_light(pt, site->m_id);
|
|
|
//if(m_enable_anti_collision){
|
|
|
if(CYaSetting::m_sys_setting.m_enable_anti_coll){
|
|
@@ -89,7 +89,8 @@ void car::handle_anti_coll(const point& pt, const int& sid)
|
|
|
int d = (c.second->m_timeval >= m_timeval ? (c.second->m_timeval - m_timeval) : (m_timeval - c.second->m_timeval)) / 1000.0;
|
|
|
s = ((c.second->m_timeval >= m_timeval ? (c.second->m_timeval - m_timeval) : (m_timeval - c.second->m_timeval)) /1000.0 <= 30);
|
|
|
//float dist = pt.dist(*c.second);
|
|
|
- float dist = pt.dist(*c.second.m_v_point);
|
|
|
+ float dist = pt.dist(c.second->m_v_point);
|
|
|
+ log_info("[anti_coll] vid=%d, pid=%d, dist=%.2f", m_id, c.second->m_id, dist);
|
|
|
if(dist < k.second && s){
|
|
|
int call_level = 5 - k.first;
|
|
|
log_info("[anti_coll] distance=%.3f, level=%d, thre_value=%.3f, time_diff=%d", dist, call_level, k.second, d);
|
|
@@ -177,7 +178,7 @@ void car::handle_three_rates(const point &pt)
|
|
|
cp.z = pt.z;
|
|
|
cp.map_id = m_area_tool->get_mapid();
|
|
|
cp.vibration = m_acc;
|
|
|
- put_three_rates(cp);
|
|
|
+ //put_three_rates(cp);
|
|
|
}
|
|
|
|
|
|
/*
|