Fixed calculate for hopefully the final time

There was an error in the first one, where locations with different
longitudes would pose a problem during calculation of side C.
Switched to a Math.Atan2 approach after exhausting (almost) all options
and then everything worked.