Terrain following in GUIDED

I would like to use terrain following (using terrain altitude data provided by the ground station) in guided mode, but it doesn´t seem to work.
I tried it in MissionPlanners built in simulator using AC4.1.5-rc1 and guided always follows above home altitude. I used the following parameters:
TERRAIN_ENABLE, 1
WPNAV_RFND_USE, 0
also changed terrain spacing and terrain margin, but these shouldn´t effect the problem.
Terrain following works just fine in AUTO and RTL.

Do I have to change anything else to activate terrain following in guided, or is this an issue?

Which command are you using to fly to a location?
AFAIK, SET_POSITION_TARGET_GLOBAL_INT should work, implemented in source code.
Position and velocity control is not supported though.
But I think, position only part of this command should work.
Let us know if it doesn’t work for you.

I am simply using MissionPlanners right click “Fly To Here” option, but have no idea which command it sends to AC. :grinning:
I would expect it to fly to location using terrain following if TERRAIN_ENABLE is set to 1.

Got it.
Probably it sends the command as MAV_CMD_NAV_WAYPOINT encapsulated as COMMAND_LONG.
You can simply put a MAV_CMD_NAV_LOITER_UNLIM in your mission if you want to fly and wait at the specific location, though.

How can i use the SET_POSITION_TARGET_GLOBAL_INT in MP, as when creating a plan in MP i dont have that option?