示例#1
0
 public List<IStar> GetStarsInRegion(double raDeg, double deDeg, double diameterDeg, double limitMag, float epoch)
 {
     if (m_Settings.Catalog == TangraConfig.StarCatalog.UCAC2)
     {
         UCAC2Catalogue cat = new UCAC2Catalogue(m_Settings.CatalogLocation);
         List<IStar> ucac2Stars = cat.GetStarsInRegion(raDeg, deDeg, diameterDeg, limitMag, epoch);
         return (List<IStar>)ucac2Stars;
     }
     else if (m_Settings.Catalog == TangraConfig.StarCatalog.UCAC3)
     {
         UCAC3Catalogue cat = new UCAC3Catalogue(m_Settings.CatalogLocation);
         List<IStar> ucac3Stars = cat.GetStarsInRegion(raDeg, deDeg, diameterDeg, limitMag, epoch);
         return (List<IStar>)ucac3Stars;
     }
     else if (m_Settings.Catalog == TangraConfig.StarCatalog.NOMAD)
     {
         NOMADCatalogue cat = new NOMADCatalogue(m_Settings.CatalogLocation);
         List<IStar> nomadStars = cat.GetStarsInRegion(raDeg, deDeg, diameterDeg, limitMag, epoch);
         return (List<IStar>)nomadStars;
     }
     else if (m_Settings.Catalog == TangraConfig.StarCatalog.PPMXL)
     {
         PPMXLCatalogue cat = new PPMXLCatalogue(m_Settings.CatalogLocation);
         List<IStar> ppmxlStars = cat.GetStarsInRegion(raDeg, deDeg, diameterDeg, limitMag, epoch);
         return (List<IStar>)ppmxlStars;
     }
     else if (m_Settings.Catalog == TangraConfig.StarCatalog.UCAC4)
     {
         UCAC4Catalogue cat = new UCAC4Catalogue(m_Settings.CatalogLocation);
         List<IStar> ucac4Stars = cat.GetStarsInRegion(raDeg, deDeg, diameterDeg, limitMag, epoch);
         return (List<IStar>)ucac4Stars;
     }
     return null;
 }
示例#2
0
        public void _4_ReadStars_2_Equator()
        {
            PPMXLCatalogue cat = new PPMXLCatalogue(CATALOG_LOCATION);
            List<IStar> satrs = cat.GetStarsInRegion(12.34, -0.02, 0.2, 16, 2000);

            Assert.IsNotNull(satrs);
            Assert.IsTrue(satrs.Count > 0);

            foreach (PPMXLEntry star in satrs)
            {
                Assert.IsTrue(star.RAJ2000 >= 12.34 - 0.25);
                Assert.IsTrue(star.RAJ2000 <= 12.34 + 0.25);
                Assert.IsTrue(star.DEJ2000 >= -0.02 - 0.25);
                Assert.IsTrue(star.DEJ2000 <= -0.02 + 0.25);
                Assert.IsTrue(star.Mag <= 16);
                Console.WriteLine(star.GetStarDesignation(0) + "\t\t" + star.GetStarDesignation(1));
            }
        }