# Flies to line colinear of the tranesct
mission_items.append(
MissionItem(
latitude_deg=lat_b,
longitude_deg=lon_b,
relative_altitude_m=SAFE_ALTITUDE,
speed_m_s=SPEED,
is_fly_through=True,
gimbal_pitch_deg=NO_VALUE,
gimbal_yaw_deg=NO_VALUE,
camera_action=MissionItem.CameraAction.NONE,
loiter_time_s=NO_VALUE,
camera_photo_interval_s=NO_VALUE,
acceptance_radius_m=NO_VALUE,
yaw_deg=NO_VALUE,
camera_photo_distance_m=NO_VALUE,
)
)
# flies at an angle of 60 degrees towards the start of the transect
mission_items.append(
MissionItem(
latitude_deg=c.latitude,
longitude_deg=c.longitude,
relative_altitude_m=relative_vertical,
speed_m_s=parameters.speed,
is_fly_through=True,
gimbal_pitch_deg=NO_VALUE,
gimbal_yaw_deg=NO_VALUE,
camera_action=MissionItem.CameraAction.NONE,
loiter_time_s=NO_VALUE,
camera_photo_interval_s=NO_VALUE,
acceptance_radius_m=NO_VALUE,
yaw_deg=NO_VALUE,
camera_photo_distance_m=NO_VALUE,
)
)
# Flies at requested speed and requested altitude to the end of the transect
mission_items.append(
MissionItem(
latitude_deg=d.latitude,
longitude_deg=d.longitude,
relative_altitude_m=relative_vertical,
speed_m_s=SPEED,
is_fly_through=True,
gimbal_pitch_deg=NO_VALUE,
gimbal_yaw_deg=NO_VALUE,
camera_action=MissionItem.CameraAction.NONE,
loiter_time_s=NO_VALUE,
camera_photo_interval_s=NO_VALUE,
acceptance_radius_m=NO_VALUE,
yaw_deg=NO_VALUE,
camera_photo_distance_m=NO_VALUE,
)
)
# ascends at 60 degrees towards the safe altitude and returns to launch
mission_items.append(
MissionItem(
latitude_deg=lat_e,
longitude_deg=lon_e,
relative_altitude_m=SAFE_ALTITUDE,
speed_m_s=SPEED,
is_fly_through=True,
gimbal_pitch_deg=NO_VALUE,
gimbal_yaw_deg=NO_VALUE,
camera_action=MissionItem.CameraAction.NONE,
loiter_time_s=NO_VALUE,
camera_photo_interval_s=NO_VALUE,
acceptance_radius_m=NO_VALUE,
yaw_deg=NO_VALUE,
camera_photo_distance_m=NO_VALUE,
)
)
this is the code i wrote it flies correctly to the first point but then disregards the first angle and goes straight down and over to the line we are researching, however the second angle going back up works fine and it returns to the origin.
Flight Review (px4.io) // here are the logs