/************************************************************************************ * Copyright (C) 2008 by Politehnica University of Bucharest and Rutgers University * All rights reserved. * Refer to LICENSE for terms and conditions of use. ***********************************************************************************/ //Petroaca - free space propagation model ; computes the received power of a frame according to the friis formula package vnsim.network.propagation; import vnsim.map.object.Globals; public class FreeSpace { public static double getPr(double Pt,double R) { if(Pt<=0.0 || R<=0.0) return -1; double aux=Globals.DSRC_LAMBDA/(4*Math.PI*R); return (Pt*Globals.ANTENNA_GAIN*Globals.ANTENNA_GAIN*(aux*aux))/Globals.SYSTEM_LOSS; } }