Inertial Measurement Unit, which is the same principle as the Inertial Navigation Units (INU) used by airliners and sophisticated fighters as their primary navigation aid. GPS has stepped in, but in the military world, GPS can be jammed or turned off. INU is truly autonomous. I'm not up to date on the extent of their use today.
F = ma. Where "a" is a vector quantity, affecting the "velocity" vector quantity, which moves the aircraft's position. It's so simple in concept, but getting an INU to actually function reliably and accurately in something like a fighter jet is quite the trick. But once initialized with an initial position and velocity, any forces experienced by the aircraft causes it to follow Newton's laws and in a perfect world an INU should always have the exact position of the aircraft.
Having this kind of technology is something like a P3, in a cheap, miniature form is really incredible. In practice an IMU which is accelerometer centric, and can sense position effecting changes nearly instantly, plays great with GPS which will continually provide a relatively accurate position, but will need time to adjust to abrupt movements. To get the "Tripod in the Sky" trick right, even with some varying winds, has to involve the GPS and IMU very skillfully engineered to augment one another, which gives the amazing Gimble its location to do its magic from. Quite a good result DJI.