Skip to content

Commit

Permalink
fix: irish G intention code directions
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyTWF committed Dec 24, 2022
1 parent 3a8acab commit cd0534a
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 14 deletions.
23 changes: 16 additions & 7 deletions src/plugin/intention/SectorExitRepositoryFactory.cpp
Expand Up @@ -122,13 +122,22 @@ namespace UKControllerPlugin {
points["EVRIN"] = std::make_unique<SectorExitPoint>("EVRIN", "S", SectorExitPoint::outWest);

// Irish Overflights
points["MOLAK"] = std::make_unique<SectorExitPoint>("MOLAK", "G1", SectorExitPoint::outWest);
points["NIPIT"] = std::make_unique<SectorExitPoint>("NIPIT", "G2", SectorExitPoint::outWest);
points["ERNAN"] = std::make_unique<SectorExitPoint>("ERNAN", "G3", SectorExitPoint::outWest);
points["DEGOS"] = std::make_unique<SectorExitPoint>("DEGOS", "G4", SectorExitPoint::outWest);
points["NIMAT"] = std::make_unique<SectorExitPoint>("NIMAT", "G5", SectorExitPoint::outWest);
points["NEVRI"] = std::make_unique<SectorExitPoint>("NEVRI", "G7", SectorExitPoint::outWest);
points["RUBEX"] = std::make_unique<SectorExitPoint>("RUBEX", "G9", SectorExitPoint::outWest);
points["MOLAK"] = std::make_unique<SectorExitPoint>(
"MOLAK", "G1", SectorExitPoint::outWest | SectorExitPoint::outSouthWest);
points["NIPIT"] = std::make_unique<SectorExitPoint>(
"NIPIT", "G2", SectorExitPoint::outWest | SectorExitPoint::outSouthWest);
points["ERNAN"] = std::make_unique<SectorExitPoint>(
"ERNAN", "G3", SectorExitPoint::outWest | SectorExitPoint::outSouthWest);
points["DEGOS"] = std::make_unique<SectorExitPoint>(
"DEGOS", "G4", SectorExitPoint::outWest | SectorExitPoint::outSouthWest);
points["NIMAT"] = std::make_unique<SectorExitPoint>(
"NIMAT", "G5", SectorExitPoint::outWest | SectorExitPoint::outSouthWest);
points["NEVRI"] = std::make_unique<SectorExitPoint>(
"NEVRI", "G7", SectorExitPoint::outWest | SectorExitPoint::outSouthWest);
points["ROTEV"] = std::make_unique<SectorExitPoint>(
"ROTEV", "G7", SectorExitPoint::outWest | SectorExitPoint::outSouthWest);
points["RUBEX"] = std::make_unique<SectorExitPoint>(
"RUBEX", "G9", SectorExitPoint::outWest | SectorExitPoint::outSouthWest);

// Brest
points["ANNET"] = std::make_unique<SectorExitPoint>("ANNET", "B4", SectorExitPoint::outSouth);
Expand Down
19 changes: 12 additions & 7 deletions test/plugin/intention/SectorExitRepositoryTest.cpp
Expand Up @@ -332,37 +332,42 @@ namespace UKControllerPluginTest {
// MOLAK
ASSERT_TRUE(repo->GetSectorExitPoint("MOLAK").GetName().compare("MOLAK") == 0);
ASSERT_TRUE(repo->GetSectorExitPoint("MOLAK").GetIntentionCode(mockRoute, 0, 37000).compare("G1") == 0);
ASSERT_EQ(repo->outWest, repo->GetSectorExitPoint("MOLAK").GetOutDirection());
ASSERT_EQ(repo->outWest | repo->outSouthWest, repo->GetSectorExitPoint("MOLAK").GetOutDirection());

// NIPIT
ASSERT_TRUE(repo->GetSectorExitPoint("NIPIT").GetName().compare("NIPIT") == 0);
ASSERT_TRUE(repo->GetSectorExitPoint("NIPIT").GetIntentionCode(mockRoute, 0, 37000).compare("G2") == 0);
ASSERT_EQ(repo->outWest, repo->GetSectorExitPoint("NIPIT").GetOutDirection());
ASSERT_EQ(repo->outWest | repo->outSouthWest, repo->GetSectorExitPoint("NIPIT").GetOutDirection());

// ERNAN
ASSERT_TRUE(repo->GetSectorExitPoint("ERNAN").GetName().compare("ERNAN") == 0);
ASSERT_TRUE(repo->GetSectorExitPoint("ERNAN").GetIntentionCode(mockRoute, 0, 37000).compare("G3") == 0);
ASSERT_EQ(repo->outWest, repo->GetSectorExitPoint("ERNAN").GetOutDirection());
ASSERT_EQ(repo->outWest | repo->outSouthWest, repo->GetSectorExitPoint("ERNAN").GetOutDirection());

// DEGOS
ASSERT_TRUE(repo->GetSectorExitPoint("DEGOS").GetName().compare("DEGOS") == 0);
ASSERT_TRUE(repo->GetSectorExitPoint("DEGOS").GetIntentionCode(mockRoute, 0, 37000).compare("G4") == 0);
ASSERT_EQ(repo->outWest, repo->GetSectorExitPoint("DEGOS").GetOutDirection());
ASSERT_EQ(repo->outWest | repo->outSouthWest, repo->GetSectorExitPoint("DEGOS").GetOutDirection());

// NIMAT
ASSERT_TRUE(repo->GetSectorExitPoint("NIMAT").GetName().compare("NIMAT") == 0);
ASSERT_TRUE(repo->GetSectorExitPoint("NIMAT").GetIntentionCode(mockRoute, 0, 37000).compare("G5") == 0);
ASSERT_EQ(repo->outWest, repo->GetSectorExitPoint("NIMAT").GetOutDirection());
ASSERT_EQ(repo->outWest | repo->outSouthWest, repo->GetSectorExitPoint("NIMAT").GetOutDirection());

// NEVRI
ASSERT_TRUE(repo->GetSectorExitPoint("NEVRI").GetName().compare("NEVRI") == 0);
ASSERT_TRUE(repo->GetSectorExitPoint("NEVRI").GetIntentionCode(mockRoute, 0, 37000).compare("G7") == 0);
ASSERT_EQ(repo->outWest, repo->GetSectorExitPoint("NEVRI").GetOutDirection());
ASSERT_EQ(repo->outWest | repo->outSouthWest, repo->GetSectorExitPoint("NEVRI").GetOutDirection());

// ROTEV
ASSERT_TRUE(repo->GetSectorExitPoint("ROTEV").GetName().compare("ROTEV") == 0);
ASSERT_TRUE(repo->GetSectorExitPoint("ROTEV").GetIntentionCode(mockRoute, 0, 37000).compare("G7") == 0);
ASSERT_EQ(repo->outWest | repo->outSouthWest, repo->GetSectorExitPoint("ROTEV").GetOutDirection());

// RUBEX
ASSERT_TRUE(repo->GetSectorExitPoint("RUBEX").GetName().compare("RUBEX") == 0);
ASSERT_TRUE(repo->GetSectorExitPoint("RUBEX").GetIntentionCode(mockRoute, 0, 37000).compare("G9") == 0);
ASSERT_EQ(repo->outWest, repo->GetSectorExitPoint("RUBEX").GetOutDirection());
ASSERT_EQ(repo->outWest | repo->outSouthWest, repo->GetSectorExitPoint("RUBEX").GetOutDirection());

// Brest

Expand Down

0 comments on commit cd0534a

Please sign in to comment.