jorgepiloto / lamberthub

A set of Lambert's problem solvers
GNU General Public License v3.0
41 stars 5 forks source link

Simplify logic for creating position vectors from theta and rho #55

Closed jorgepiloto closed 2 years ago

jorgepiloto commented 2 years ago

I just noticed that the way in which the position vectors are being constructed in the performance plotters does not take advantage of the rotation_matrix function already implemented under lamberthub.utils.elements module.

https://github.com/jorgepiloto/lamberthub/blob/66049f818430b5dcbaa1f9da3d890fc8397d45ce/src/lamberthub/plotting/_base.py#L169-L177

https://github.com/jorgepiloto/lamberthub/blob/90291bf14230827e92dee255c6863b42de549c88/src/lamberthub/utils/elements.py#L274-L284

In addition, previous piece of code turned out to be quite useful when computing the curves for the time of flight as function of the free-parameter of the problem.

Therefore, this PR implements previous logic in its own private function.