Example #1
0
func (dbs *DBS) Init() {
	switch SetReceiverType {
	case OMNI, BEAM:
		dbs.R = new(PhysReceiver)
	case SECTORED:
		dbs.R = new(PhysReceiverSectored)
	}
	dbs.Connec = list.New()
	dbs.RndCh = make([]int, NCh)
	var p geom.Pos
	p.X = Rgen.Float64() * Field
	p.Y = Rgen.Float64() * Field
	dbs.Rgen = rand.New(rand.NewSource(Rgen.Int63()))
	dbs.R.Init(dbs.Rgen)
	dbs.R.SetPos(p)
	SyncChannel <- 1
}
Example #2
0
func (rx *PhysReceiver) SlowFading(E *geom.Pos) (c float64) {
	return rx.shadow.evalShadowFading(E.Minus(rx.Pos))
}