diff --git a/src/roscontroller.cpp b/src/roscontroller.cpp index 8656799..8a58c36 100644 --- a/src/roscontroller.cpp +++ b/src/roscontroller.cpp @@ -164,39 +164,38 @@ void roscontroller::RosControllerRun() // log data // hardware time now - log<::iterator it = - neighbours_pos_map.begin(); - log<<(int)inmsgdata.size()<<","<< message_number<<","; - log<< out_msg_time<<","; - log <::iterator it = + neighbours_pos_map.begin(); for (; it != neighbours_pos_map.end(); ++it) { - log<< it->first<<","; - log<< (double)it->second.x << "," << (double)it->second.y - << "," << (double)it->second.z <<","; + log << "," << it->first << ","; + log << (double)it->second.x << "," << (double)it->second.y + << "," << (double)it->second.z; } - for (std::vector::iterator it = inmsgdata.begin() ; it != inmsgdata.end(); ++it){ - log<<(int)it->nid <<","<<(int)it->msgid<<","<<(int)it->size<<","<sent_time - <<","<received_time <<","; + for (std::vector::iterator it = inmsgdata.begin() ; it != inmsgdata.end(); ++it) + { + log << "," << (int)it->nid << "," << (int)it->msgid << "," << (int)it->size << "," << + it->sent_time << "," << it->received_time; } - log << std::endl ; inmsgdata.clear(); + log << std::endl; - log <