Closed Carifio24 closed 2 years ago
Awesome! @astrodavid10, do you know how to navigate to the Azure Pipelines artifacts to download an installer for the bleeding-edge version of the app that includes this fix?
@pkgw just figured it out! I'll test it out.
This PR adds support for properly using the distance/altitude coordinate to
VoTableLayer
so that these layers will display at the correct position in the sky in Solar System mode - currently, VOTable layers display their points at a radius of 1 AU from the Sun (see #178). SinceSpreadSheetLayer
s already support this, this is accomplished largely by mimicking the corresponding code inside that class. The relevant changes are in thePrepVertexBuffer
method ofVoTableLayer
.Related to this, when the distance column is set in the
VOTableViewer
, currently the unit is assumed to be light years. This PR changes that, using the unit for the relevantVoColumn
(which is already parsed into the VoTable). To do this, I added a method inUiTools
that grabs the appropriateAltUnits
value based on the abbreviation given as the unit. Please let me know if there are any different/additional string representations that this should support.One other thing worth mentioning:
SpreadSheetLayer
used its methodGetScaleFactor
. As it was, this method had no real reason to be attached toSpreadSheetLayer
- although not marked as static, it doesn't use any of the instance's member values. Since the calculation forVoTableLayer
would require the same code, and this method was almost entirely identical toUiTools.GetMeters
, I moved this function intoUiTools
and refactoredGetMeters
to useGetScaleFactor
.