/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2005,2006,2007 INRIA * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author: Mathieu Lacage * Contributions: Timo Bingmann * Contributions: Gary Pei for fixed RSS * Contributions: Tom Hewer for two ray ground model * Pavel Boyko for matrix */ #include "ns3/log.h" #include "ns3/mobility-model.h" #include "isl-propagation-loss-model.h" namespace ns3 { NS_LOG_COMPONENT_DEFINE ("IslPropagationLossModel"); NS_OBJECT_ENSURE_REGISTERED (IslPropagationLossModel); TypeId IslPropagationLossModel::GetTypeId (void) { static TypeId tid = TypeId ("ns3::IslPropagationLossModel") .SetParent () .SetGroupName ("Leo") .AddConstructor () ; return tid; } IslPropagationLossModel::IslPropagationLossModel () { } IslPropagationLossModel::~IslPropagationLossModel () { } double IslPropagationLossModel::DoCalcRxPower (double txPowerDbm, Ptr a, Ptr b) const { // TODO perform line-earth intersection (ray tracing or based on earth // curvature + distance) // primitivec cut-of at 1000 km if (a->GetDistanceFrom (b) > 1000000.0) { return 0; } double rxc = 0;//-m_variable->GetValue (); NS_LOG_DEBUG ("attenuation coefficient="<