mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-11 10:28:29 -04:00
ArduCopter - Navigation.pde - corrected comment re wp_distance and get_distance to clarify that they are in cm (not meters!)
This commit is contained in:
parent
f8ad719825
commit
ce6b1ccc75
@ -5,7 +5,7 @@
|
|||||||
//****************************************************************
|
//****************************************************************
|
||||||
static byte navigate()
|
static byte navigate()
|
||||||
{
|
{
|
||||||
// waypoint distance from plane in meters
|
// waypoint distance from plane in cm
|
||||||
// ---------------------------------------
|
// ---------------------------------------
|
||||||
wp_distance = get_distance(¤t_loc, &next_WP);
|
wp_distance = get_distance(¤t_loc, &next_WP);
|
||||||
home_distance = get_distance(¤t_loc, &home);
|
home_distance = get_distance(¤t_loc, &home);
|
||||||
@ -529,7 +529,7 @@ static int32_t wrap_180(int32_t error)
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// distance is returned in meters
|
// distance is returned in cm
|
||||||
static int32_t get_distance(struct Location *loc1, struct Location *loc2)
|
static int32_t get_distance(struct Location *loc1, struct Location *loc2)
|
||||||
{
|
{
|
||||||
float dlat = (float)(loc2->lat - loc1->lat);
|
float dlat = (float)(loc2->lat - loc1->lat);
|
||||||
|
Loading…
Reference in New Issue
Block a user