SITL: fixed build with sim on hw

This commit is contained in:
Andrew Tridgell 2024-01-07 13:02:19 +11:00
parent 9c8fa7f58c
commit 6c88111267
2 changed files with 5 additions and 2 deletions

View File

@ -68,7 +68,7 @@ protected:
float drag_gyr_constant;
void calculate_forces(const struct sitl_input &input, Vector3f &rot_accel, Vector3f &body_accel);
float sq(float a) {return pow(a,2);}
float sq(float a) {return powf(a,2);}
};
}

View File

@ -20,6 +20,7 @@
#include "SIM_Plane.h"
#include <stdio.h>
#include <AP_Filesystem/AP_Filesystem_config.h>
using namespace SITL;
@ -80,6 +81,7 @@ Plane::Plane(const char *frame_str) :
thrust_scale *= 1.5;
}
#if AP_FILESYSTEM_FILE_READING_ENABLED
if (strstr(frame_str, "-3d")) {
aerobatic = true;
thrust_scale *= 1.5;
@ -87,7 +89,8 @@ Plane::Plane(const char *frame_str) :
AP_Param::load_defaults_file("@ROMFS/models/plane.parm", false);
AP_Param::load_defaults_file("@ROMFS/models/plane-3d.parm", false);
}
#endif
if (strstr(frame_str, "-ice")) {
ice_engine = true;
}