1. An anchoring device for use within a body cavity during a surgical procedure, the anchoring device comprising: an external assembly having a first magnetic component; an internal assembly having a second magnetic component, the internal assembly being sized for placement inside the body cavity; an electrical source having an electrical current, the electrical current being connected with one of the first magnetic component and the second magnetic component, the electrical current producing a magnetic field about the connected magnetic component, the magnetic field providing an attraction force to approximate the internal assembly and the external assembly; a controller operably connected to the electrical source; and a distance module configured to determine a distance between the external assembly and the internal assembly, the distance module being in operable communication with the controller, the controller providing an electrical resistance to control the electrical current in response to the distance determined by the distance module.