Skip to content

Commit

Permalink
Pre version for a generel solution
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoKle committed Sep 2, 2022
1 parent 31d839d commit da5a59b
Show file tree
Hide file tree
Showing 6 changed files with 533 additions and 180 deletions.
2 changes: 1 addition & 1 deletion EuroscopeSIMBib/ACFT.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ internal ACFT(string callsign, string dep, string dest, string atyp, string squa
Squawk = squawk;
}
}
}
}
62 changes: 62 additions & 0 deletions EuroscopeSIMBib/Airport.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization.Formatters;
using System.Text;
using System.Threading.Tasks;

namespace ES
{
internal class Airport
{
internal virtual string ICAO { get; set; }
/// <summary>
/// Determines the runway in use i.e. at EDDL 05/23
/// </summary>
internal virtual List<string> RunwayDirections { get; set; } = new List<string>();
internal virtual int SelectedRunwayDirectionIndex { get; set; }
internal virtual string RunwayHeadingLastNumber { get; set; }
/// <summary>
/// List of SIDSRoute corresponding to the index of the runway described in property "RunwayDirections"
/// </summary>
internal virtual List<string>[] SIDSRoute { get; set; }
internal virtual List<string>[] SIDSFpln { get; set; }
/// <summary>
/// List of STARs responding to the index of the runway described in property "RunwayDirections"
/// </summary>
internal virtual List<string>[] STARSRoute { get; set; }
internal virtual List<string>[] STARSFpln { get; set; }
/// <summary>
/// List of TRANSITION corresponding to the index of the runway described in property "RunwayDirections"
/// </summary>
internal virtual List<string>[] TRANSITIONRoute { get; set; }
internal virtual List<string>[] TRANSITIONFpln { get; set; }

internal virtual string[] DepartureAirstart { get; set; }
internal virtual string[] DepartureGroundstart { get; set; }
internal virtual List<string> ArrivalStartPoint { get; set; } = new List<string>();




/// <summary>
/// Should be obsolete and property should be in method
/// </summary>
internal virtual string SelectedRunwayDirection { get; set; }
internal virtual int InboundHeading { get; set; }

#region details ES simfile requires

internal virtual List<string>[] ILSDefinition { get; set; }
internal virtual string[] Holdings { get; set; }

internal virtual List<string> Pseudopilots { get; set; } = new List<string>();

internal virtual string Elevation { get; set; }
internal virtual string[] RunwayNames { get; set; }
internal virtual List<string> InboundStartPosition { get; set; } = new List<string>();
internal virtual List<string> InboundAltitude { get; set; } = new List<string>();

#endregion
}
}
236 changes: 168 additions & 68 deletions EuroscopeSIMBib/EDDL.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,13 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Schema;

