[Positioning] Input*: initialise real_position

When provided for non-calibration requests, the real position is
initialised.
This commit is contained in:
Matteo Cypriani 2011-05-04 19:56:38 +02:00
parent 00bbc9c49d
commit 17e12a9735
2 changed files with 16 additions and 0 deletions

View File

@ -139,5 +139,10 @@ const Request& InputCSV::get_next_request()
direction, type) ;
}
// We set the real coordinates (if found) only for non-calibration
// requests
else if (pos)
current_request->set_real_position(pos) ;
return *current_request ;
}

View File

@ -154,5 +154,16 @@ const Request& InputUDPSocket::get_next_request()
request.type) ;
}
// We set the real coordinates (if found) only for non-calibration
// requests
else
{
Point3D pos(owl_ntohf(request.x_position),
owl_ntohf(request.y_position),
owl_ntohf(request.z_position)) ;
if (pos)
current_request->set_real_position(pos) ;
}
return *current_request ;
}