Rev | Line | |
---|
[31] | 1 | /************************************************************************************ |
---|
| 2 | * Copyright (C) 2008 by Politehnica University of Bucharest and Rutgers University |
---|
| 3 | * All rights reserved. |
---|
| 4 | * Refer to LICENSE for terms and conditions of use. |
---|
| 5 | ***********************************************************************************/ |
---|
| 6 | //Petroaca - free space propagation model ; computes the received power of a frame according to the friis formula |
---|
| 7 | package vnsim.network.propagation; |
---|
| 8 | |
---|
| 9 | import vnsim.map.object.Globals; |
---|
| 10 | |
---|
| 11 | public class FreeSpace |
---|
| 12 | { |
---|
| 13 | |
---|
| 14 | public static double getPr(double Pt,double R) |
---|
| 15 | { |
---|
| 16 | if(Pt<=0.0 || R<=0.0) |
---|
| 17 | return -1; |
---|
| 18 | |
---|
| 19 | double aux=Globals.DSRC_LAMBDA/(4*Math.PI*R); |
---|
| 20 | |
---|
| 21 | return (Pt*Globals.ANTENNA_GAIN*Globals.ANTENNA_GAIN*(aux*aux))/Globals.SYSTEM_LOSS; |
---|
| 22 | } |
---|
| 23 | |
---|
| 24 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.