Plane firmware prior to 4.1 supports failsafes generated by a polygonal GeoFence (boundaries described by latitude/longitude and altitude) to prevent the vehicle from traveling higher or further than desired, or into unwanted areas. See Geo-Fencing in Plane

Firmware versions 4.1 and later, support a home based Cylindrical and Polygonal or Cylindrical Inclusion and/or Exclusion regions. Inclusion and Exclusion Fences are defined easily in Mission Planner under the PLAN screen and loaded to the autopilot, using the FENCES item in the drop down box, just like Missions or Rally Points are planned.