[Positioning] Result::to_csv(): include area

Add the area in which is the result's coordinate, after the error.
This changes the behaviour of OutputUDP and OutputCSV.
This commit is contained in:
Matteo Cypriani 2011-07-30 19:35:47 +02:00
parent 79ad31b351
commit c0a179e34e
3 changed files with 7 additions and 3 deletions

View File

@ -35,7 +35,6 @@
. Area: p_min et p_max > coord_min et coord_max
- User interface
° Add the area to the result in OutputCSV.
° When reading the APs, add them to the mobiles' list (or another
way to be able to have a single entry for an AP).
° Review the option names & descriptions.

View File

@ -97,7 +97,7 @@ void OutputTCPSocketEvAAL::write(const Result &result)
int OutputTCPSocketEvAAL::
area_of_interest_number(const Point3D &position) const
{
const Area *area = Stock::in_which_area_is(position) ;
const Area *const area = Stock::in_which_area_is(position) ;
if (area == NULL)
return 0 ;

View File

@ -88,7 +88,12 @@ const string Result::to_csv() const
<< ';' << position.get_y()
<< ';' << position.get_z()
<< ';' << "Error"
<< ';' << error ;
<< ';' << error
<< ';' ;
const Area *const area = Stock::in_which_area_is(position) ;
if (area != NULL)
csv_line << area->get_name() ;
return csv_line.str() ;
}