mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 01:12:11 +00:00
FlightTaskManualAltitude: Fix double->float conversion in initialization
This gives an error on some new compilers, e.g. riscv64-unknown-elf 10.2.0 Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
This commit is contained in:
committed by
Lorenz Meier
parent
532f370e7d
commit
ac6e7a1c6c
@@ -139,8 +139,8 @@ private:
|
||||
bool _terrain_follow{false}; /**< true when the vehicle is following the terrain height */
|
||||
bool _terrain_hold{false}; /**< true when vehicle is controlling height above a static ground position */
|
||||
|
||||
float _min_distance_to_ground{-INFINITY}; /**< min distance to ground constraint */
|
||||
float _max_distance_to_ground{INFINITY}; /**< max distance to ground constraint */
|
||||
float _min_distance_to_ground{(float)(-INFINITY)}; /**< min distance to ground constraint */
|
||||
float _max_distance_to_ground{(float)INFINITY}; /**< max distance to ground constraint */
|
||||
|
||||
/**
|
||||
* Distance to ground during terrain following.
|
||||
|
||||
@@ -2230,7 +2230,8 @@ MavlinkReceiver::handle_message_hil_gps(mavlink_message_t *msg)
|
||||
gps.vel_n_m_s = (float)(hil_gps.vn) / 100.0f; // cm/s -> m/s
|
||||
gps.vel_e_m_s = (float)(hil_gps.ve) / 100.0f; // cm/s -> m/s
|
||||
gps.vel_d_m_s = (float)(hil_gps.vd) / 100.0f; // cm/s -> m/s
|
||||
gps.cog_rad = ((hil_gps.cog == 65535) ? (float)NAN : matrix::wrap_2pi(math::radians(hil_gps.cog * 1e-2f))); // cdeg -> rad
|
||||
gps.cog_rad = ((hil_gps.cog == 65535) ? (float)NAN : matrix::wrap_2pi(math::radians(
|
||||
hil_gps.cog * 1e-2f))); // cdeg -> rad
|
||||
gps.vel_ned_valid = true;
|
||||
|
||||
gps.timestamp_time_relative = 0;
|
||||
|
||||
Reference in New Issue
Block a user