Skip to content

Commit

Permalink
fix: fix RTH transition duration
Browse files Browse the repository at this point in the history
  • Loading branch information
ntamas committed Jul 9, 2023
1 parent 16e3ddf commit 3748294
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/modules/sbstudio/plugin/operators/return_to_home.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from sbstudio.plugin.constants import Collections
from sbstudio.plugin.model.formation import create_formation
from sbstudio.plugin.model.safety_check import get_proximity_warning_threshold
from sbstudio.plugin.utils.evaluator import create_position_evaluator

from .base import StoryboardOperator
from .takeoff import create_helper_formation_for_takeoff_and_landing
Expand Down Expand Up @@ -86,8 +87,11 @@ def _run(self, storyboard, *, context) -> bool:
if not drones:
return False

with create_position_evaluator() as get_positions_of:
source = get_positions_of(drones, frame=self.start_frame)

first_frame = storyboard.frame_start
source, target, _ = create_helper_formation_for_takeoff_and_landing(
_, target, _ = create_helper_formation_for_takeoff_and_landing(
drones,
frame=first_frame,
base_altitude=self.altitude,
Expand Down

0 comments on commit 3748294

Please sign in to comment.