I have a Pentax K5 with its default lens, and a ball-mount tripod that can hold 17 lbs max. I need to take two shots in two different locations, and have the camera in the same spatial orientation (angles, rotation, height, distance, etc...) relative to a flat vertical surface in each location. Are there any best practices for measuring the camera orientation?
From the comments, a spirit level is a good idea. Even better is a laser level, which can more accurately help you level the tripod. Once the tripod is level, you can move the head to the prescribed angle to recreate your shot. For something like this a ball head is going to make the process more difficult; a 3-way head, such as Elenesski suggests, would be a much better choice because you can better control each direction of movement.
Even better than a 3-way head would be the Arca-Swiss Cube, which is specifically designed for this kind of problem where you need to accurately recreate position.
I will leave it as an exercise for the reader to discover the price of the Cube because they should be prepared to faint before looking.
Have you considered renting/using a surveyor's transit level? The tripod has a 5/8 inch scree and, if this is critical, you could jury rig something so that the postion of the transit and camera stay in the same relative position on the tripod.
e.g. a flat metal bar with a hole for the top of the tripod screw to protrude and be locked on and holes at either end, one with short 5/8 bolt for the transit and the other with 1/4 20 bolt for the camera.
Once the transit and camera are fixed on the bar, they stay that way, while the tripod is moved and repositioned.
If you have the level of accuracy you are describing in your question's comments, I'd imply you have the budget to replace the ball-mount tripod with a tripod and angled head. After you set the tripod level you can precisely set the orientation of the camera.
How you set the horizontal control (with the compass) will be a personal choice.
With this tripod head, there is a plate that clicks into the head at the top. I keep that plate on both of my cameras so that I can easily click the camera onto the head. Further I have a long lens with a tripod mount on the lens itself, so I have another plate on that lens. And two spares (!)
The only issue I've ever had with this head, is that dials tend to get stiff over time.
I used to own a ball head, but found that no matter how tight I made it, the angle always drifted. I needed a solution where I could set the angle without drift to do long exposures.