imported post
There is no distance requirement. The speed limits only have to be posted at all if they vary from the statutory limits for the type of road you're on. Where that varies, the signs have to be posted at the beginning of every "zone", and there's no telling what that means. There are ways to minimize the damage, and if you were charged with reckless or improper driving as a result of excessive speed, those are crimes and you should have a lawyer.
Basically, while you were detained, that was a valid arrest. But whether the police have reason to disarm you only for "officer safety" depends on the level and scope of the arrest. A mere traffic stop does not trigger that level of detention in my opinion.
The problem is that you're in the position of having to defend yourself having been ticketed for speeding, and the gun issue is irrelevant to that charge. The only thing you could do by spouting off about that during your trial on the speeding charge is wind up worse off than you would have been.
Technically, what the cop did, as a civil matter, is called, "trespass to chattels". That is he unreasonably and unlawfully interfered with your right to dominion and control over your personal property. But you didn't suffer any damages. No harm, no foul. If he hadn't given the gun back in the same condition, or if he'd dumped your cartridges out and thrown them away or some such, then you'd have a case.
My suggestion is that you show up early, talk to the Commonwealth's Attorney on duty that day, explain that you were co-operative and whatever excuses you've got and ask him for a special dispensation of grace, assuming of course that the cop will corroborate what you've said. He'll probably knock it down to some lesser amount of speeding violation for you.