[Positioning] Split option generated-meshing-grain

Split the option positioning.generated-meshing-grain in two:
positioning.generated-meshing-grain-x and
positioning.generated-meshing-grain-y.
This commit is contained in:
Matteo Cypriani 2011-07-29 16:14:39 +02:00
parent 0da98cdb05
commit a9f4750f34
3 changed files with 17 additions and 9 deletions

View File

@ -75,8 +75,10 @@ csv-file = /tmp/owlps-positioning.log
#generate-reference-points = false #generate-reference-points = false
# When the above option is activated, the reference points are generated # When the above option is activated, the reference points are generated
# with the specified distance (in meters) between one another. # with the specified distance (in meters) between one another, in the X
#generated-meshing-grain = 0.5 # and Y axis.
#generated-meshing-grain-x = 0.5
#generated-meshing-grain-y = 0.5
# This option allows the calibration requests sent during the # This option allows the calibration requests sent during the
# positioning phase to be added to the calibration request's list. They # positioning phase to be added to the calibration request's list. They

View File

@ -486,12 +486,14 @@ void Stock::regenerate_reference_points()
Configuration::string_value("positioning.minmax-start")) ; Configuration::string_value("positioning.minmax-start")) ;
Point3D stop( Point3D stop(
Configuration::string_value("positioning.minmax-stop")) ; Configuration::string_value("positioning.minmax-stop")) ;
float step = float step_x =
Configuration::float_value("positioning.generated-meshing-grain") ; Configuration::float_value("positioning.generated-meshing-grain-x") ;
float step_y =
Configuration::float_value("positioning.generated-meshing-grain-y") ;
float z = 1 ; // FIXME float z = 1 ; // FIXME
for (float x = start.get_x() ; x <= stop.get_x() ; x += step) for (float x = start.get_x() ; x <= stop.get_x() ; x += step_x)
for (float y = start.get_y() ; y <= stop.get_y() ; y += step) for (float y = start.get_y() ; y <= stop.get_y() ; y += step_y)
//for (float z = start.get_z() ; z <= stop.get_z() ; z += step) //for (float z = start.get_z() ; z <= stop.get_z() ; z += step_z)
{ {
Point3D current_point(x,y,z) ; Point3D current_point(x,y,z) ;

View File

@ -200,10 +200,14 @@ void UserInterface::fill_positioning_options()
po::value<bool>()->default_value(false), po::value<bool>()->default_value(false),
"Generate reference points from the (auto)calibration requests" "Generate reference points from the (auto)calibration requests"
" received.") " received.")
("positioning.generated-meshing-grain", ("positioning.generated-meshing-grain-x",
po::value<float>()->default_value(0.5), po::value<float>()->default_value(0.5),
"When generating reference points, this distance (in meters) will" "When generating reference points, this distance (in meters) will"
" separate each point to the next.") " separate each point to the next in X.")
("positioning.generated-meshing-grain-y",
po::value<float>()->default_value(0.5),
"When generating reference points, this distance (in meters) will"
" separate each point to the next in Y.")
("positioning.radar-ignore-ap-reference-points", ("positioning.radar-ignore-ap-reference-points",
po::value<bool>()->default_value(false), po::value<bool>()->default_value(false),
"With the RADAR algorithm, try to avoid selecting the reference" "With the RADAR algorithm, try to avoid selecting the reference"