Skip to content

Commit

Permalink
ENH: added Valetudo flight sim as acceptance test fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
giovaniceotto committed Sep 15, 2021
1 parent a4d49b3 commit 1c10d42
Show file tree
Hide file tree
Showing 13 changed files with 920 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*.py[co]
*$py.class

# Distribution / packaging
Expand Down
Binary file not shown.
124 changes: 124 additions & 0 deletions tests/fixtures/acceptance/PJ_Valetudo/SisRecLinux/SisRec.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
# This file was automatically generated by SWIG (http://www.swig.org).
# Version 4.0.0
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.

from sys import version_info as _swig_python_version_info
if _swig_python_version_info < (2, 7, 0):
raise RuntimeError('Python 2.7 or later required')

# Import the low-level C/C++ module
if __package__ or '.' in __name__:
from . import _SisRec
else:
import _SisRec

try:
import builtins as __builtin__
except ImportError:
import __builtin__

def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
if name == "thisown":
return self.this.own(value)
if name == "this":
if type(value).__name__ == 'SwigPyObject':
self.__dict__[name] = value
return
method = class_type.__swig_setmethods__.get(name, None)
if method:
return method(self, value)
if not static:
object.__setattr__(self, name, value)
else:
raise AttributeError("You cannot add attributes to %s" % self)


def _swig_setattr(self, class_type, name, value):
return _swig_setattr_nondynamic(self, class_type, name, value, 0)


def _swig_getattr(self, class_type, name):
if name == "thisown":
return self.this.own()
method = class_type.__swig_getmethods__.get(name, None)
if method:
return method(self)
raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name))


def _swig_repr(self):
try:
strthis = "proxy of " + self.this.__repr__()
except __builtin__.Exception:
strthis = ""
return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)


def _swig_setattr_nondynamic_instance_variable(set):
def set_instance_attr(self, name, value):
if name == "thisown":
self.this.own(value)
elif name == "this":
set(self, name, value)
elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
set(self, name, value)
else:
raise AttributeError("You cannot add instance attributes to %s" % self)
return set_instance_attr


def _swig_setattr_nondynamic_class_variable(set):
def set_class_attr(cls, name, value):
if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
set(cls, name, value)
else:
raise AttributeError("You cannot add class attributes to %s" % cls)
return set_class_attr


def _swig_add_metaclass(metaclass):
"""Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
def wrapper(cls):
return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
return wrapper


class _SwigNonDynamicMeta(type):
"""Meta class to enforce nondynamic attributes (no new attributes) for a class"""
__setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)


class SisRecSt(object):
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
__repr__ = _swig_repr
initialState = _SisRec.SisRecSt_initialState
detectDrogue = _SisRec.SisRecSt_detectDrogue
detectMain = _SisRec.SisRecSt_detectMain
finalState = _SisRec.SisRecSt_finalState

def __init__(self, mainPres, MU=0.2):
_SisRec.SisRecSt_swiginit(self, _SisRec.new_SisRecSt(mainPres, MU))

def initializeBuffers(self, p0):
return _SisRec.SisRecSt_initializeBuffers(self, p0)

def enable(self):
return _SisRec.SisRecSt_enable(self)

def getState(self):
return _SisRec.SisRecSt_getState(self)

def update(self, x):
return _SisRec.SisRecSt_update(self, x)

def reset(self):
return _SisRec.SisRecSt_reset(self)
__swig_destroy__ = _SisRec.delete_SisRecSt

# Register SisRecSt in _SisRec:
_SisRec.SisRecSt_swigregister(SisRecSt)



Binary file not shown.
Empty file.
95 changes: 95 additions & 0 deletions tests/fixtures/acceptance/PJ_Valetudo/SisRecWindows/SisRec.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# This file was automatically generated by SWIG (http://www.swig.org).
# Version 4.0.2
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.

from sys import version_info as _swig_python_version_info
if _swig_python_version_info < (2, 7, 0):
raise RuntimeError("Python 2.7 or later required")

# Import the low-level C/C++ module
if __package__ or "." in __name__:
from . import _SisRecBase
else:
import _SisRecBase

try:
import builtins as __builtin__
except ImportError:
import __builtin__

def _swig_repr(self):
try:
strthis = "proxy of " + self.this.__repr__()
except __builtin__.Exception:
strthis = ""
return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)


def _swig_setattr_nondynamic_instance_variable(set):
def set_instance_attr(self, name, value):
if name == "thisown":
self.this.own(value)
elif name == "this":
set(self, name, value)
elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
set(self, name, value)
else:
raise AttributeError("You cannot add instance attributes to %s" % self)
return set_instance_attr


def _swig_setattr_nondynamic_class_variable(set):
def set_class_attr(cls, name, value):
if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
set(cls, name, value)
else:
raise AttributeError("You cannot add class attributes to %s" % cls)
return set_class_attr


def _swig_add_metaclass(metaclass):
"""Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
def wrapper(cls):
return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
return wrapper


