The directional gyro sounds similar in function as a swing meter. Had an interesting thread on them here. Swing meters wtf?
Both the swing meter and the directional gyro sense a change in direction.
A directional gyro sends a signal to be used in some automated process. A swing meter provides an indication on a display for a human to read.
Neither the swing meter or the directional gyro meet the definition of a compass as neither one is “an instrument for indicating a horizontal reference direction…”