as2_python_api.modules.go_to_gps_module module

Go to GPS Module.

class as2_python_api.modules.go_to_gps_module.GoToGpsModule(drone: DroneInterface)

Bases: ModuleBase, GoToBehavior

Go to GPS Module.

go_to_gps(lat: float, lon: float, alt: float, speed: float) bool

Go to GPS point. Blocking call.

Parameters:
  • lat (float) – latitude (deg) of the point

  • lon (float) – longitude (deg) of the point

  • alt (float) – altitude (m) of the point

  • speed (float) – speed (m/s) to go to the point

Returns:

True if was accepted, False otherwise

Return type:

bool

go_to_gps_path_facing(lat: float, lon: float, alt: float, speed: float) bool

Go to GPS point. With desired path facing. Blocking call.

Parameters:
  • lat (float) – latitude (deg) of the point

  • lon (float) – longitude (deg) of the point

  • alt (float) – altitude (m) of the point

  • speed (float) – speed (m/s) to go to the point

Returns:

True if was accepted, False otherwise

Return type:

bool

go_to_gps_point(waypoint: list[float], speed: float) bool

Go to GPS point. Blocking call.

Parameters:
  • point (list[float]) – GPS point [lat, lon, alt]

  • speed (float) – speed (m/s) to go to the point

Returns:

True if was accepted, False otherwise

Return type:

bool

go_to_gps_point_path_facing(waypoint: list[float], speed: float) bool

Go to GPS point. With desired path facing. Blocking call.

Parameters:
  • point (list[float]) – GPS point [lat, lon, alt]

  • speed (float) – speed (m/s) to go to the point

Returns:

True if was accepted, False otherwise

Return type:

bool

go_to_gps_point_with_yaw(waypoint: list[float], speed: float, angle: float) bool

Go to GPS point. With desired yaw angle. Blocking call.

Parameters:
  • point (list[float]) – GPS point [lat, lon, alt]

  • speed (float) – speed (m/s) to go to the point

  • yaw_angle (float) – go to desired yaw angle (rad)

Returns:

True if was accepted, False otherwise

Return type:

bool

go_to_gps_with_yaw(lat: float, lon: float, alt: float, speed: float, angle: float) bool

Go to GPS point. With desired yaw angle. Blocking call.

Parameters:
  • lat (float) – latitude (deg) of the point

  • lon (float) – longitude (deg) of the point

  • alt (float) – altitude (m) of the point

  • speed (float) – speed (m/s) to go to the point

  • yaw_angle (float) – go to desired yaw angle (rad)

Returns:

True if was accepted, False otherwise

Return type:

bool