Was flying my Spark over the LI Sound this evening, the aircraft was about 340 ft high and 750 ft over the water from my location on the beach. I suddenly due to some unknown reason got a compass error followed by an IMU error and it switched into ATTI mode. I began to panic and barely got the aircraft back to shore safely after trying to fly in Sport mode to get back quickly.
Can't understand why I would get a compass error way out over water with no magnetic material anywhere close to the aircraft. This is why I suspect some latent defect. I have attached some possible useful photos below.
Could this be a defective aircraft? Can anyone help and/or recommend a course of action?

Can't understand why I would get a compass error way out over water with no magnetic material anywhere close to the aircraft. This is why I suspect some latent defect. I have attached some possible useful photos below.
Could this be a defective aircraft? Can anyone help and/or recommend a course of action?


