Skip to content

Commit fb94874

Browse files
committed
DEV: format and changelog
1 parent cf494c4 commit fb94874

2 files changed

Lines changed: 20 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ Attention: The newest changes should be on top -->
3838

3939
- ENH: _MotorPrints inheritance - issue #460 [#828](https://github.com/RocketPy-Team/RocketPy/pull/828)
4040
- MNT: fix deprecations and warnings [#829](https://github.com/RocketPy-Team/RocketPy/pull/829)
41+
- Enh/zero inertia tensor check [#833](https://github.com/RocketPy-Team/RocketPy/pull/833)
4142

4243
### Fixed
4344

rocketpy/rocket/rocket.py

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -292,11 +292,25 @@ def __init__( # pylint: disable=too-many-statements
292292
self.I_12_without_motor = inertia[3]
293293
self.I_13_without_motor = inertia[4]
294294
self.I_23_without_motor = inertia[5]
295-
inertia_matrix = Matrix([
296-
[self.I_11_without_motor, self.I_12_without_motor, self.I_13_without_motor],
297-
[self.I_12_without_motor, self.I_22_without_motor, self.I_23_without_motor],
298-
[self.I_13_without_motor, self.I_23_without_motor, self.I_33_without_motor],
299-
]) # Initial Inertia Tensor determinant singularity check
295+
inertia_matrix = Matrix(
296+
[
297+
[
298+
self.I_11_without_motor,
299+
self.I_12_without_motor,
300+
self.I_13_without_motor,
301+
],
302+
[
303+
self.I_12_without_motor,
304+
self.I_22_without_motor,
305+
self.I_23_without_motor,
306+
],
307+
[
308+
self.I_13_without_motor,
309+
self.I_23_without_motor,
310+
self.I_33_without_motor,
311+
],
312+
]
313+
) # Initial Inertia Tensor determinant singularity check
300314
if abs(inertia_matrix) == 0:
301315
raise ValueError(
302316
"The rocket inertia tensor is singular (determinant is zero). "

0 commit comments

Comments
 (0)