I am not best at being good at calculations, this is why I'm hoping for someone to post one for me, who has experience. I'm more practical! This morning I drew longitude and latitude lines on a balloon, with two disks stuck on the represent tracker and target, so I can visualise what's happening. I can see error traps alreadyHave you ever used this book? It's got a lot of cookbook style algorithms for navigating your way around coordinate systems without assuming that you either already have or want to pick up a lot of mathematical knowledge.
http://www.sky-watch.com/books/duffett1.html