Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- We have a TAstroCoords class that has as fields HA and DEC, and abstract methods asMean and asRaw
- Then we have a TAstroCoordsRaw, which A) returns itself for asRaw and B) returns a transformed mean coordinate-- a TAstroCoordsMean--- for asMean
- Then we have a TAstroCoordsMean, which A) returns a transformed TAstroCoordsRaw for asRaw, and B) returns itself for asMean.
- TAstroCoords ac = Telescope.GetPosition; /* THis is whatever type the telescope felt like giving back-- raw, mean, etc. IDK */
- /* if we need mean HA, it's this easy. This converts if necessary, and doesn't if not */
- DoSomething(ac.asMean.HA);
- TAstroCoords mean = ac.asMean; /* This is really a TAstroCoordsMean-- a conversion has happened if necessary */
- TAstroCoords newMean = mean.asMean; /* This is really a TAstroCoordsMean and identical to mean */
- TAstroCoords raw = ac.asRaw; /* This is a TAstroCoordsRaw */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement