the main reason why you'd be able to overturn a speeding ticket in the first scenario you mentioned, is because the burden is on law enforcement to prove you are breaking the law. It's one of the last few bastions where the intangible burden of proof remains high and squarely placed on law enforcement.