What is the reference used when measuring flight speed?
Speed of a plane is actually measured in a number of different ways, and relative to different things. Here is a summary of the different types:


Indicated Airspeed (IAS). This is the number shown on the instrument that measures airspeed, and isn't really relative to anything.
Rectified Airspeed (RAS) or Calibrated Air Speed (CAS) This is IAS corrected for known errors in the instrument and the measurement system.
True Air Speed This is the speed relative to the air around the aircraft; usually found by correcting the RAS for pressure and some other errors.
Ground Speed This is the speed relative to the ground, or a fixed point on the earth ('imaginary grid). Its the vector addition of the True Airspeed (and direction) plus the wind speed (and direction). In olden days this was estimated from the Airspeed and the wind velocity, or through dead reckoning navigation, but now it is trivially found from GPS or other navigation aids.


Planes use different ones of these for different purposes. Measurements relative to the fixed stars are not generally useful until you are in the realm of space travel.