Hi Sam,

People are suggesting the solution is hard. I am giving them the benefit of the doubt.

My understanding is that an action is triggered when the drone reaches an exact location. If the waypoint is the vertex of a polygon, then drone would reach the point and the action is triggered.

If the waypoint is instead a control point of a bezier curve, the drone would never hit the vertex (unless it is a straight line). So the engineers have declared it a hard problem.

So yesterday I thought why is this hard? If it is a non-standard curve, then changing the code to trigger on the parametric instead of a location would work. I can see why this code would be non-trivial, but not hard. This was my original post.

Then everyone said the curve is a bezier, This makes the solution trivial, since you would not have to change the action trigger code at all! Just make the trigger location set to the first recursive subdivide instead of the waypoint, and you could minimize the code change.

I could be wrong about why this solution is deemed to be hard.

I forgot to mention how recursive subdivide works. The endpoints of the curve are always on the curve, so therefore the drone would always hit the endpoint. The bezier algorithm splits the curve into two subcurve. The endpoint of the first curve is guaranteed to always be on the curve at t=0.5. This is the only location you need to calculate.

Actually the solution is simpler than that.

For a 3 vertex bezier, (b0, b1, b2), the location will be midpoint(midpoint(b0,b1),midpoint(b1,b2))

This point is on the curve at t=0.5, so the drone following a bezier curve will go through this point.