Merge "Report 2D speed rather than 3D speed."
This commit is contained in:
commit
d4f95d8079
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
|
// Speed
|
||||||
if ((location_report_ptr->valid_mask & RPC_LOC_POS_VALID_SPEED_HORIZONTAL) &&
|
if (location_report_ptr->valid_mask & RPC_LOC_POS_VALID_SPEED_HORIZONTAL)
|
||||||
(location_report_ptr->valid_mask & RPC_LOC_POS_VALID_SPEED_VERTICAL))
|
|
||||||
{
|
{
|
||||||
location.gpsLocation.flags |= GPS_LOCATION_HAS_SPEED;
|
location.gpsLocation.flags |= GPS_LOCATION_HAS_SPEED;
|
||||||
location.gpsLocation.speed = sqrt(location_report_ptr->speed_horizontal * location_report_ptr->speed_horizontal +
|
location.gpsLocation.speed = location_report_ptr->speed_horizontal;
|
||||||
location_report_ptr->speed_vertical * location_report_ptr->speed_vertical);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Heading
|
// Heading
|
||||||
|
|
Loading…
Reference in a new issue