Report 2D speed rather than 3D speed.
According to Android API standard, it should be only the horizontal speed. Therefore, the speed should be reported in 2D rather than 3D. Change-Id: Ie42aa350637b56394869bac0af0207a5aceeede6 CRs-fixed: 745419
This commit is contained in:
parent
452767c1e2
commit
00fd7bc33b
1 changed files with 2 additions and 4 deletions
|
@ -715,12 +715,10 @@ void LocApiRpc::reportPosition(const rpc_loc_parsed_position_s_type *location_re
|
|||
}
|
||||
|
||||
// Speed
|
||||
if ((location_report_ptr->valid_mask & RPC_LOC_POS_VALID_SPEED_HORIZONTAL) &&
|
||||
(location_report_ptr->valid_mask & RPC_LOC_POS_VALID_SPEED_VERTICAL))
|
||||
if (location_report_ptr->valid_mask & RPC_LOC_POS_VALID_SPEED_HORIZONTAL)
|
||||
{
|
||||
location.gpsLocation.flags |= GPS_LOCATION_HAS_SPEED;
|
||||
location.gpsLocation.speed = sqrt(location_report_ptr->speed_horizontal * location_report_ptr->speed_horizontal +
|
||||
location_report_ptr->speed_vertical * location_report_ptr->speed_vertical);
|
||||
location.gpsLocation.speed = location_report_ptr->speed_horizontal;
|
||||
}
|
||||
|
||||
// Heading
|
||||
|
|
Loading…
Reference in a new issue