Dynamic Home Point

Hello Everyone!
I want to be able to update the location of the Home at any moment
Suppose I fly the quadcopter from a moving boat
This feature exists in DJI quads with this name “Dynamic Home Point”, but I can’t figure out how to implement it in Pixhawk
thanks

It can be done by lua.

I use this method but there is a big problem
Usually, the distance from my quad to the last point of home is more than 5 minutes , When the mission ends and the quad wants to return home, it will take more than 5 minutes to return from the last point of the mission to home.
At this stage, Quad does not receive a new command
The home is still moving and I can no longer give the new location to the quad
I hope you understand what I mean

To be more precise, the quad will update the home location as long as the Mission is in progress
When return to launch is activated, it will not update the home location from this moment on, in fact the home point becomes immutable.
When the quad reaches the home point, the ship has left there for 5 minutes ;(

You need to activate the “follow me mode” using lua, and again in lua switch to landing once you are close enough.