APM:Libraries
Macros | Functions | Variables
test_closest_distance_between_radial_and_point.cpp File Reference
#include <AP_gtest.h>
#include <AP_Math/vector2.h>
Include dependency graph for test_closest_distance_between_radial_and_point.cpp:

Go to the source code of this file.

Macros

#define TEST_DISTANCE_BOTH(line_segment_x, line_segment_y, point_x, point_y, expected_length)
 

Functions

 TEST (ThreatTests, Distance)
 

Variables

int hal = 0
 -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- More...
 

Macro Definition Documentation

◆ TEST_DISTANCE_BOTH

#define TEST_DISTANCE_BOTH (   line_segment_x,
  line_segment_y,
  point_x,
  point_y,
  expected_length 
)
Value:
do { \
{ \
Vector2f line_segment = Vector2f(line_segment_x, line_segment_y); \
Vector2f point = Vector2f(point_x, point_y); \
line_segment, \
point \
); \
EXPECT_FLOAT_EQ(result, expected_length); \
} \
} while (false)
Vector2< float > Vector2f
Definition: vector2.h:239
static float closest_distance_between_radial_and_point(const Vector2< T > &w, const Vector2< T > &p)
Definition: vector2.h:216
const char * result
Definition: Printf.cpp:16
Vector2l point
Definition: polygon.cpp:34

Definition at line 5 of file test_closest_distance_between_radial_and_point.cpp.

Referenced by TEST().

Function Documentation

◆ TEST()

TEST ( ThreatTests  ,
Distance   
)

Variable Documentation

◆ hal

int hal = 0

-*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-

The strategy for roll/pitch autotune is to give the user a AUTOTUNE flight mode which behaves just like FBWA, but does automatic tuning.

While the user is flying in AUTOTUNE the gains are saved every 10 seconds, but the saved gains are not the current gains, instead it saves the gains from 10s ago. When the user exits AUTOTUNE the gains are restored from 10s ago.

This allows the user to fly as much as they want in AUTOTUNE mode, and if they are ever unhappy they just exit the mode. If they stay in AUTOTUNE for more than 10s then their gains will have changed.

Using this approach users don't need any special switches, they just need to be able to enter and exit AUTOTUNE mode

Definition at line 47 of file test_closest_distance_between_radial_and_point.cpp.