public bool IsHamBand(BandPlan b, double f) { string txt = ""; if (extended || current_xvtr_index > -1) return true; else if (current_model == Model.GENESIS_G11 && g11_multiband) { if (!SplitAB_TX && (current_band_filter == Band.GEN || current_band_filter == Band.WWV)) return false; } if (DB.GetBandText((int)b, f, out txt)) return true; else return false; }
public Band BandForFrequency(double frequencyInHz, BandPlan plan = BandPlan.ITU) { return((from b in Bands where b.LowFrequency <= frequencyInHz && b.HighFrequency >= frequencyInHz && b.BandPlan == plan select b)?.FirstOrDefault()); }
public bool IsHamBand(BandPlan b, double f) { if(extended || current_xvtr_index > -1) return true; switch(b) { case BandPlan.IARU1: if(f >= 1.8 && f <= 2.0) return true; else if(f >= 3.5 && f <= 4.0) return true; else if(f == 5.3305) return true; else if(f == 5.3465) return true; else if(f == 5.3665) return true; else if(f == 5.3715) return true; else if(f == 5.4035) return true; else if(f >= 7.0 && f <= 7.3) return true; else if(f >= 10.1 && f <= 10.15) return true; else if(f >= 14.0 && f <= 14.35) return true; else if(f >= 18.068 && f <= 18.168) return true; else if(f >= 21.0 && f <= 21.45) return true; else if(f >= 24.89 && f <= 24.99) return true; else if(f >= 21.0 && f <= 21.45) return true; else if(f >= 28.0 && f <= 29.7) return true; else if(f >= 50.0 && f <= 54.0) return true; else if(f >= 144.0 && f <= 146.0) { if(rfe_present && xvtr_present) return true; else return false; } else return false; default: return false; // TODO: Implement other bandplans here } }