The answers above were all we had until the December update to Litchi (For Android - January for IOS) Now it call all be done easily right in the app.
I found out how to do it, but I haven't tested the result yet. There are two ways to do this. The first in the easier way, but it won't be as accurate. That may not matter depending on the type of mission.
The important thing to remember is that it ONLY measures the distance AGL at each waypoint, not all along the path. If you live in an area where there are a lot of sudden rises and drops in elevation, you need LOTS of waypoints fairly close together.
Method one: Using the draw feature draw your pattern that you want to fly with your finger. Then select how far apart you want the waypoints to be. To be on the safe side, I stayed with 250 feet or less. That will give you a lot of points where the distance AGL is measured. After that, change the tool icon to the square box icon with the + sign in the lower right corner. at the bottom of the screen some options appear. Tap on "SELECT ALL" and all the waypoints become selected. Then Click on "EDIT" from that same lower menu. A Box will pop up which says, "Batch Waypoint Settings". The first item in that box is called "Altitude. It will say "relative to" and then you can select. By Default the selection is "HOME". Change that to "GROUND" and you will see all the Altitudes that you had set will be adjusted so they are relative to the ground beneath them after you click OK. Some values may be negative numbers. This is fine. It just means that the altitude at that particular point is lower than where you took off from.
Method two: This is almost the same, but make your mission in Mission Hub. The reason that method 1 is easier is that the draw feature is not available in Mission Hub. That means that you have to set a whole lot more waypoints if you want to keep flying at an accurate altitude over a long distance Then download your mission in Litchi on your tablet or phone and use the same process as method one. Once you save it, it will update on Mission Hub as well. Using this method, it is easier to create a much more detailed flight path. (At least for me)
Always make sure that you have set your altitude (before adjustments for AGL changes) high enough so you don't hit the tops of the highest trees in the area.