mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 04:53:34 +08:00
NuttX carry minimal c++ cmath (replacing Matrix stdlib_imports.hpp)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user