It's actually not a trigonometric problem, it's a time-distance problem. Divide altitude by vertical speed (both are already in feet units) to get the minutes until touchdown. [You have to verify that vertical speed is indeed negative (going down) and then change it to positive for the calculation.). Convert ground speed from miles/hour to feet/minute [5280 * (GS / 60)]. Then multiply the feet/minute ground speed by the minutes-to-touchdown time. That's how many feet forward the plane will travel over the ground given the time it's going to remain in the air at this sink rate.
Now, to figure the touchdown coordinates based on current coordinates, direction (track? course?), and the distance...
Assuming that can be done (figuring the touchdown coordinates), can the software then figure out what's at those coordinates (land or water) and what its altitude is? If current altitude minus that altitude is less than the specified value... Land: GEAR DOWN! Water: GEAR UP!
Brian: If it's not possible, or too difficult, to determine the touchdown point, and whether it's land or water, or what its altitude is, then I feel a generic "CHECK GEAR!" message would still be helpful once the plane has broken through the specified AGL limit (even if that's AGL over the current terrain instead of the touchdown point). As I always say: an imperfect something is usually better than a perfect nothing. Or, as I've read in regards to plane building: "perfection is the enemy of completion".