Precision Landing Yaw Correction

Hello .

I want to make a precision landing where I took off in a project.

I use IR-LOCK for this and it lands fine.

The problem is that the yaw correction needs to be done automatically along the RTL or terrain with the angle I’m running from.

How can I land with the same angle I escaped from?