The title says it all: I wonder, does the 5th iPod Touch generation have a magnetometer? There was an Availability matrix for iOS devices up to iPhone 4 / iPad 2 / iPod touch 4G — The 4G didn't have a magnetometer sensor.
Here is table about which device has which sensor.
Look to magnetometer compatibility.
So sensor is absent on iphone + iphone 3g + any iPod including iPod 6 gen.