mirror of
https://gitlab.ibr.cs.tu-bs.de/tschuber/ns-3-leo.git
synced 2025-07-31 03:00:07 +02:00
add tests and fixups
This commit is contained in:
parent
5f01608c61
commit
c6bce1a882
6 changed files with 319 additions and 2 deletions
51
model/leo-propagation-loss-model.cc
Normal file
51
model/leo-propagation-loss-model.cc
Normal file
|
@ -0,0 +1,51 @@
|
|||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
|
||||
#include "leo-propagation-loss-model.h"
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("LeoPropagationLossModel");
|
||||
|
||||
NS_OBJECT_ENSURE_REGISTERED (LeoPropagationLossModel);
|
||||
|
||||
TypeId
|
||||
LeoPropagationLossModel::GetTypeId (void)
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::LeoPropagationLossModel")
|
||||
.SetParent<PropagationLossModel> ()
|
||||
.SetGroupName ("Leo")
|
||||
.AddConstructor<LeoPropagationLossModel> ()
|
||||
;
|
||||
return tid;
|
||||
}
|
||||
|
||||
LeoPropagationLossModel::LeoPropagationLossModel ()
|
||||
{
|
||||
}
|
||||
|
||||
LeoPropagationLossModel::~LeoPropagationLossModel ()
|
||||
{
|
||||
}
|
||||
|
||||
double
|
||||
LeoPropagationLossModel::DoCalcRxPower (double txPowerDbm,
|
||||
Ptr<MobilityModel> a,
|
||||
Ptr<MobilityModel> b) const
|
||||
{
|
||||
//Vector aPos = a->GetPosition ();
|
||||
//Vector bPos = b->GetPosition ();
|
||||
|
||||
// TODO perform line-earth intersection (ray tracing)
|
||||
|
||||
double rxc = 0;//-m_variable->GetValue ();
|
||||
NS_LOG_DEBUG ("attenuation coefficient="<<rxc<<"Db");
|
||||
return txPowerDbm + rxc;
|
||||
}
|
||||
|
||||
int64_t
|
||||
LeoPropagationLossModel::DoAssignStreams (int64_t stream)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue