Skip to content

Commit 92922c6

Browse files
authored
Merge pull request #428 from RocketPy-Team/bug/nosecone-print
BUG: Remove NoseCone Warning
2 parents 1fa8de1 + 5362247 commit 92922c6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

rocketpy/rocket/aero_surface.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from abc import ABC, abstractmethod
22
import warnings
33

4-
import matplotlib.pyplot as plt
54
import numpy as np
65
from scipy.optimize import fsolve
76

@@ -426,12 +425,13 @@ def final_shape(x):
426425

427426
# Evaluate final geometry parameters
428427
self.shape_vec = [nosecone_x, nosecone_y]
429-
self._length = nosecone_x[-1]
430-
print(
431-
"Due to the chosen bluffness ratio, the nose cone length was reduced to {:.3f} m.".format(
432-
self.length
428+
if abs(nosecone_x[-1] - self.length) >= 0.001: # 1 milimiter
429+
self._length = nosecone_x[-1]
430+
print(
431+
"Due to the chosen bluffness ratio, the nose cone length was reduced to m.".format(
432+
self.length
433+
)
433434
)
434-
)
435435
self.fineness_ratio = self.length / (2 * self.base_radius)
436436

437437
return None

0 commit comments

Comments
 (0)