Why Does my drone disregard the angle I told it to fly

# 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

I’m sorry, what angle are you talking about? I just see some NO_VALUE there, not sure what they mean :thinking:

Here is a picture of a simulated flight (px4_sitl from the main branch a few days ago) with the 4 mission items labeled in alphabetical order. Why did the drone not fly on the shortest path (at an angle) from A to B like it did from C to D? If you play through the flight, you will also see that the drone loiters around point B a bit before continuing.

NO_VALUE = float(“nan”)

Oh, so it goes to the correct altitude first before starting to move?

This might be “a feature”. For fixedwing we had at some point a parameter to choose between zeroth order hold and first order hold, I think, but I can’t find that now.

For multicopter I’m not 100% certain what the behavior is or should be.

I’ll tag @bresch, he might know.

We updated to the latest main branch again today and it magically started working as expected. So apparently, whatever was causing the problem was fixed within the last week.

1 Like