mirror of
https://gitlab.ibr.cs.tu-bs.de/tschuber/ns-3-leo.git
synced 2025-06-08 01:53:58 +02:00
Use hard cutoff as first step to proper propagation loss
This commit is contained in:
parent
07abd6efca
commit
83c5bc3b2e
2 changed files with 18 additions and 5 deletions
|
@ -23,6 +23,7 @@
|
|||
*/
|
||||
|
||||
#include "ns3/log.h"
|
||||
#include "ns3/mobility-model.h"
|
||||
|
||||
#include "isl-propagation-loss-model.h"
|
||||
|
||||
|
@ -53,13 +54,18 @@ IslPropagationLossModel::~IslPropagationLossModel ()
|
|||
|
||||
double
|
||||
IslPropagationLossModel::DoCalcRxPower (double txPowerDbm,
|
||||
Ptr<MobilityModel> a,
|
||||
Ptr<MobilityModel> b) const
|
||||
Ptr<MobilityModel> a,
|
||||
Ptr<MobilityModel> b) const
|
||||
{
|
||||
//Vector aPos = a->GetPosition ();
|
||||
//Vector bPos = b->GetPosition ();
|
||||
|
||||
// TODO perform line-earth intersection (ray tracing)
|
||||
// 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="<<rxc<<"Db");
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
|
||||
#include "ns3/log.h"
|
||||
#include "ns3/mobility-model.h"
|
||||
|
||||
#include "leo-propagation-loss-model.h"
|
||||
|
||||
namespace ns3 {
|
||||
|
@ -38,6 +40,11 @@ LeoPropagationLossModel::DoCalcRxPower (double txPowerDbm,
|
|||
|
||||
// TODO perform line-earth intersection (ray tracing)
|
||||
// TODO check angle between satellite and ground-station
|
||||
// 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="<<rxc<<"Db");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue