This problem is more complex than simple trigonometry. The earth is approximately round, but not precisely round, and that's one of the lesser (but more memorable for me) complexities involved. GPS systems have to choose a projection: WGS84, for example. And navigators of old spent a good deal of time learning the math behind great circles, and various chart projections. ...ok, maybe the rest is trigonometry, but not entirely simple.
It's been eighteen years since I read it, and I've forgotten most of what I learned. But I highly recommend Dutton's Navigation and Piloting (or the more recent Dutton's Nautical Navigation). Pick up a used copy via Amazon or eBay. You're really just after the mathematical formulas and a good explanation of the theory, and for that an older version is probably just as good as a newer one. I think I have the 1961 edition handed down from a friend of my parents.
From what I understand, at least at one time this one and Chapman's were among the books that the USCG used in training its sailors.