mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 15:13:34 +08:00
double promotion warning fix or ignore per module
This commit is contained in:
committed by
Lorenz Meier
parent
11d348ec4f
commit
cf74166801
@@ -336,8 +336,8 @@ void BlockLocalPositionEstimator::update()
|
||||
// if we have no lat, lon initialize projection to LPE_LAT, LPE_LON parameters
|
||||
if (!_map_ref.init_done && (_estimatorInitialized & EST_XY) && _fake_origin.get()) {
|
||||
map_projection_init(&_map_ref,
|
||||
_init_origin_lat.get(),
|
||||
_init_origin_lon.get());
|
||||
(double)_init_origin_lat.get(),
|
||||
(double)_init_origin_lon.get());
|
||||
|
||||
// set timestamp when origin was set to current time
|
||||
_time_origin = _timeStamp;
|
||||
|
||||
@@ -35,6 +35,7 @@ px4_add_module(
|
||||
MAIN local_position_estimator
|
||||
COMPILE_FLAGS
|
||||
-Wno-sign-compare # TODO: fix all sign-compare
|
||||
-Wno-double-promotion # TODO: fix in Matrix library Vector::pow()
|
||||
STACK_MAIN 5700
|
||||
STACK_MAX 13000
|
||||
SRCS
|
||||
|
||||
@@ -95,9 +95,9 @@ int BlockLocalPositionEstimator::gpsMeasure(Vector<double, n_y_gps> &y)
|
||||
y(0) = _sub_gps.get().lat * 1e-7;
|
||||
y(1) = _sub_gps.get().lon * 1e-7;
|
||||
y(2) = _sub_gps.get().alt * 1e-3;
|
||||
y(3) = _sub_gps.get().vel_n_m_s;
|
||||
y(4) = _sub_gps.get().vel_e_m_s;
|
||||
y(5) = _sub_gps.get().vel_d_m_s;
|
||||
y(3) = (double)_sub_gps.get().vel_n_m_s;
|
||||
y(4) = (double)_sub_gps.get().vel_e_m_s;
|
||||
y(5) = (double)_sub_gps.get().vel_d_m_s;
|
||||
|
||||
// increament sums for mean
|
||||
_gpsStats.update(y);
|
||||
|
||||
Reference in New Issue
Block a user