2010-03-03 16:15:06 +01:00
|
|
|
#include "realposition.hh"
|
|
|
|
#include "calibrationrequest.hh"
|
|
|
|
#include "referencepoint.hh"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Result RealPosition::compute(const Request &request)
|
|
|
|
{
|
2011-05-04 19:58:02 +02:00
|
|
|
const Point3D *coordinates = NULL ;
|
|
|
|
|
2010-03-03 16:15:06 +01:00
|
|
|
const CalibrationRequest *calibration_request =
|
|
|
|
dynamic_cast<const CalibrationRequest*>(&request) ;
|
|
|
|
|
|
|
|
if (calibration_request != NULL)
|
2011-05-04 19:58:02 +02:00
|
|
|
coordinates = static_cast<Point3D*>(
|
|
|
|
calibration_request->get_reference_point()) ;
|
|
|
|
|
|
|
|
coordinates = request.get_real_position() ;
|
|
|
|
if (coordinates)
|
|
|
|
return Result(*coordinates, name) ;
|
2010-03-03 16:15:06 +01:00
|
|
|
|
2011-04-05 11:52:06 +02:00
|
|
|
return Result(name) ;
|
2010-03-03 16:15:06 +01:00
|
|
|
}
|