コード例 #1
0
        public IList <HabHygRecord> GetRaw()
        {
            HabHYGCsvReader reader = new HabHYGCsvReader();

            reader.Load(Location);
            return(reader.Catalogue);
        }
コード例 #2
0
        public void Get(IStellarMap map)
        {
            HabHYGCsvReader reader = new HabHYGCsvReader();

            reader.Load(Location);

            foreach (HabHygRecord record in reader.Catalogue)
            {
                Star star = Convert(record);
                map.Add <Star>(star);
            }
        }
コード例 #3
0
        public void GetMagnitude(IStellarMap map, double magnitude)
        {
            HabHYGCsvReader reader = new HabHYGCsvReader();

            reader.Load(Location);

            var records = reader.Catalogue.Where <HabHygRecord>(c => c.AbsMag > magnitude);

            foreach (HabHygRecord record in records)
            {
                Star star = Convert(record);
                map.Add <Star>(star);
            }
        }
コード例 #4
0
        public void GetWithin(IStellarMap map, double ly, double magnitude)
        {
            double parsecs = ly / 3.261633;

            HabHYGCsvReader reader = new HabHYGCsvReader();

            reader.Load(Location);

            var records = reader.Catalogue.Where <HabHygRecord>(c => c.Distance <parsecs && c.AbsMag> magnitude);

            foreach (HabHygRecord record in records)
            {
                Star star = Convert(record);
                map.Add <Star>(star);
            }
        }