Skip to content

Commit

Permalink
Docstring for update_s method
Browse files Browse the repository at this point in the history
  • Loading branch information
Andeshog committed Apr 11, 2024
1 parent 6193872 commit 2ff478b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions guidance/hybridpath_guidance/hybridpath_guidance/hybridpath.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,19 @@ def _calculate_subpaths(self) -> None:

@staticmethod
def update_s(path: Path, dt: float, u_desired: float, s: float) -> float:
"""
Update the position along the hybrid path based on the desired velocity and time step.
Args:
path (Path): The hybrid path.
dt (float): The time step.
u_desired (float): The desired velocity.
s (float): The current position along the hybrid path.
Returns:
float: The updated position along the hybrid path.
"""
signals = HybridPathSignals(path, s)
v_s = signals.get_vs(u_desired)
s_new = s + v_s * dt
Expand Down

0 comments on commit 2ff478b

Please sign in to comment.