mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
Un-inlined get_table_data
This commit is contained in:
parent
6d0b7f7ed1
commit
b6daf83088
@ -53,7 +53,7 @@
|
||||
|
||||
using math::constrain;
|
||||
|
||||
static constexpr unsigned get_lookup_table_index(float *val, float min, float max)
|
||||
static unsigned get_lookup_table_index(float *val, float min, float max)
|
||||
{
|
||||
/* for the rare case of hitting the bounds exactly
|
||||
* the rounding logic wouldn't fit, so enforce it.
|
||||
@ -66,7 +66,7 @@ static constexpr unsigned get_lookup_table_index(float *val, float min, float ma
|
||||
return static_cast<unsigned>((-(min) + *val) / SAMPLING_RES);
|
||||
}
|
||||
|
||||
static constexpr float get_table_data(float latitude_deg, float longitude_deg, const int16_t table[LAT_DIM][LON_DIM])
|
||||
static float get_table_data(float latitude_deg, float longitude_deg, const int16_t table[LAT_DIM][LON_DIM])
|
||||
{
|
||||
latitude_deg = math::constrain(latitude_deg, SAMPLING_MIN_LAT, SAMPLING_MAX_LAT);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user