namespace EuroscopeSIMGen
{
internal class EDDL : IAirport
internal class EDDL : Airport
{
public string ICAO { get; } = "EDDL";
public string[] RunwayDirections { get; } = { "23", "05" };
public int SelectedRunwayDirectionIndex { get; } = 0;
public string SelectedRunwayDirection { get; }
public List<string>[] SIDS { get; set; }
public List<string>[] STARS { get; set; }
public List<string>[] TRANSITION { get; set; }

#region EDDL SIDS 05
internal string COL4Z = "DL050 DL058 BAM LIPMI COL";
internal string DODEN6Z = "DL050 DL058 BAM ELBAL BETZO DODEN";
Expand Down Expand Up @@ -73,19 +68,12 @@ internal class EDDL : IAirport
#endregion

#region SIM settings / defintions
public List<string> Pseudopilots { get; set; } = new List<string> { "EDDL_APP", "EDDL_M_APP", "EDGG_P_CTR" };
public string Pseudopilot { get; set; }
public string[] Holdings { get; set; } = { "HOLDING:ADEMI:284:-1", "HOLDING:BOT:238:-1", "HOLDING:BAM:251:-1", "HOLDING:DL524:232:1", "HOLDING:DL503:232:-1", "HOLDING:DL429:52:-1", "HOLDING:DL409:52:1", "HOLDING:DOMEG:170:-1", "HOLDING:ELDAR:356:-1", "HOLDING:HMM:257:-1", "HOLDING:LMA:240:1", "HOLDING:LEBTI:234:1", "HOLDING:MHV:359:-1", "HOLDING:RONAD:263:1" };
public string[] DepartureAirstart { get; set; } = { "N051.16.52.419:E006.45.19.666", "N051.17.49.449:E006.47.19.702" };
public string[] DepartureGroundstart { get; set; } = { "N051.16.42.803:E006.44.59.646", "N051.16.47.401:E006.45.09.066" };
public List<string> ArrivalStartPoint { get; set; }
public string Elevation { get; set; } = "150.0";
public string[] RunwayNames { get; } = { "23L", "23R", "05R", "05L" };
public string RunwayHeadingLastNumber { get; } = "2";
public List<string>[] ILSDefinition { get; }
#endregion
internal EDDL(string _selectedRunwayDirection)
{
ICAO = "EDDL";
RunwayDirections.Add("23");
RunwayDirections.Add("05");
#region Sort
SelectedRunwayDirection = _selectedRunwayDirection;
if (_selectedRunwayDirection == RunwayDirections[0])
Expand All @@ -96,79 +84,154 @@ internal EDDL(string _selectedRunwayDirection)
{
SelectedRunwayDirectionIndex = 1;
}
SIDS = new List<string>[RunwayDirections.Count()];
// SID
SIDSRoute = new List<string>[RunwayDirections.Count()];
for (int i = 0; i < RunwayDirections.Count(); i++)
{
SIDS[i] = new List<string>();
SIDSRoute[i] = new List<string>();
}
STARS = new List<string>[RunwayDirections.Count()];
SIDSFpln = new List<string>[RunwayDirections.Count()];
for (int i = 0; i < RunwayDirections.Count(); i++)
{
STARS[i] = new List<string>();
SIDSFpln[i] = new List<string>();
}
TRANSITION = new List<string>[RunwayDirections.Count()];
// STAR
STARSRoute = new List<string>[RunwayDirections.Count()];
for (int i = 0; i < RunwayDirections.Count(); i++)
{
TRANSITION[i] = new List<string>();
STARSRoute[i] = new List<string>();
}
STARSFpln = new List<string>[RunwayDirections.Count()];
for (int i = 0; i < RunwayDirections.Count(); i++)
{
STARSFpln[i] = new List<string>();
}
// TRANS
TRANSITIONRoute = new List<string>[RunwayDirections.Count()];
for (int i = 0; i < RunwayDirections.Count(); i++)
{
TRANSITIONRoute[i] = new List<string>();
}
TRANSITIONFpln = new List<string>[RunwayDirections.Count()];
for (int i = 0; i < RunwayDirections.Count(); i++)
{
TRANSITIONFpln[i] = new List<string>();
}
#endregion

#region SIDS 23
SIDS[0].Add(COL5T);
SIDS[0].Add(DODEN9T);
SIDS[0].Add(GMH9T);
SIDS[0].Add(KUMIK6T);
SIDS[0].Add(LMA2T);
SIDS[0].Add(MEVEL3T);
SIDS[0].Add(MODRU1T);
SIDS[0].Add(NETEX5T);
SIDS[0].Add(NVO1T);
SIDS[0].Add(NUDGO5T);
SIDS[0].Add(SONEB7T);
SIDSFpln[0].Add(CreateFplnRouteBySID(nameof(COL5T)));
SIDSFpln[0].Add(CreateFplnRouteBySID(nameof(DODEN9T)));
SIDSFpln[0].Add(CreateFplnRouteBySID(nameof(GMH9T)));
SIDSFpln[0].Add(CreateFplnRouteBySID(nameof(KUMIK6T)));
SIDSFpln[0].Add(CreateFplnRouteBySID(nameof(LMA2T)));
SIDSFpln[0].Add(CreateFplnRouteBySID(nameof(MEVEL3T)));
SIDSFpln[0].Add(CreateFplnRouteBySID(nameof(MODRU1T)));
SIDSFpln[0].Add(CreateFplnRouteBySID(nameof(NETEX5T)));
SIDSFpln[0].Add(CreateFplnRouteBySID(nameof(NVO1T)));
SIDSFpln[0].Add(CreateFplnRouteBySID(nameof(NUDGO5T)));
SIDSFpln[0].Add(CreateFplnRouteBySID(nameof(SONEB7T)));

SIDSRoute[0].Add(COL5T);
SIDSRoute[0].Add(DODEN9T);
SIDSRoute[0].Add(GMH9T);
SIDSRoute[0].Add(KUMIK6T);
SIDSRoute[0].Add(LMA2T);
SIDSRoute[0].Add(MEVEL3T);
SIDSRoute[0].Add(MODRU1T);
SIDSRoute[0].Add(NETEX5T);
SIDSRoute[0].Add(NVO1T);
SIDSRoute[0].Add(NUDGO5T);
SIDSRoute[0].Add(SONEB7T);
#endregion
#region SIDS 05
SIDS[1].Add(COL4Z);
SIDS[1].Add(DODEN6Z);
SIDS[1].Add(GMH5Z);
SIDS[1].Add(KUMIK4Z);
SIDS[1].Add(LMA1Z);
SIDS[1].Add(MEVEL9Z);
SIDS[1].Add(MODRU6Z);
SIDS[1].Add(NETEX3Z);
SIDS[1].Add(NVO2Z);
SIDS[1].Add(NUDGO4Z);
SIDS[1].Add(SONEB5Z);
SIDSFpln[0].Add(CreateFplnRouteBySID(nameof(COL4Z)));
SIDSFpln[0].Add(CreateFplnRouteBySID(nameof(DODEN6Z)));
SIDSFpln[0].Add(CreateFplnRouteBySID(nameof(GMH5Z)));
SIDSFpln[0].Add(CreateFplnRouteBySID(nameof(KUMIK4Z)));
SIDSFpln[0].Add(CreateFplnRouteBySID(nameof(LMA1Z)));
SIDSFpln[0].Add(CreateFplnRouteBySID(nameof(MEVEL9Z)));
SIDSFpln[0].Add(CreateFplnRouteBySID(nameof(MODRU6Z)));
SIDSFpln[0].Add(CreateFplnRouteBySID(nameof(NETEX3Z)));
SIDSFpln[0].Add(CreateFplnRouteBySID(nameof(NVO2Z)));
SIDSFpln[0].Add(CreateFplnRouteBySID(nameof(NUDGO4Z)));
SIDSFpln[0].Add(CreateFplnRouteBySID(nameof(SONEB5Z)));


SIDSRoute[1].Add(COL4Z);
SIDSRoute[1].Add(DODEN6Z);
SIDSRoute[1].Add(GMH5Z);
SIDSRoute[1].Add(KUMIK4Z);
SIDSRoute[1].Add(LMA1Z);
SIDSRoute[1].Add(MEVEL9Z);
SIDSRoute[1].Add(MODRU6Z);
SIDSRoute[1].Add(NETEX3Z);
SIDSRoute[1].Add(NVO2Z);
SIDSRoute[1].Add(NUDGO4Z);
SIDSRoute[1].Add(SONEB5Z);
#endregion

#region STAR 23
STARS[0].Add(LMA8G);
STARS[0].Add(PISAP1G);
STARS[0].Add(DOMUX2G);
STARS[0].Add(HALME1G);
STARS[0].Add(BIKMU1G);
STARSFpln[0].Add(CreateFplnRouteBySTAR(nameof(LMA8G)));
STARSFpln[0].Add(CreateFplnRouteBySTAR(nameof(PISAP1G)));
STARSFpln[0].Add(CreateFplnRouteBySTAR(nameof(DOMUX2G)));
STARSFpln[0].Add(CreateFplnRouteBySTAR(nameof(HALME1G)));
STARSFpln[0].Add(CreateFplnRouteBySTAR(nameof(BIKMU1G)));

STARSRoute[0].Add(LMA8G);
STARSRoute[0].Add(PISAP1G);
STARSRoute[0].Add(DOMUX2G);
STARSRoute[0].Add(HALME1G);
STARSRoute[0].Add(BIKMU1G);
#endregion
#region STAR 05
STARS[1].Add(LMA9X);
STARS[1].Add(PISAP1X);
STARS[1].Add(DOMUX2X);
STARS[1].Add(HALME1X);
STARS[1].Add(BIKMU1X);
STARSFpln[1].Add(CreateFplnRouteBySTAR(nameof(LMA9X)));
STARSFpln[1].Add(CreateFplnRouteBySTAR(nameof(PISAP1X)));
STARSFpln[1].Add(CreateFplnRouteBySTAR(nameof(DOMUX2X)));
STARSFpln[1].Add(CreateFplnRouteBySTAR(nameof(HALME1X)));
STARSFpln[1].Add(CreateFplnRouteBySTAR(nameof(BIKMU1X)));

STARSRoute[1].Add(LMA9X);
STARSRoute[1].Add(PISAP1X);
STARSRoute[1].Add(DOMUX2X);
STARSRoute[1].Add(HALME1X);
STARSRoute[1].Add(BIKMU1X);
#endregion

#region TRANS 23
TRANSITION[0].Add(LMA23);
TRANSITION[0].Add(PISAP23);
TRANSITION[0].Add(DOMUX23);
TRANSITION[0].Add(HALME23);
TRANSITION[0].Add(BIKMU23);
TRANSITIONFpln[0].Add(CreateFplnRouteBySTAR(nameof(LMA23)));
TRANSITIONFpln[0].Add(CreateFplnRouteBySTAR(nameof(PISAP23)));
TRANSITIONFpln[0].Add(CreateFplnRouteBySTAR(nameof(DOMUX23)));
TRANSITIONFpln[0].Add(CreateFplnRouteBySTAR(nameof(HALME23)));
TRANSITIONFpln[0].Add(CreateFplnRouteBySTAR(nameof(BIKMU23)));

TRANSITIONRoute[0].Add(LMA23);
TRANSITIONRoute[0].Add(PISAP23);
TRANSITIONRoute[0].Add(DOMUX23);
TRANSITIONRoute[0].Add(HALME23);
TRANSITIONRoute[0].Add(BIKMU23);
#endregion
#region TRANS 05
TRANSITION[1].Add(LMA05);
TRANSITION[1].Add(PISAP05);
TRANSITION[1].Add(DOMUX05);
TRANSITION[1].Add(HALME05);
TRANSITION[1].Add(BIKMU05);
TRANSITION[1].Add(ELDAR05);
TRANSITIONFpln[1].Add(CreateFplnRouteBySTAR(nameof(LMA23)));
TRANSITIONFpln[1].Add(CreateFplnRouteBySTAR(nameof(PISAP05)));
TRANSITIONFpln[1].Add(CreateFplnRouteBySTAR(nameof(DOMUX05)));
TRANSITIONFpln[1].Add(CreateFplnRouteBySTAR(nameof(HALME05)));
TRANSITIONFpln[1].Add(CreateFplnRouteBySTAR(nameof(BIKMU05)));
TRANSITIONFpln[1].Add(CreateFplnRouteBySTAR(nameof(ELDAR05)));

TRANSITIONRoute[1].Add(LMA05);
TRANSITIONRoute[1].Add(PISAP05);
TRANSITIONRoute[1].Add(DOMUX05);
TRANSITIONRoute[1].Add(HALME05);
TRANSITIONRoute[1].Add(BIKMU05);
// include ELDAR?
TRANSITIONRoute[1].Add(ELDAR05);

InboundAltitude.Add("13000");
InboundAltitude.Add("17000");
InboundAltitude.Add("13000");
InboundAltitude.Add("13000");
InboundAltitude.Add("13000");
InboundAltitude.Add("13000");
#endregion

#region ILS definition
Expand All @@ -177,6 +240,43 @@ internal EDDL(string _selectedRunwayDirection)
ILSDefinition[0] = new List<string> { "ILS23L:51.2939846:6.7821006:51.2798199:6.7524291", "ILS23R:51.2968503:6.7762140:51.2838245:6.7490896", "ILS05R:51.2808697:6.7546887:51.2950353:6.7842650", "ILS05L:51.2853858:6.7522646:51.2977799:6.7782330" };
ILSDefinition[1] = ILSDefinition[0];
#endregion

#region SIM settings
Pseudopilots = new List<string> { "EDDL_APP", "EDDL_M_APP", "EDGG_P_CTR" };
Holdings = new string[] { "HOLDING:ADEMI:284:-1", "HOLDING:BOT:238:-1", "HOLDING:BAM:251:-1", "HOLDING:DL524:232:1", "HOLDING:DL503:232:-1", "HOLDING:DL429:52:-1", "HOLDING:DL409:52:1", "HOLDING:DOMEG:170:-1", "HOLDING:ELDAR:356:-1", "HOLDING:HMM:257:-1", "HOLDING:LMA:240:1", "HOLDING:LEBTI:234:1", "HOLDING:MHV:359:-1", "HOLDING:RONAD:263:1" };
DepartureAirstart = new string[] { "N051.16.52.419:E006.45.19.666", "N051.17.49.449:E006.47.19.702" };
DepartureGroundstart = new string[] { "N051.16.42.803:E006.44.59.646", "N051.16.47.401:E006.45.09.066" };
Elevation = "150.0";
RunwayNames = new string[] { "23L", "23R", "05R", "05L" };
RunwayHeadingLastNumber = "2";

#endregion

#region start positions
InboundStartPosition = new List<string>();
InboundStartPosition.Add("N051.05.20.219:E005.43.28.483");
InboundStartPosition.Add("N052.05.52.590:E006.28.30.781");
InboundStartPosition.Add("N051.30.37.689:E008.02.50.044");
InboundStartPosition.Add("N051.51.19.845:E007.42.27.592");
InboundStartPosition.Add("N050.45.16.504:E006.44.28.864");
InboundStartPosition.Add("N050.45.16.504:E006.44.28.864");

#endregion






}

private string CreateFplnRouteBySID(string SIDname)
{
return SIDname + " " + SIDname.Substring(0, SIDname.Length - 2);
}
private string CreateFplnRouteBySTAR(string STARname)
{
return STARname.Substring(0, STARname.Length - 2) + " " + STARname;
}
}
}
Loading

0 comments on commit da5a59b

Please sign in to comment.