In java file Loxodrome, there is a mathematical bug in handling movement along circle of latitude.
There should be a division by cosine of latitude instead of the multiplication. This is probably caused by missing parentheses and isn’t an issue with deeper understanding of loxodrome. After all, this branch dealing with a circle of latitude is the simpler case of a loxodrome.
The problem is relatively simple to understand. Even if there was no flattening of Earth, the cosLat (cosine of latitude) would still be there in the formulae. cosLat at the equator is 1. cosLat at poles is zero. cosLat helps answer the question of how many meters is a degree of longitude at a specific latitude. Infinitely near the North Pole, a degree of longitude is infinitely close to zero meters. Invertly, a meter along circle of latitude is close to infinity when infinitely near the North Pole.
The function promises to find a position along a loxodrome. It needs to return the longitude of the found position. The current implementation would seem to aim to add a longitude offset to the longitude of the original position. The parameter to the method is the distance in meters. In other words, the question is how many degrees/radians of longitude does the number of meters represent. As I said above, one meter along circle of latitude should go towards infinite degrees when cosLat goes to zero - the result should go to infinity, which it cannot do if multiplied by a value between -1…1 instead of dividing by a value near positive zero.
Have someone verify the mathematical formulae from source material.