class _SwigNonDynamicMeta(type):
"""Meta class to enforce nondynamic attributes (no new attributes) for a class"""
__setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)


class SisRecSt(object):
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
initialState = _SisRecBase.SisRecSt_initialState
detectDrogue = _SisRecBase.SisRecSt_detectDrogue
detectMain = _SisRecBase.SisRecSt_detectMain
finalState = _SisRecBase.SisRecSt_finalState

def __init__(self, mainPres, MU=0.2):
_SisRecBase.SisRecSt_swiginit(self, _SisRecBase.new_SisRecSt(mainPres, MU))

def initializeBuffers(self, p0):
return _SisRecBase.SisRecSt_initializeBuffers(self, p0)

def enable(self):
return _SisRecBase.SisRecSt_enable(self)

def getState(self):
return _SisRecBase.SisRecSt_getState(self)

def update(self, x):
return _SisRecBase.SisRecSt_update(self, x)

def reset(self):
return _SisRecBase.SisRecSt_reset(self)
__swig_destroy__ = _SisRecBase.delete_SisRecSt

# Register SisRecSt in _SisRecBase:
_SisRecBase.SisRecSt_swigregister(SisRecSt)



Binary file not shown.
Empty file.
153 changes: 153 additions & 0 deletions tests/fixtures/acceptance/PJ_Valetudo/valetudo_drag_power_off.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
0.01,0.949
0.02,01.05
0.03,1.072
0.04,1.078
0.05,1.078
0.06,1.077
0.07,1.075
0.08,1.072
0.09,1.069
0.10,1.067
0.11,1.065
0.12,1.062
0.13,01.06
0.14,1.059
0.15,1.057
0.16,1.055
0.17,1.054
0.18,1.053
0.19,1.052
0.20,1.051
0.21,01.05
0.22,1.049
0.23,1.049
0.24,1.048
0.25,1.048
0.26,1.048
0.27,1.048
0.28,1.049
0.29,1.049
0.30,01.05
0.31,01.05
0.32,1.051
0.33,1.052
0.34,1.053
0.35,1.054
0.36,1.055
0.37,1.057
0.38,1.058
0.39,01.06
0.40,1.061
0.41,1.063
0.42,1.065
0.43,1.067
0.44,1.069
0.45,1.072
0.46,1.074
0.47,1.077
0.48,1.079
0.49,1.082
0.50,1.085
0.51,1.088
0.52,1.092
0.53,1.095
0.54,1.099
0.55,1.103
0.56,1.108
0.57,1.113
0.58,1.118
0.59,1.123
0.60,1.128
0.61,1.135
0.62,1.141
0.63,1.148
0.64,1.155
0.65,1.162
0.66,1.17
0.67,1.178
0.68,1.187
0.69,1.195
0.70,1.205
0.71,1.203
0.72,1.201
0.73,1.2
0.74,1.198
0.75,1.196
0.76,1.194
0.77,1.192
0.78,1.19
0.79,1.188
0.80,1.186
0.81,1.211
0.82,1.236
0.83,1.261
0.84,1.286
0.85,1.311
0.86,1.336
0.87,1.361
0.88,1.386
0.89,1.411
0.90,1.436
0.91,1.445
0.92,1.475
0.93,1.506
0.94,1.524
0.95,1.542
0.96,1.56
0.97,1.578
0.98,1.596
0.99,1.614
1.00,1.633
1.01,1.651
1.02,1.669
1.03,1.687
1.04,1.705
1.05,1.723
1.06,1.724
1.07,1.726
1.08,1.728
1.09,1.731
1.10,1.734
1.11,1.737
1.12,1.741
1.13,1.737
1.14,1.727
1.15,1.718
1.16,1.708
1.17,1.699
1.18,1.69
1.19,1.681
1.20,1.672
1.21,1.664
1.22,1.655
1.23,1.647
1.24,1.639
1.25,1.631
1.26,1.623
1.27,1.615
1.28,1.608
1.29,1.601
1.30,1.594
1.31,1.587
1.32,1.58
1.33,1.573
1.34,1.566
1.35,1.56
1.36,1.553
1.37,1.547
1.38,1.541
1.39,1.535
1.40,1.529
1.41,1.523
1.42,1.517
1.43,1.511
1.44,1.506
1.45,1.5
1.46,1.495
1.47,1.489
1.48,1.484
1.49,1.479
1.50,1.474
1.51,1.469
1.52,1.464
1.53,1.459
Loading

0 comments on commit 1c10d42

Please sign in to comment.