PX4 Firmware
PX4 Autopilot Software http://px4.io
|
Tests for the PX4 math library. More...
#include <unit_test.h>
#include <errno.h>
#include <fcntl.h>
#include <float.h>
#include <math.h>
#include <px4_platform_common/px4_config.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
#include <px4_platform_common/log.h>
#include <string.h>
#include <time.h>
#include <mathlib/mathlib.h>
#include <systemlib/err.h>
#include <drivers/drv_hrt.h>
#include <matrix/math.hpp>
#include "tests_main.h"
Go to the source code of this file.
Classes | |
class | MathlibTest |
Macros | |
#define | TEST_OP(_title, _op) { unsigned int n = 30000; hrt_abstime t0, t1; t0 = hrt_absolute_time(); for (unsigned int j = 0; j < n; j++) { _op; }; t1 = hrt_absolute_time(); PX4_INFO(_title ": %.6fus", (double)(t1 - t0) / n); } |
Tests for the PX4 math library.
Definition in file test_mathlib.cpp.
#define TEST_OP | ( | _title, | |
_op | |||
) | { unsigned int n = 30000; hrt_abstime t0, t1; t0 = hrt_absolute_time(); for (unsigned int j = 0; j < n; j++) { _op; }; t1 = hrt_absolute_time(); PX4_INFO(_title ": %.6fus", (double)(t1 - t0) / n); } |
Definition at line 84 of file test_mathlib.cpp.
Referenced by MathlibTest::testMatrix3x3(), MathlibTest::testVector2(), and MathlibTest::testVector3().