Skip to content

Commit fcc1946

Browse files
fix(parachute): set auto parachute CD to 0.75 fallback
1 parent 0c4045c commit fcc1946

1 file changed

Lines changed: 4 additions & 12 deletions

File tree

rocketserializer/components/parachute.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -70,17 +70,9 @@ def search_parachutes(bs):
7070

7171

7272
def search_cd_chute_if_auto(bs):
73-
# if the parachute cd is st to "auto", then look for the cd in the next tag
74-
# return float(
75-
# next(
76-
# filter(lambda x: x.text.replace(".", "").isnumeric(), bs.findAll("cd"))
77-
# ).text
78-
# )
79-
80-
# TODO: for the future, we need to check if the ork object has a drag coefficient
81-
82-
# simply return 1.0
73+
# if the parachute cd is set to "auto", OpenRocket defaults to 0.75 (flat) or 1.5 (dome).
74+
# Since we cannot easily deduce the type, 0.75 is the most common standard parachute CD in OR.
8375
logger.warning(
84-
"cd auto: the cd is set to 1.0 for parachute %s", getattr(bs.find("name"), "text", "")
76+
"cd auto: the cd is set to 0.75 for parachute %s", getattr(bs.find("name"), "text", "Unknown")
8577
)
86-
return 1.0
78+
return 0.75

0 commit comments

Comments
 (0)