Skip to content

Commit 2ffe202

Browse files
committed
Merge remote-tracking branch 'origin/develop' into enh/sim-encoding
2 parents 8926a83 + 5856353 commit 2ffe202

File tree

4 files changed

+21
-37
lines changed

4 files changed

+21
-37
lines changed

CHANGELOG.md

+1-17
Original file line numberDiff line numberDiff line change
@@ -36,27 +36,11 @@ Attention: The newest changes should be on top -->
3636

3737
### Changed
3838

39-
-
40-
41-
### Fixed
42-
43-
-
44-
45-
## [v1.6.2] - 2024-11-08
46-
47-
### Added
48-
49-
5039
- ENH: Expansion of Encoders Implementation for Full Flights. [#679](https://github.com/RocketPy-Team/RocketPy/pull/679)
51-
- ENH: Implement optional plot saving [#597](https://github.com/RocketPy-Team/RocketPy/pull/597)
52-
53-
### Changed
54-
55-
-
5640

5741
### Fixed
5842

59-
-
43+
- BUG: Sideslip Angle and Damping Coefficient Calculation [#729](https://github.com/RocketPy-Team/RocketPy/pull/729)
6044

6145
## [v1.6.2] - 2024-11-08
6246

rocketpy/rocket/aero_surface/generic_surface.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ def compute_forces_and_moments(
273273

274274
# Angles of attack and sideslip
275275
alpha = np.arctan2(stream_velocity[1], stream_velocity[2])
276-
beta = np.arctan2(-stream_velocity[0], stream_velocity[2])
276+
beta = np.arctan2(stream_velocity[0], stream_velocity[2])
277277

278278
# Compute aerodynamic forces and moments
279279
lift, side, drag, pitch, yaw, roll = self._compute_from_coefficients(
@@ -283,9 +283,9 @@ def compute_forces_and_moments(
283283
beta,
284284
stream_mach,
285285
reynolds,
286-
omega[0],
287-
omega[1],
288-
omega[2],
286+
omega[0], # q
287+
omega[1], # r
288+
omega[2], # p
289289
)
290290

291291
# Conversion from aerodynamic frame to body frame

rocketpy/rocket/aero_surface/linear_generic_surface.py

+15-15
Original file line numberDiff line numberDiff line change
@@ -62,22 +62,22 @@ def __init__(
6262
Coefficient of lift derivative with respect to yaw rate.
6363
Default is 0.\n
6464
cQ_0: callable, str, optional
65-
Coefficient of pitch moment at zero angle of attack.
65+
Coefficient of side force at zero angle of attack.
6666
Default is 0.\n
6767
cQ_alpha: callable, str, optional
68-
Coefficient of pitch moment derivative with respect to angle of
68+
Coefficient of side force derivative with respect to angle of
6969
attack. Default is 0.\n
7070
cQ_beta: callable, str, optional
71-
Coefficient of pitch moment derivative with respect to sideslip
71+
Coefficient of side force derivative with respect to sideslip
7272
angle. Default is 0.\n
7373
cQ_p: callable, str, optional
74-
Coefficient of pitch moment derivative with respect to roll rate.
74+
Coefficient of side force derivative with respect to roll rate.
7575
Default is 0.\n
7676
cQ_q: callable, str, optional
77-
Coefficient of pitch moment derivative with respect to pitch rate.
77+
Coefficient of side force derivative with respect to pitch rate.
7878
Default is 0.\n
7979
cQ_r: callable, str, optional
80-
Coefficient of pitch moment derivative with respect to yaw rate.
80+
Coefficient of side force derivative with respect to yaw rate.
8181
Default is 0.\n
8282
cD_0: callable, str, optional
8383
Coefficient of drag at zero angle of attack. Default is 0.\n
@@ -258,11 +258,11 @@ def total_coefficient(
258258
):
259259
return (
260260
c_p(alpha, beta, mach, reynolds, pitch_rate, yaw_rate, roll_rate)
261-
* pitch_rate
261+
* roll_rate
262262
+ c_q(alpha, beta, mach, reynolds, pitch_rate, yaw_rate, roll_rate)
263-
* yaw_rate
263+
* pitch_rate
264264
+ c_r(alpha, beta, mach, reynolds, pitch_rate, yaw_rate, roll_rate)
265-
* roll_rate
265+
* yaw_rate
266266
)
267267

268268
return Function(
@@ -372,38 +372,38 @@ def _compute_from_coefficients(
372372
# Compute aerodynamic forces
373373
lift = dyn_pressure_area * self.cLf(
374374
alpha, beta, mach, reynolds, pitch_rate, yaw_rate, roll_rate
375-
) - dyn_pressure_area_damping * self.cLd(
375+
) + dyn_pressure_area_damping * self.cLd(
376376
alpha, beta, mach, reynolds, pitch_rate, yaw_rate, roll_rate
377377
)
378378

379379
side = dyn_pressure_area * self.cQf(
380380
alpha, beta, mach, reynolds, pitch_rate, yaw_rate, roll_rate
381-
) - dyn_pressure_area_damping * self.cQd(
381+
) + dyn_pressure_area_damping * self.cQd(
382382
alpha, beta, mach, reynolds, pitch_rate, yaw_rate, roll_rate
383383
)
384384

385385
drag = dyn_pressure_area * self.cDf(
386386
alpha, beta, mach, reynolds, pitch_rate, yaw_rate, roll_rate
387-
) - dyn_pressure_area_damping * self.cDd(
387+
) + dyn_pressure_area_damping * self.cDd(
388388
alpha, beta, mach, reynolds, pitch_rate, yaw_rate, roll_rate
389389
)
390390

391391
# Compute aerodynamic moments
392392
pitch = dyn_pressure_area_length * self.cmf(
393393
alpha, beta, mach, reynolds, pitch_rate, yaw_rate, roll_rate
394-
) - dyn_pressure_area_length_damping * self.cmd(
394+
) + dyn_pressure_area_length_damping * self.cmd(
395395
alpha, beta, mach, reynolds, pitch_rate, yaw_rate, roll_rate
396396
)
397397

398398
yaw = dyn_pressure_area_length * self.cnf(
399399
alpha, beta, mach, reynolds, pitch_rate, yaw_rate, roll_rate
400-
) - dyn_pressure_area_length_damping * self.cnd(
400+
) + dyn_pressure_area_length_damping * self.cnd(
401401
alpha, beta, mach, reynolds, pitch_rate, yaw_rate, roll_rate
402402
)
403403

404404
roll = dyn_pressure_area_length * self.clf(
405405
alpha, beta, mach, reynolds, pitch_rate, yaw_rate, roll_rate
406-
) - dyn_pressure_area_length_damping * self.cld(
406+
) + dyn_pressure_area_length_damping * self.cld(
407407
alpha, beta, mach, reynolds, pitch_rate, yaw_rate, roll_rate
408408
)
409409

rocketpy/simulation/flight.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2699,7 +2699,7 @@ def angle_of_sideslip(self):
26992699
# Stream velocity in standard aerodynamic frame
27002700
stream_velocity = -self.stream_velocity_body_frame
27012701
beta = np.arctan2(
2702-
-stream_velocity[:, 0],
2702+
stream_velocity[:, 0],
27032703
stream_velocity[:, 2],
27042704
) # x-z plane
27052705
return np.column_stack([self.time, np.rad2deg(beta)])

0 commit comments

Comments
 (0)