AP_Math: added degF_to_Kelvin()

This commit is contained in:
Andrew Tridgell 2021-12-23 08:26:26 +11:00
parent 367503be91
commit 319592a148
2 changed files with 10 additions and 0 deletions

View File

@ -473,3 +473,9 @@ float fixedwing_turn_rate(float bank_angle_deg, float airspeed)
bank_angle_deg = constrain_float(bank_angle_deg, -80, 80);
return degrees(GRAVITY_MSS*tanf(radians(bank_angle_deg))/MAX(airspeed,1));
}
// convert degrees farenheight to Kelvin
float degF_to_Kelvin(float temp_f)
{
return (temp_f + 459.67) * 0.55556;
}

View File

@ -345,3 +345,7 @@ uint16_t float2fixed(const float input, const uint8_t fractional_bits = 8);
fixed wing aircraft
*/
float fixedwing_turn_rate(float bank_angle_deg, float airspeed);
// convert degrees farenheight to Kelvin
float degF_to_Kelvin(float temp_f);