Custom pixhawk2 behavior when GPS lost

Hello,
I have a plane with pixhawk 2. I use mission planner.
How can I modify plane’s default behavior when GPS signal is lost? Should I implement some kind of custom functions on mission planner or it must be made with custom programming solution?
I will be grateful for the help and advice