Closed nicgowans closed 4 years ago
Great stuff Nic! Re: fixing the Eqn 78 issue in vincinv, did you want to add the example in your commit message into the test suite? Should ensure that if we refactor vincinv later we'll have a test for this problem.
Cheers, Josh. Great idea. Will do.
All done. I also corrected what looks like a copy/paste error in test2 (line 79), but I now notice the same error is repeated on lines 91, 106. e.g. test2 = vincinv(lat1_DMS, lon1_DMS, lat1_DMS, lon1_DMS) self.assertEqual(test2[0], 0) self.assertEqual(test2[0], 0) self.assertEqual(test2[2], 0)
Awesome, and that looks like some fat fingers on my part with 79, 91, 106. I think that test would be better as self.assertEqual(test2, (0, 0, 0))
rather than the clunky 3-liner test I've got it there. Happy for you to fix those lines up, or I'm also happy to open a new PR once you've closed this one off
Thanks, Josh. I've implemented the changes to those tests.
Cheers, Craig. Happy to help out.
Add the normal-orthometric correction function:
Fixes a math domain error occasionally encountered with the vincinv function (Eqn 78).
Apologies for having these in the same pull request - had already started on the noc function before it presented itself.