Fix meaning of beam elevation angle

This commit is contained in:
Tim Schubert 2020-08-19 22:29:40 +02:00
parent 333abfcdd4
commit fb9950c8cc
3 changed files with 23 additions and 12 deletions

View file

@ -34,9 +34,9 @@ int main(int argc, char *argv[])
std::vector<Orbit> orbits = { std::vector<Orbit> orbits = {
Orbit (1150, 53.0, 32, 50), Orbit (1150, 53.0, 32, 50),
Orbit (1110, 53.8, 32, 50), Orbit (1110, 53.8, 32, 50),
Orbit (1130, 74.0, 8, 50), // Orbit (1130, 74.0, 8, 50),
Orbit (1275, 81, 5, 75), // Orbit (1275, 81, 5, 75),
Orbit (1325, 70, 6, 75), // Orbit (1325, 70, 6, 75),
}; };
NodeContainer satellites; NodeContainer satellites;
for (Orbit orb: orbits) for (Orbit orb: orbits)

View file

@ -30,14 +30,23 @@ public:
uint16_t sats; uint16_t sats;
}; };
// Starlink
//Orbit (1150, 53.0, 32, 50),
//Orbit (1110, 53.8, 32, 50),
//Orbit (1130, 74.0, 8, 50),
//Orbit (1275, 81, 5, 75),
//Orbit (1325, 70, 6, 75),
// Telesat
//Orbit (1000.0, 99.5, 6, 12),
//Orbit (1248.0, 37.4, 5, 9),
int main (int argc, char *argv[]) int main (int argc, char *argv[])
{ {
std::vector<Orbit> orbits = { std::vector<Orbit> orbits = {
Orbit (1150, 53.0, 32, 50), Orbit (1150, 53.0, 32, 50),
Orbit (1110, 53.8, 32, 50), Orbit (1110, 53.8, 32, 50),
Orbit (1130, 74.0, 8, 50),
Orbit (1275, 81, 5, 75),
Orbit (1325, 70, 6, 75),
}; };
NodeContainer satellites; NodeContainer satellites;
for (Orbit orb: orbits) for (Orbit orb: orbits)
@ -69,12 +78,14 @@ int main (int argc, char *argv[])
islNet = islCh.Install (satellites); islNet = islCh.Install (satellites);
LeoChannelHelper utCh; LeoChannelHelper utCh;
utCh.SetConstellation ("StarlinkUser"); utCh.SetConstellation ("TelesatUser");
utNet = utCh.Install (satellites, stations); utNet = utCh.Install (satellites, stations);
// Install internet stack on nodes // Install internet stack on nodes
AodvHelper aodv; AodvHelper aodv;
//aodv.Set ("HelloInterval", TimeValue (Minutes (1))); // This is far better for performance (huge network)
aodv.Set ("EnableHello", BooleanValue (false));
//aodv.Set ("HelloInterval", TimeValue (Seconds (10)));
//aodv.Set ("TtlStart", UintegerValue (2)); //aodv.Set ("TtlStart", UintegerValue (2));
//aodv.Set ("TtlIncrement", UintegerValue (1)); //aodv.Set ("TtlIncrement", UintegerValue (1));
//aodv.Set ("TtlThreshold", UintegerValue (20)); //aodv.Set ("TtlThreshold", UintegerValue (20));
@ -128,7 +139,7 @@ int main (int argc, char *argv[])
serverApps.Stop (Minutes (1)); serverApps.Stop (Minutes (1));
clientApps.Stop (Minutes (1)); clientApps.Stop (Minutes (1));
Simulator::Stop (Minutes (1)); Simulator::Stop (Minutes (10));
Simulator::Run (); Simulator::Run ();
Simulator::Destroy (); Simulator::Destroy ();

View file

@ -89,13 +89,13 @@ LeoPropagationLossModel::GetAngle (Ptr<MobilityModel> a, Ptr<MobilityModel> b)
void void
LeoPropagationLossModel::SetElevationAngle (double angle) LeoPropagationLossModel::SetElevationAngle (double angle)
{ {
m_elevationAngle = angle * (M_PI/180.0); m_elevationAngle = (90 - angle) * (M_PI/180.0);
} }
double double
LeoPropagationLossModel::GetElevationAngle () const LeoPropagationLossModel::GetElevationAngle () const
{ {
return m_elevationAngle * (180.0/M_PI); return 90 - (m_elevationAngle * (180.0/M_PI));
} }
void void
@ -125,7 +125,7 @@ LeoPropagationLossModel::DoCalcRxPower (double txPowerDbm,
} }
double angle = GetAngle (a, b); double angle = GetAngle (a, b);
if (angle > m_elevationAngle / 2.0) if (angle > m_elevationAngle)
{ {
NS_LOG_DEBUG ("LEO DROP angle: a=" << a->GetPosition () << " b=" << b->GetPosition () << " m_cutOff="<<m_cutoffDistance<<" m_angle="<<m_elevationAngle<<" dist=" << distance << "angle=" << angle); NS_LOG_DEBUG ("LEO DROP angle: a=" << a->GetPosition () << " b=" << b->GetPosition () << " m_cutOff="<<m_cutoffDistance<<" m_angle="<<m_elevationAngle<<" dist=" << distance << "angle=" << angle);
return -1000.0; return -1000.0;