I NEVER leave my gun unattended in a vehicle. It is either on me or home in the safe, period. I don't fly and haven't had the opportunity of appearing before a judge either.
However-where I live a violation is usually a trespassing ticket. If it was a felony-I would have to change a lot of my habits/routines.
From my cold dead hands.........
NRA certified rifle, pistol and shotgun instructor.
Hunter education instructor