Skip to content

Commit deb7916

Browse files
enh: use same duration (30 min) for all benchmark signals (#90)
1 parent 80f38fd commit deb7916

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

src/smsfusion/benchmark/_benchmark.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ def benchmark_pure_attitude_beat_202311A(
351351
Generate a benchmark with pure attitude for performance testing of INS/AHRS/VRU
352352
sensor fusion algorithms.
353353
354-
The benchmark scenario is 20 minutes long. It generates Euler angles
354+
The benchmark scenario is 30 minutes long. It generates Euler angles
355355
(roll, pitch, and yaw), and the corresponding accelerometer and
356356
gyroscope signals. Note that the generated motion is pure rotations.
357357
@@ -395,7 +395,7 @@ def benchmark_pure_attitude_beat_202311A(
395395
Passive rotations mean that the frame itself is rotating, not the object
396396
within the frame.
397397
"""
398-
duration = 1200.0 # 20 minutes
398+
duration = 1800.0 # 30 minutes
399399
amplitude = np.radians(np.array([0.0, 0.0, 0.0, 5.0, 5.0, 5.0]))
400400
mean = np.radians(np.array([0.0, 0.0, 0.0, 0.0, 0.0, 0.0]))
401401
phase = np.radians(np.array([0.0, 0.0, 0.0, 0.0, 45.0, 90.0]))
@@ -418,7 +418,7 @@ def benchmark_pure_attitude_chirp_202311A(
418418
Generate a benchmark with pure attitude for performance testing of INS/AHRS/VRU
419419
sensor fusion algorithms.
420420
421-
The benchmark scenario is 20 minutes long. It generates Euler angles
421+
The benchmark scenario is 30 minutes long. It generates Euler angles
422422
(roll, pitch, and yaw), and the corresponding accelerometer and
423423
gyroscope signals. Note that the generated motion is pure rotations.
424424
@@ -463,7 +463,7 @@ def benchmark_pure_attitude_chirp_202311A(
463463
Passive rotations mean that the frame itself is rotating, not the object
464464
within the frame.
465465
"""
466-
duration = 1200.0 # 20 minutes
466+
duration = 1800.0 # 30 minutes
467467
amplitude = np.radians(np.array([0.0, 0.0, 0.0, 5.0, 5.0, 5.0]))
468468
mean = np.radians(np.array([0.0, 0.0, 0.0, 0.0, 0.0, 0.0]))
469469
phase = np.radians(np.array([0.0, 0.0, 0.0, 0.0, 45.0, 90.0]))

tests/test_benchmark.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -302,12 +302,12 @@ def test_pure_translation(self):
302302

303303
def test_benchmark_pure_attitude_beat_202311A():
304304
signature_signal, _, _ = benchmark.BeatSignal(0.1, 0.01)(
305-
np.arange(0.0, 1200.0, 1.0 / 10.24)
305+
np.arange(0.0, 1800.0, 1.0 / 10.24)
306306
)
307307

308308
t, euler, acc, gyro = benchmark.benchmark_pure_attitude_beat_202311A()
309309

310-
assert len(t) == int(1200 * 10.24)
310+
assert len(t) == int(1800 * 10.24)
311311
assert euler.shape == (len(t), 3)
312312
assert acc.shape == (len(t), 3)
313313
assert gyro.shape == (len(t), 3)
@@ -317,12 +317,12 @@ def test_benchmark_pure_attitude_beat_202311A():
317317

318318
def test_benchmark_pure_attitude_chirp_202311A():
319319
signature_signal, _, _ = benchmark.ChirpSignal(0.25, 0.01)(
320-
np.arange(0.0, 1200.0, 1.0 / 10.24)
320+
np.arange(0.0, 1800.0, 1.0 / 10.24)
321321
)
322322

323323
t, euler, acc, gyro = benchmark.benchmark_pure_attitude_chirp_202311A()
324324

325-
assert len(t) == int(1200 * 10.24)
325+
assert len(t) == int(1800 * 10.24)
326326
assert euler.shape == (len(t), 3)
327327
assert acc.shape == (len(t), 3)
328328
assert gyro.shape == (len(t), 3)

0 commit comments

Comments
 (0)