mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-09 01:18:29 -04:00
Tools: allow for double EKF build
This commit is contained in:
parent
5bccdf5e5a
commit
df9950fbb3
@ -4,10 +4,9 @@
|
|||||||
data structure for measuring speed of EKF mag fusion code
|
data structure for measuring speed of EKF mag fusion code
|
||||||
*/
|
*/
|
||||||
#include <AP_Math/AP_Math.h>
|
#include <AP_Math/AP_Math.h>
|
||||||
|
#include <AP_Math/ftype.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
typedef float ftype;
|
|
||||||
|
|
||||||
class EKF_Maths {
|
class EKF_Maths {
|
||||||
public:
|
public:
|
||||||
EKF_Maths() {}
|
EKF_Maths() {}
|
||||||
|
@ -342,10 +342,10 @@ class Board:
|
|||||||
env.ROMFS_FILES += [(f,'libraries/AP_OSD/fonts/'+f)]
|
env.ROMFS_FILES += [(f,'libraries/AP_OSD/fonts/'+f)]
|
||||||
|
|
||||||
if cfg.options.ekf_double:
|
if cfg.options.ekf_double:
|
||||||
env.CXXFLAGS += ['-DHAL_EKF_DOUBLE=1']
|
env.CXXFLAGS += ['-DHAL_WITH_EKF_DOUBLE=1']
|
||||||
|
|
||||||
if cfg.options.ekf_single:
|
if cfg.options.ekf_single:
|
||||||
env.CXXFLAGS += ['-DHAL_EKF_DOUBLE=0']
|
env.CXXFLAGS += ['-DHAL_WITH_EKF_DOUBLE=0']
|
||||||
|
|
||||||
def pre_build(self, bld):
|
def pre_build(self, bld):
|
||||||
'''pre-build hook that gets called before dynamic sources'''
|
'''pre-build hook that gets called before dynamic sources'''
|
||||||
|
@ -327,6 +327,12 @@ def do_build(opts, frame_options):
|
|||||||
if opts.postype_single:
|
if opts.postype_single:
|
||||||
cmd_configure.append("--postype-single")
|
cmd_configure.append("--postype-single")
|
||||||
|
|
||||||
|
if opts.ekf_double:
|
||||||
|
cmd_configure.append("--ekf-double")
|
||||||
|
|
||||||
|
if opts.ekf_single:
|
||||||
|
cmd_configure.append("--ekf-single")
|
||||||
|
|
||||||
pieces = [shlex.split(x) for x in opts.waf_configure_args]
|
pieces = [shlex.split(x) for x in opts.waf_configure_args]
|
||||||
for piece in pieces:
|
for piece in pieces:
|
||||||
cmd_configure.extend(piece)
|
cmd_configure.extend(piece)
|
||||||
@ -1088,6 +1094,12 @@ group_sim.add_option("", "--sysid",
|
|||||||
group_sim.add_option("--postype-single",
|
group_sim.add_option("--postype-single",
|
||||||
action='store_true',
|
action='store_true',
|
||||||
help="force single precision postype_t")
|
help="force single precision postype_t")
|
||||||
|
group_sim.add_option("--ekf-double",
|
||||||
|
action='store_true',
|
||||||
|
help="use double precision in EKF")
|
||||||
|
group_sim.add_option("--ekf-single",
|
||||||
|
action='store_true',
|
||||||
|
help="use single precision in EKF")
|
||||||
parser.add_option_group(group_sim)
|
parser.add_option_group(group_sim)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user