public IList <HabHygRecord> GetRaw() { HabHYGCsvReader reader = new HabHYGCsvReader(); reader.Load(Location); return(reader.Catalogue); }
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); } }
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); } }
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); } }