Fix ground station allocator and trace mac drops

This commit is contained in:
Tim Schubert 2020-08-27 17:59:58 +02:00
parent 8d5cbfe8fe
commit 998b7fe2f2
15 changed files with 222 additions and 80 deletions

View file

@ -6,16 +6,15 @@ namespace ns3 {
std::ostream &operator << (std::ostream &os, const LeoLatLong &l)
{
os << l.label << "," << l.latitude << "," << l.longitude;
os << l.latitude << ":" << l.longitude;
return os;
}
std::istream &operator >> (std::istream &is, LeoLatLong &l)
{
char c1, c2;
is >> l.label >> c1 >> l.latitude >> c2 >> l.longitude;
if (c1 != ',' ||
c2 != ',')
char c1;
is >> l.latitude >> c1 >> l.longitude;
if (c1 != ':')
{
is.setstate (std::ios_base::failbit);
}
@ -24,7 +23,6 @@ std::istream &operator >> (std::istream &is, LeoLatLong &l)
LeoLatLong::LeoLatLong () : latitude (0), longitude (0) {}
LeoLatLong::LeoLatLong (double la, double lo) : latitude (la), longitude (lo) {}
LeoLatLong::LeoLatLong (std::string label, double la, double lo) : latitude (la), longitude (lo) {}
LeoLatLong::~LeoLatLong () {}
};