A flying toy can determine its orientation and position in a space by
calculating the distance to three reference points on the ground. The
flying toy uses three ultrasonic transmitters as the three reference
points. The distance to each ultrasonic transmitter is calculated by a
microprocessor integrated in the flying toy which records the time it
takes for the ultrasonic signal to travel from each of the ultrasonic
transmitters to the flying toy. Once the distances to each of the
ultrasonic transmitters are known, the microcontroller in the flying toy
determines the position in space of the flying toy using trilateration
methods. The flying toy can fly on autopilot according to predetermined
regions, and prevent crashes by using is positioning data.