Apple have gotten wise to 'Jailbreaking'....whilst it may be legal, if you jailbreak and then plug it into a PC running iTunes, it will 'brick' the phone and you will have to send it back to Apple to be 'restored'.....at a cost!!
Also....despite the great accelerometer the phone has, it would be rather useless for attitude info, as it's not a gyroscope...