mirror of
https://gitlab.ibr.cs.tu-bs.de/tschuber/ns-3-leo.git
synced 2025-06-08 10:03:58 +02:00
Use LEO and ISL propagation loss models.
This commit is contained in:
parent
3f223d1d6c
commit
12040289d3
3 changed files with 9 additions and 3 deletions
|
@ -37,6 +37,7 @@ LeoPropagationLossModel::DoCalcRxPower (double txPowerDbm,
|
||||||
//Vector bPos = b->GetPosition ();
|
//Vector bPos = b->GetPosition ();
|
||||||
|
|
||||||
// TODO perform line-earth intersection (ray tracing)
|
// TODO perform line-earth intersection (ray tracing)
|
||||||
|
// TODO check angle between satellite and ground-station
|
||||||
|
|
||||||
double rxc = 0;//-m_variable->GetValue ();
|
double rxc = 0;//-m_variable->GetValue ();
|
||||||
//NS_LOG_DEBUG ("attenuation coefficient="<<rxc<<"Db");
|
//NS_LOG_DEBUG ("attenuation coefficient="<<rxc<<"Db");
|
||||||
|
|
|
@ -286,6 +286,10 @@ MockNetDevice::TransmitStart (Ptr<Packet> p, const Address &dest)
|
||||||
{
|
{
|
||||||
m_phyTxDropTrace (p);
|
m_phyTxDropTrace (p);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
NS_LOG_INFO ("[node " << m_node->GetId () << "] send packet on " << m_ifIndex << " to " << dest);
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -416,6 +420,7 @@ MockNetDevice::Receive (Ptr<Packet> packet, Ptr<MockNetDevice> senderDevice)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (packetType != PACKET_OTHERHOST) {
|
if (packetType != PACKET_OTHERHOST) {
|
||||||
|
NS_LOG_INFO ("[node " << m_node->GetId () << "] received packet on " << m_ifIndex << " from " << remote << " for " << header.GetDestination ());
|
||||||
m_macRxTrace (originalPacket);
|
m_macRxTrace (originalPacket);
|
||||||
m_rxCallback (this, packet, protocol, remote);
|
m_rxCallback (this, packet, protocol, remote);
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,7 +79,7 @@ LeoTestCase1::DoRun (void)
|
||||||
islCh.SetChannelAttribute ("PropagationDelay", StringValue ("ns3::ConstantSpeedPropagationDelayModel"));
|
islCh.SetChannelAttribute ("PropagationDelay", StringValue ("ns3::ConstantSpeedPropagationDelayModel"));
|
||||||
islCh.SetDeviceAttribute ("InterframeGap", TimeValue (Seconds (0.001)));
|
islCh.SetDeviceAttribute ("InterframeGap", TimeValue (Seconds (0.001)));
|
||||||
//// TODO propagation loss from mobility model
|
//// TODO propagation loss from mobility model
|
||||||
islCh.SetChannelAttribute ("PropagationLoss", StringValue ("ns3::RangePropagationLossModel"));
|
islCh.SetChannelAttribute ("PropagationLoss", StringValue ("ns3::IslPropagationLossModel"));
|
||||||
islNet = islCh.Install (satellites);
|
islNet = islCh.Install (satellites);
|
||||||
|
|
||||||
LeoChannelHelper utCh;
|
LeoChannelHelper utCh;
|
||||||
|
@ -91,7 +91,7 @@ LeoTestCase1::DoRun (void)
|
||||||
utCh.SetSatDeviceAttribute ("InterframeGap", TimeValue (Seconds (0.001)));
|
utCh.SetSatDeviceAttribute ("InterframeGap", TimeValue (Seconds (0.001)));
|
||||||
utCh.SetGndDeviceAttribute ("InterframeGap", TimeValue (Seconds (0.001)));
|
utCh.SetGndDeviceAttribute ("InterframeGap", TimeValue (Seconds (0.001)));
|
||||||
// TODO propagation loss from mobility model
|
// TODO propagation loss from mobility model
|
||||||
utCh.SetChannelAttribute ("PropagationLoss", StringValue ("ns3::RangePropagationLossModel"));
|
utCh.SetChannelAttribute ("PropagationLoss", StringValue ("ns3::LeoPropagationLossModel"));
|
||||||
utCh.SetChannelAttribute ("PropagationDelay", StringValue ("ns3::ConstantSpeedPropagationDelayModel"));
|
utCh.SetChannelAttribute ("PropagationDelay", StringValue ("ns3::ConstantSpeedPropagationDelayModel"));
|
||||||
utNet = utCh.Install (satellites, terminals);
|
utNet = utCh.Install (satellites, terminals);
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ LeoTestCase1::DoRun (void)
|
||||||
|
|
||||||
// we want to ping terminals
|
// we want to ping terminals
|
||||||
UdpEchoServerHelper echoServer (9);
|
UdpEchoServerHelper echoServer (9);
|
||||||
ApplicationContainer serverApps = echoServer.Install (terminals);
|
ApplicationContainer serverApps = echoServer.Install (terminals.Get (1));
|
||||||
|
|
||||||
// install a client on one of the terminals
|
// install a client on one of the terminals
|
||||||
ApplicationContainer clientApps;
|
ApplicationContainer clientApps;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue