NuttX carry minimal c++ cmath (replacing Matrix stdlib_imports.hpp)

This commit is contained in:
Daniel Agar
2022-07-12 08:05:06 -04:00
parent fe22167512
commit a73efd9c4f
32 changed files with 297 additions and 323 deletions
@@ -33,6 +33,8 @@
#pragma once
#include <cmath>
#include "UavcanPublisherBase.hpp"
#include <uavcan/equipment/gnss/Fix2.hpp>
@@ -126,14 +128,14 @@ public:
ecefpositionvelocity.velocity_xyz[2] = NAN;
// Use ecef_position_velocity for now... There is no heading field
if (!isnan(gps.heading)) {
if (!std::isnan(gps.heading)) {
ecefpositionvelocity.velocity_xyz[0] = gps.heading;
if (!isnan(gps.heading_offset)) {
if (!std::isnan(gps.heading_offset)) {
ecefpositionvelocity.velocity_xyz[1] = gps.heading_offset;
}
if (!isnan(gps.heading_accuracy)) {
if (!std::isnan(gps.heading_accuracy)) {
ecefpositionvelocity.velocity_xyz[2] = gps.heading_accuracy;
}