[Positioner] Add option output.2d-error
This commit is contained in:
parent
5fd5f13b93
commit
8c93cc467e
|
@ -193,6 +193,7 @@ $(OBJ_DIR)/calibrationrequest.o: \
|
|||
$(OBJ_DIR)/direction.o
|
||||
$(OBJ_DIR)/result.o: \
|
||||
$(OBJ_DIR)/stock.o \
|
||||
$(OBJ_DIR)/configuration.o \
|
||||
$(OBJ_DIR)/area.o \
|
||||
$(OBJ_DIR)/request.o
|
||||
$(OBJ_DIR)/resultlist.o: \
|
||||
|
|
|
@ -206,6 +206,12 @@ csv-file = /tmp/owlps-positioner.log
|
|||
[output]
|
||||
# The following options are related to the output of the results.
|
||||
|
||||
# Compute the euclidean distance error in two dimensions instead of
|
||||
# three dimensions. This can be useful when doing experiments on only
|
||||
# one floor.
|
||||
# The default is false, i.e. the error is computed in 3D.
|
||||
#2d-error = false
|
||||
|
||||
# This is the default output if none is specified.
|
||||
#medium = Terminal
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include "request.hh"
|
||||
#include "area.hh"
|
||||
#include "stock.hh"
|
||||
#include "configuration.hh"
|
||||
|
||||
#include <sstream>
|
||||
|
||||
|
@ -49,7 +50,10 @@ string Result::in_which_area() const
|
|||
|
||||
void Result::compute_error(const Point3D &real_position)
|
||||
{
|
||||
error = position.distance(real_position) ;
|
||||
if (Configuration::bool_value("output.2d-error"))
|
||||
error = position.distance_2d(real_position) ;
|
||||
else
|
||||
error = position.distance(real_position) ;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -308,6 +308,10 @@ void UserInterface::fill_output_options()
|
|||
po::options_description options("Output options") ;
|
||||
|
||||
options.add_options()
|
||||
("output.2d-error",
|
||||
po::value<bool>()->default_value(false),
|
||||
"Compute the distance error in two dimensions instead of three"
|
||||
" dimensions.")
|
||||
("output.medium,O",
|
||||
po::value< vector<string> >()->composing(),
|
||||
"Medium to which the results will be written. You can specify"
|
||||
|
|
Loading…
Reference in New Issue