Skip to content

Commit

Permalink
Merge pull request #124 from deepskies/bug/starting_theta
Browse files Browse the repository at this point in the history
Bug/starting theta
  • Loading branch information
beckynevin authored Sep 6, 2023
2 parents 9e2b5cb + a903806 commit ec0b68d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deepbench/physics_object/pendulum.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,11 +299,11 @@ def simulate_pendulum_dynamics(self, time: Union[float, np.array]):
pendulum_arm_length_values.any() > 0
), "f{pendulum_arm_length_values} not greater than zero"
theta_time = starting_angle_values * np.cos(
np.sqrt(acceleration_values / pendulum_arm_length_values)
np.sqrt(acceleration_values / pendulum_arm_length_values) * time
)

# Calculate x using the modified parameters and time
return pendulum_arm_length_values * np.sin(theta_time * time)
return pendulum_arm_length_values * np.sin(theta_time)

def displayObject(self, time: Union[float, np.array]):
"""
Expand Down

0 comments on commit ec0b68d

Please sign in to comment.