This toolbox can solve any of the 6 possible subproblems associated with an oblique spherical triangle, when only 3 of the 6 angles are known.
The toolbox basically is an implementation of the set of tools developed in [Wertz, 2001], which aimed to fully automize the procedure and do away with the need of user intervention.
[b1, c1, C1, b2, c2, C2] = aas(A, B, a)
gives both solutions for the sides b and c and the angle C, when given angles A, B and side a. This particular problem can be called the Angle-Angle-Side problem, hence the name.
Both degrees and radians are implemented, the difference is indicating by appending a 'd' to the function name. The above example expects and returns radians, whereas
[b1, c1, C1, b2, c2, C2] = aasd(A, B, a)
expects and returns degrees.
James R. Wertz, Mission Geometry: Orbit and Constellation Design and Management, 2001. Published by Microcosm and Kluwer Academic Publishers.
Rody Oldenhuis (2019). Oblique Spherical Triangle toolbox (https://www.github.com/rodyo/FEX-sphericaltrig), GitHub. Retrieved .
Whoah! I totally overlooked your comment! I actually found this comment by googling for one of my other submissions :s
Anyway, thanks for the comment. Actually, in MAL/MSL, that whole denominator is unneccesary, since the objective is to take the ATAN2. I posted an update which does just that. I also got rid of the whole MAL/MSL thing, and all dependencies I created back in a time I did not yet know DEAL() ^_^
Thanks for the feedback.
This comment is on the descriptive doc, not on the code. Specifically, it is about the auxiliary functions mal.m, mald.m, msl.m, and msld.m.
First, I think a correction is needed. In the equations for "cos c". the numerator has a plus sign which should be minus.
Second, a suggestion for a very minor improvement. The definitions of "sin c", "cos c", "sin C", and "cos C" all have the same denominator:
1 - sin a sin b sin A sin B
This is equal to
1 - (sin b sin A)^2
which contains only the given data b and A, not B which is a computed quantity (in ssa, the main user of the "middle side/angle laws"). So this expression has the advantage of avoiding any errors in the intermediate computation.
[linked to Github]
Found & corrected a few bugs
updated all files -- no dependencies should exist anymore.