source: proiecte/ptvs/src/vnsim/network/propagation/FreeSpace.java @ 31

Last change on this file since 31 was 31, checked in by (none), 14 years ago
File size: 803 bytes
Line 
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
7package vnsim.network.propagation;
8
9import vnsim.map.object.Globals;
10
11public 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.