Landing and loiter to alt weirdness

Was out doing some test flying today. For the most part things went great, but there are a couple things that confuse me:

There have been a few instances on auto-land where the plane aggressively pitches down, nearly crashes, pitches back up and goes on for a fairly smooth landing. I have been trying to figure this out by looking at the logs,but it is hard to find the info I need. Is there a place where all the parameters in the dataflash logs are documented? If found this, but it is woefully incomplete (and copter specific it seems)

I can see a place in the log where TECS.hdem (demanded height I’m guessing) makes a sharp dip downward, meanwhile ATT.DesPitch nearly hits the pitch_min value. This corresponds to when flaps come in. Can I tell from the dataflash log when the currently executing waypoint changes? Why would it so sharply pitch down? Is there a way to tell when it does the flare?

Doing loiter_to_alt has some strange behavior, especially on descending nodes. It seem that it flies any random pattern around the waypoint, figure 8s are common. It also often goes way beyond the loiter radius. Once target altitude is reached it executes the rest of the mission nicely. Why might the be happening? Is target lat/long given anywhere in the log?

I can provide logs if required.