Advertisement
Guest User

Untitled

a guest
Apr 19th, 2019
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. We have a TAstroCoords class that has as fields HA and DEC, and abstract methods asMean and asRaw
  2.  
  3. Then we have a TAstroCoordsRaw, which A) returns itself for asRaw and B) returns a transformed mean coordinate-- a TAstroCoordsMean--- for asMean
  4.  
  5. Then we have a TAstroCoordsMean, which A) returns a transformed TAstroCoordsRaw for asRaw, and B) returns itself for asMean.
  6.  
  7.  
  8. TAstroCoords ac = Telescope.GetPosition; /* THis is whatever type the telescope felt like giving back-- raw, mean, etc. IDK */
  9.  
  10. /* if we need mean HA, it's this easy. This converts if necessary, and doesn't if not */
  11.  
  12. DoSomething(ac.asMean.HA);
  13.  
  14. TAstroCoords mean = ac.asMean; /* This is really a TAstroCoordsMean-- a conversion has happened if necessary */
  15.  
  16. TAstroCoords newMean = mean.asMean; /* This is really a TAstroCoordsMean and identical to mean */
  17.  
  18. TAstroCoords raw = ac.asRaw; /* This is a TAstroCoordsRaw */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement