[Positioning] InputUDPSocket: use AP's coordinates
Use the transmitting AP's coordinates when receiving an autocalibration request that does not contain the coordinates.
This commit is contained in:
parent
71784342e7
commit
0dd57b8ea7
|
@ -149,6 +149,15 @@ const Request& InputUDPSocket::get_next_request()
|
|||
if (request.type == OWL_REQUEST_CALIBRATION ||
|
||||
request.type == OWL_REQUEST_AUTOCALIBRATION)
|
||||
{
|
||||
AccessPoint &transmitter =
|
||||
const_cast<AccessPoint&>(Stock::find_create_ap(mac_mobile)) ;
|
||||
|
||||
// If an autocalibration request does not contain the coordinates
|
||||
// of the AP, we use the current coordinates of the AP as
|
||||
// ReferencePoint.
|
||||
if (request.type == OWL_REQUEST_AUTOCALIBRATION && ! position)
|
||||
position = transmitter.get_coordinates() ;
|
||||
|
||||
const ReferencePoint &reference_point =
|
||||
Stock::find_create_reference_point(position) ;
|
||||
current_request_to_calibration_request(&reference_point,
|
||||
|
|
Loading…
Reference in New Issue