diff --git a/VectoCore/Models/Declaration/AirDrag.cs b/VectoCore/Models/Declaration/AirDrag.cs index 909d2a72204dccfa332f692d08f0f80266b6bf18..1b66bee4583411ae8306e248319088675ac08b47 100644 --- a/VectoCore/Models/Declaration/AirDrag.cs +++ b/VectoCore/Models/Declaration/AirDrag.cs @@ -7,7 +7,7 @@ namespace TUGraz.VectoCore.Models.Declaration { public class AirDrag : LookupData<string, AirDrag.AirDragEntry> { - private const string ResourceId = "TUGraz.VectoCore.Resources.Declaration.VCDV.parameters.csv"; + protected const string ResourceId = "TUGraz.VectoCore.Resources.Declaration.VCDV.parameters.csv"; public AirDrag() { @@ -44,6 +44,35 @@ namespace TUGraz.VectoCore.Models.Declaration public double A1 { get; set; } public double A2 { get; set; } public double A3 { get; set; } + + protected bool Equals(AirDragEntry other) + { + return A1.Equals(other.A1) && A2.Equals(other.A2) && A3.Equals(other.A3); + } + + public override bool Equals(object obj) + { + if (ReferenceEquals(null, obj)) { + return false; + } + if (ReferenceEquals(this, obj)) { + return true; + } + if (obj.GetType() != this.GetType()) { + return false; + } + return Equals((AirDragEntry)obj); + } + + public override int GetHashCode() + { + unchecked { + var hashCode = A1.GetHashCode(); + hashCode = (hashCode * 397) ^ A2.GetHashCode(); + hashCode = (hashCode * 397) ^ A3.GetHashCode(); + return hashCode; + } + } } } } \ No newline at end of file diff --git a/VectoCore/Models/Declaration/DeclarationData.cs b/VectoCore/Models/Declaration/DeclarationData.cs index beb6b1ef705d299a57005e3e8270134f4ba8156c..f774221996af987afe9b9775a0a01b3d0c5353ee 100644 --- a/VectoCore/Models/Declaration/DeclarationData.cs +++ b/VectoCore/Models/Declaration/DeclarationData.cs @@ -1,5 +1,7 @@ using System; using System.Collections.Generic; +using System.Data; +using NLog.Targets.Wrappers; using TUGraz.VectoCore.Models.SimulationComponent.Data; using TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox; using TUGraz.VectoCore.Models.SimulationComponent.Impl; @@ -21,6 +23,7 @@ namespace TUGraz.VectoCore.Models.Declaration private SteeringPump _steeringPump; private WHTCCorrection _whtcCorrection; private AirDrag _airDrag; + private TorqueConverter _torqueConverter; public static Wheels Wheels { @@ -91,6 +94,11 @@ namespace TUGraz.VectoCore.Models.Declaration get { return Instance()._airDrag ?? (Instance()._airDrag = new AirDrag()); } } + public static TorqueConverter TorqueConverter + { + get { return Instance()._torqueConverter ?? (Instance()._torqueConverter = new TorqueConverter()); } + } + public static int PoweredAxle() { return 1; @@ -220,4 +228,65 @@ namespace TUGraz.VectoCore.Models.Declaration } } } + + public class TorqueConverter : LookupData<double, TorqueConverter.TorqueConverterEntry> + { + protected const string resourceID = "TUGraz.VectoCore.Resources.Declaration.DefaultTC.vtcc"; + + + public TorqueConverter() + { + ParseData(ReadCsvResource(resourceID)); + } + + + [Obsolete("Default Lookup not availabel. Use LookupMu or LookupTorque instead.", true)] + protected new TorqueConverterEntry Lookup(double key) + { + throw new InvalidOperationException( + "Default Lookup not available. Use TorqueConverter.LookupMu() or TorqueConverter.LookupTorque() instead."); + } + + + public NewtonMeter LookupTorque(double nu, PerSecond angularSpeedIn, PerSecond referenceSpeed) + { + var sec = Data.GetSection(kv => kv.Key < nu); + + if (nu < sec.Item1.Key || sec.Item2.Key < nu) { + Log.Warn(string.Format("TCextrapol: nu = {0} [n_out/n_in]", nu)); + } + + var torque = VectoMath.Interpolate(sec.Item1.Key, sec.Item2.Key, sec.Item1.Value.Torque, sec.Item2.Value.Torque, nu); + return torque * Math.Pow((angularSpeedIn / referenceSpeed).Scalar(), 2); + } + + public double LookupMu(double nu) + { + var sec = Data.GetSection(kv => kv.Key < nu); + + if (nu < sec.Item1.Key || sec.Item2.Key < nu) { + Log.Warn(string.Format("TCextrapol: nu = {0} [n_out/n_in]", nu)); + } + + return VectoMath.Interpolate(sec.Item1.Key, sec.Item2.Key, sec.Item1.Value.Mu, sec.Item2.Value.Mu, nu); + } + + + protected override void ParseData(DataTable table) + { + Data.Clear(); + foreach (DataRow row in table.Rows) { + Data[row.ParseDouble("nue")] = new TorqueConverterEntry { + Mu = row.ParseDouble("mue"), + Torque = row.ParseDouble("MP1000 (1000/rpm)^2*Nm").SI<NewtonMeter>() + }; + } + } + + public class TorqueConverterEntry + { + public double Mu { get; set; } + public NewtonMeter Torque { get; set; } + } + } } \ No newline at end of file diff --git a/VectoCore/Models/Declaration/LookupData.cs b/VectoCore/Models/Declaration/LookupData.cs index d3e825d6f2675805f74d1ab1b9d25190e665d812..fc9b9a5a0fbb9ae512c8c3699c35a07fbb0ba191 100644 --- a/VectoCore/Models/Declaration/LookupData.cs +++ b/VectoCore/Models/Declaration/LookupData.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Data; -using System.Reflection; using Common.Logging; using TUGraz.VectoCore.Utils; @@ -12,24 +11,15 @@ namespace TUGraz.VectoCore.Models.Declaration protected LookupData() { Log = LogManager.GetLogger(GetType()); - //var csvFile = ReadCsvResource(ResourceId); - //ParseData(csvFile); - //ParseData(ReadData()); } [NonSerialized] protected ILog Log; - //protected abstract string ResourceId { get; } - - //protected abstract DataTable ReadData(); - protected abstract void ParseData(DataTable table); protected DataTable ReadCsvResource(string resourceId) { - var myAssembly = Assembly.GetExecutingAssembly(); - var file = myAssembly.GetManifestResourceStream(resourceId); - return VectoCSVFile.ReadStream(file); + return VectoCSVFile.ReadStream(RessourceHelper.ReadStream(resourceId)); } protected DataTable ReadCsvFile(string fileName) diff --git a/VectoCore/Models/SimulationComponent/Impl/Vehicle.cs b/VectoCore/Models/SimulationComponent/Impl/Vehicle.cs index c72b5e3ab25c821d4090d9f9c824b897336b70bf..e17dd07e3409fd09dfe32e22b3a842056e283151 100644 --- a/VectoCore/Models/SimulationComponent/Impl/Vehicle.cs +++ b/VectoCore/Models/SimulationComponent/Impl/Vehicle.cs @@ -90,15 +90,15 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl CdA *= AirDragInterpolate(curve, _currentState.Velocity); break; - //todo + // todo ask raphael: What is the air cd decl mode? //case tCdMode.CdOfVdecl // CdA = AirDragInterpolate(curve, _currentState.Velocity); // break; case CrossWindCorrectionMode.VAirBeta: - //todo - //vAir = DrivingCycleEntry.AirSpeedRelativeToVehicle; - //CdA *= AirDragInterpolate(Math.Abs(DrivingCycleEntry.WindYawAngle)) + //todo: get data from driving cycle + //vAir = DrivingCycleData.DrivingCycleEntry.AirSpeedRelativeToVehicle; + //CdA *= AirDragInterpolate(Math.Abs(DrivingCycleData.DrivingCycleEntry.WindYawAngle)) throw new NotImplementedException("VAirBeta is not implemented"); //break; } @@ -138,13 +138,9 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl var points = new List<Point> { new Point { X = 0.SI<MeterPerSecond>(), Y = 0 } }; - const int STEP = 10; - const double PARTITION = STEP / 180.0; - const double HALF_PARTITION = PARTITION / 2.0; - for (var vVeh = 60; vVeh <= 100; vVeh += 5) { var cdASum = 0.0; - for (var alpha = 0; alpha <= 180; alpha += STEP) { + for (var alpha = 0; alpha <= 180; alpha += 10) { var vWindX = Physics.BaseWindSpeed * Math.Cos(alpha.ToRadian()); var vWindY = Physics.BaseWindSpeed * Math.Sin(alpha.ToRadian()); var vAirX = vVeh + vWindX; @@ -156,7 +152,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl var deltaCdA = VectoMath.Interpolate(sec.Item1.Key, sec.Item2.Key, sec.Item1.Value, sec.Item2.Value, beta); var cdA = cdA0Actual + deltaCdA; - var degreeShare = ((vVeh != 0 && vVeh != 180) ? PARTITION : HALF_PARTITION); + var degreeShare = ((vVeh != 0 && vVeh != 180) ? 10.0 / 180.0 : 5.0 / 180.0); cdASum += degreeShare * cdA * (vAir * vAir / (vVeh * vVeh)).Scalar(); } diff --git a/VectoCore/Resources/Declaration/WHTC.csv b/VectoCore/Resources/Declaration/WHTC.csv deleted file mode 100644 index 127fab777ee44c985d3ab5ce9078bbe8d0c8d336..0000000000000000000000000000000000000000 --- a/VectoCore/Resources/Declaration/WHTC.csv +++ /dev/null @@ -1,1802 +0,0 @@ -# Normalized WHTC -time [s],n_norm,T_norm -1,0,0 -2,0,0 -3,0,0 -4,0,0 -5,0,0 -6,0,0 -7,1.5,8.9 -8,15.8,30.9 -9,27.4,1.3 -10,32.6,0.7 -11,34.8,1.2 -12,36.2,7.4 -13,37.1,6.2 -14,37.9,10.2 -15,39.6,12.3 -16,42.3,12.5 -17,45.3,12.6 -18,48.6,6 -19,40.8,0 -20,33,16.3 -21,42.5,27.4 -22,49.3,26.7 -23,54,18 -24,57.1,12.9 -25,58.9,8.6 -26,59.3,6 -27,59,4.9 -28,57.9,-1 -29,55.7,-1 -30,52.1,-1 -31,46.4,-1 -32,38.6,-1 -33,29,-1 -34,20.8,-1 -35,16.9,-1 -36,16.9,42.5 -37,18.8,38.4 -38,20.7,32.9 -39,21,0 -40,19.1,0 -41,13.7,0 -42,2.2,0 -43,0,0 -44,0,0 -45,0,0 -46,0,0 -47,0,0 -48,0,0 -49,0,0 -50,0,13.1 -51,13.1,30.1 -52,26.3,25.5 -53,35,32.2 -54,41.7,14.3 -55,42.2,0 -56,42.8,11.6 -57,51,20.9 -58,60,9.6 -59,49.4,0 -60,38.9,16.6 -61,43.4,30.8 -62,49.4,14.2 -63,40.5,0 -64,31.5,43.5 -65,36.6,78.2 -66,40.8,67.6 -67,44.7,59.1 -68,48.3,52 -69,51.9,63.8 -70,54.7,27.9 -71,55.3,18.3 -72,55.1,16.3 -73,54.8,11.1 -74,54.7,11.5 -75,54.8,17.5 -76,55.6,18 -77,57,14.1 -78,58.1,7 -79,43.3,0 -80,28.5,25 -81,30.4,47.8 -82,32.1,39.2 -83,32.7,39.3 -84,32.4,17.3 -85,31.6,11.4 -86,31.1,10.2 -87,31.1,19.5 -88,31.4,22.5 -89,31.6,22.9 -90,31.6,24.3 -91,31.9,26.9 -92,32.4,30.6 -93,32.8,32.7 -94,33.7,32.5 -95,34.4,29.5 -96,34.3,26.5 -97,34.4,24.7 -98,35,24.9 -99,35.6,25.2 -100,36.1,24.8 -101,36.3,24 -102,36.2,23.6 -103,36.2,23.5 -104,36.8,22.7 -105,37.2,20.9 -106,37,19.2 -107,36.3,18.4 -108,35.4,17.6 -109,35.2,14.9 -110,35.4,9.9 -111,35.5,4.3 -112,35.2,6.6 -113,34.9,10 -114,34.7,25.1 -115,34.4,29.3 -116,34.5,20.7 -117,35.2,16.6 -118,35.8,16.2 -119,35.6,20.3 -120,35.3,22.5 -121,35.3,23.4 -122,34.7,11.9 -123,45.5,0 -124,56.3,-1 -125,46.2,-1 -126,50.1,0 -127,54,-1 -128,40.5,-1 -129,27,-1 -130,13.5,-1 -131,0,0 -132,0,0 -133,0,0 -134,0,0 -135,0,0 -136,0,0 -137,0,0 -138,0,0 -139,0,0 -140,0,0 -141,0,0 -142,0,4.9 -143,0,7.3 -144,4.4,28.7 -145,11.1,26.4 -146,15,9.4 -147,15.9,0 -148,15.3,0 -149,14.2,0 -150,13.2,0 -151,11.6,0 -152,8.4,0 -153,5.4,0 -154,4.3,5.6 -155,5.8,24.4 -156,9.7,20.7 -157,13.6,21.1 -158,15.6,21.5 -159,16.5,21.9 -160,18,22.3 -161,21.1,46.9 -162,25.2,33.6 -163,28.1,16.6 -164,28.8,7 -165,27.5,5 -166,23.1,3 -167,16.9,1.9 -168,12.2,2.6 -169,9.9,3.2 -170,9.1,4 -171,8.8,3.8 -172,8.5,12.2 -173,8.2,29.4 -174,9.6,20.1 -175,14.7,16.3 -176,24.5,8.7 -177,39.4,3.3 -178,39,2.9 -179,38.5,5.9 -180,42.4,8 -181,38.2,6 -182,41.4,3.8 -183,44.6,5.4 -184,38.8,8.2 -185,37.5,8.9 -186,35.4,7.3 -187,28.4,7 -188,14.8,7 -189,0,5.9 -190,0,0 -191,0,0 -192,0,0 -193,0,0 -194,0,0 -195,0,0 -196,0,0 -197,0,0 -198,0,0 -199,0,0 -200,0,0 -201,0,0 -202,0,0 -203,0,0 -204,0,0 -205,0,0 -206,0,0 -207,0,0 -208,0,0 -209,0,0 -210,0,0 -211,0,0 -212,0,0 -213,0,0 -214,0,0 -215,0,0 -216,0,0 -217,0,0 -218,0,0 -219,0,0 -220,0,0 -221,0,0 -222,0,0 -223,0,0 -224,0,0 -225,0,0 -226,0,0 -227,0,0 -228,0,0 -229,0,0 -230,0,0 -231,0,0 -232,0,0 -233,0,0 -234,0,0 -235,0,0 -236,0,0 -237,0,0 -238,0,0 -239,0,0 -240,0,0 -241,0,0 -242,0,0 -243,0,0 -244,0,0 -245,0,0 -246,0,0 -247,0,0 -248,0,0 -249,0,0 -250,0,0 -251,0,0 -252,0,0 -253,0,31.6 -254,9.4,13.6 -255,22.2,16.9 -256,33,53.5 -257,43.7,22.1 -258,39.8,0 -259,36,45.7 -260,47.6,75.9 -261,61.2,70.4 -262,72.3,70.4 -263,76,-1 -264,74.3,-1 -265,68.5,-1 -266,61,-1 -267,56,-1 -268,54,-1 -269,53,-1 -270,50.8,-1 -271,46.8,-1 -272,41.7,-1 -273,35.9,-1 -274,29.2,-1 -275,20.7,-1 -276,10.1,-1 -277,0,-1 -278,0,0 -279,0,0 -280,0,0 -281,0,0 -282,0,0 -283,0,0 -284,0,0 -285,0,0 -286,0,0 -287,0,0 -288,0,0 -289,0,0 -290,0,0 -291,0,0 -292,0,0 -293,0,0 -294,0,0 -295,0,0 -296,0,0 -297,0,0 -298,0,0 -299,0,0 -300,0,0 -301,0,0 -302,0,0 -303,0,0 -304,0,0 -305,0,0 -306,0,0 -307,0,0 -308,0,0 -309,0,0 -310,0,0 -311,0,0 -312,0,0 -313,0,0 -314,0,0 -315,0,0 -316,0,0 -317,0,0 -318,0,0 -319,0,0 -320,0,0 -321,0,0 -322,0,0 -323,0,0 -324,4.5,41 -325,17.2,38.9 -326,30.1,36.8 -327,41,34.7 -328,50,32.6 -329,51.4,0.1 -330,47.8,-1 -331,40.2,-1 -332,32,-1 -333,24.4,-1 -334,16.8,-1 -335,8.1,-1 -336,0,-1 -337,0,0 -338,0,0 -339,0,0 -340,0,0 -341,0,0 -342,0,0 -343,0,0 -344,0,0 -345,0,0 -346,0,0 -347,0,0 -348,0,0 -349,0,0 -350,0,0 -351,0,0 -352,0,0 -353,0,0 -354,0,0.5 -355,0,4.9 -356,9.2,61.3 -357,22.4,40.4 -358,36.5,50.1 -359,47.7,21 -360,38.8,0 -361,30,37 -362,37,63.6 -363,45.5,90.8 -364,54.5,40.9 -365,45.9,0 -366,37.2,47.5 -367,44.5,84.4 -368,51.7,32.4 -369,58.1,15.2 -370,45.9,0 -371,33.6,35.8 -372,36.9,67 -373,40.2,84.7 -374,43.4,84.3 -375,45.7,84.3 -376,46.5,-1 -377,46.1,-1 -378,43.9,-1 -379,39.3,-1 -380,47,-1 -381,54.6,-1 -382,62,-1 -383,52,-1 -384,43,-1 -385,33.9,-1 -386,28.4,-1 -387,25.5,-1 -388,24.6,11 -389,25.2,14.7 -390,28.6,28.4 -391,35.5,65 -392,43.8,75.3 -393,51.2,34.2 -394,40.7,0 -395,30.3,45.4 -396,34.2,83.1 -397,37.6,85.3 -398,40.8,87.5 -399,44.8,89.7 -400,50.6,91.9 -401,57.6,94.1 -402,64.6,44.6 -403,51.6,0 -404,38.7,37.4 -405,42.4,70.3 -406,46.5,89.1 -407,50.6,93.9 -408,53.8,33 -409,55.5,20.3 -410,55.8,5.2 -411,55.4,-1 -412,54.4,-1 -413,53.1,-1 -414,51.8,-1 -415,50.3,-1 -416,48.4,-1 -417,45.9,-1 -418,43.1,-1 -419,40.1,-1 -420,37.4,-1 -421,35.1,-1 -422,32.8,-1 -423,45.3,0 -424,57.8,-1 -425,50.6,-1 -426,41.6,-1 -427,47.9,0 -428,54.2,-1 -429,48.1,-1 -430,47,31.3 -431,49,38.3 -432,52,40.1 -433,53.3,14.5 -434,52.6,0.8 -435,49.8,-1 -436,51,18.6 -437,56.9,38.9 -438,67.2,45 -439,78.6,21.5 -440,65.5,0 -441,52.4,31.3 -442,56.4,60.1 -443,59.7,29.2 -444,45.1,0 -445,30.6,4.2 -446,30.9,8.4 -447,30.5,4.3 -448,44.6,0 -449,58.8,-1 -450,55.1,-1 -451,50.6,-1 -452,45.3,-1 -453,39.3,-1 -454,49.1,0 -455,58.8,-1 -456,50.7,-1 -457,42.4,-1 -458,44.1,0 -459,45.7,-1 -460,32.5,-1 -461,20.7,-1 -462,10,-1 -463,0,0 -464,0,1.5 -465,0.9,41.1 -466,7,46.3 -467,12.8,48.5 -468,17,50.7 -469,20.9,52.9 -470,26.7,55 -471,35.5,57.2 -472,46.9,23.8 -473,44.5,0 -474,42.1,45.7 -475,55.6,77.4 -476,68.8,100 -477,81.7,47.9 -478,71.2,0 -479,60.7,38.3 -480,68.8,72.7 -481,75,-1 -482,61.3,-1 -483,53.5,-1 -484,45.9,58 -485,48.1,80 -486,49.4,97.9 -487,49.7,-1 -488,48.7,-1 -489,45.5,-1 -490,40.4,-1 -491,49.7,0 -492,59,-1 -493,48.9,-1 -494,40,-1 -495,33.5,-1 -496,30,-1 -497,29.1,12 -498,29.3,40.4 -499,30.4,29.3 -500,32.2,15.4 -501,33.9,15.8 -502,35.3,14.9 -503,36.4,15.1 -504,38,15.3 -505,40.3,50.9 -506,43,39.7 -507,45.5,20.6 -508,47.3,20.6 -509,48.8,22.1 -510,50.1,22.1 -511,51.4,42.4 -512,52.5,31.9 -513,53.7,21.6 -514,55.1,11.6 -515,56.8,5.7 -516,42.4,0 -517,27.9,8.2 -518,29,15.9 -519,30.4,25.1 -520,32.6,60.5 -521,35.4,72.7 -522,38.4,88.2 -523,41,65.1 -524,42.9,25.6 -525,44.2,15.8 -526,44.9,2.9 -527,45.1,-1 -528,44.8,-1 -529,43.9,-1 -530,42.4,-1 -531,40.2,-1 -532,37.1,-1 -533,47,0 -534,57,-1 -535,45.1,-1 -536,32.6,-1 -537,46.8,0 -538,61.5,-1 -539,56.7,-1 -540,46.9,-1 -541,37.5,-1 -542,30.3,-1 -543,27.3,32.3 -544,30.8,60.3 -545,41.2,62.3 -546,36,0 -547,30.8,32.3 -548,33.9,60.3 -549,34.6,38.4 -550,37,16.6 -551,42.7,62.3 -552,50.4,28.1 -553,40.1,0 -554,29.9,8 -555,32.5,15 -556,34.6,63.1 -557,36.7,58 -558,39.4,52.9 -559,42.8,47.8 -560,46.8,42.7 -561,50.7,27.5 -562,53.4,20.7 -563,54.2,13.1 -564,54.2,0.4 -565,53.4,0 -566,51.4,-1 -567,48.7,-1 -568,45.6,-1 -569,42.4,-1 -570,40.4,-1 -571,39.8,5.8 -572,40.7,39.7 -573,43.8,37.1 -574,48.1,39.1 -575,52,22 -576,54.7,13.2 -577,56.4,13.2 -578,57.5,6.6 -579,42.6,0 -580,27.7,10.9 -581,28.5,21.3 -582,29.2,23.9 -583,29.5,15.2 -584,29.7,8.8 -585,30.4,20.8 -586,31.9,22.9 -587,34.3,61.4 -588,37.2,76.6 -589,40.1,27.5 -590,42.3,25.4 -591,43.5,32 -592,43.8,6 -593,43.5,-1 -594,42.8,-1 -595,41.7,-1 -596,40.4,-1 -597,39.3,-1 -598,38.9,12.9 -599,39,18.4 -600,39.7,39.2 -601,41.4,60 -602,43.7,54.5 -603,46.2,64.2 -604,48.8,73.3 -605,51,82.3 -606,52.1,0 -607,52,-1 -608,50.9,-1 -609,49.4,-1 -610,47.8,-1 -611,46.6,-1 -612,47.3,35.3 -613,49.2,74.1 -614,51.1,95.2 -615,51.7,-1 -616,50.8,-1 -617,47.3,-1 -618,41.8,-1 -619,36.4,-1 -620,30.9,-1 -621,25.5,37.1 -622,33.8,38.4 -623,42.1,-1 -624,34.1,-1 -625,33,37.1 -626,36.4,38.4 -627,43.3,17.1 -628,35.7,0 -629,28.1,11.6 -630,36.5,19.2 -631,45.2,8.3 -632,36.5,0 -633,27.9,32.6 -634,31.5,59.6 -635,34.4,65.2 -636,37,59.6 -637,39,49 -638,40.2,-1 -639,39.8,-1 -640,36,-1 -641,29.7,-1 -642,21.5,-1 -643,14.1,-1 -644,0,0 -645,0,0 -646,0,0 -647,0,0 -648,0,0 -649,0,0 -650,0,0 -651,0,0 -652,0,0 -653,0,0 -654,0,0 -655,0,0 -656,0,3.4 -657,1.4,22 -658,10.1,45.3 -659,21.5,10 -660,32.2,0 -661,42.3,46 -662,57.1,74.1 -663,72.1,34.2 -664,66.9,0 -665,60.4,41.8 -666,69.1,79 -667,77.1,38.3 -668,63.1,0 -669,49.1,47.9 -670,53.4,91.3 -671,57.5,85.7 -672,61.5,89.2 -673,65.5,85.9 -674,69.5,89.5 -675,73.1,75.5 -676,76.2,73.6 -677,79.1,75.6 -678,81.8,78.2 -679,84.1,39 -680,69.6,0 -681,55,25.2 -682,55.8,49.9 -683,56.7,46.4 -684,57.6,76.3 -685,58.4,92.7 -686,59.3,99.9 -687,60.1,95 -688,61,46.7 -689,46.6,0 -690,32.3,34.6 -691,32.7,68.6 -692,32.6,67 -693,31.3,-1 -694,28.1,-1 -695,43,0 -696,58,-1 -697,58.9,-1 -698,49.4,-1 -699,41.5,-1 -700,48.4,0 -701,55.3,-1 -702,41.8,-1 -703,31.6,-1 -704,24.6,-1 -705,15.2,-1 -706,7,-1 -707,0,0 -708,0,0 -709,0,0 -710,0,0 -711,0,0 -712,0,0 -713,0,0 -714,0,0 -715,0,0 -716,0,0 -717,0,0 -718,0,0 -719,0,0 -720,0,0 -721,0,0 -722,0,0 -723,0,0 -724,0,0 -725,0,0 -726,0,0 -727,0,0 -728,0,0 -729,0,0 -730,0,0 -731,0,0 -732,0,0 -733,0,0 -734,0,0 -735,0,0 -736,0,0 -737,0,0 -738,0,0 -739,0,0 -740,0,0 -741,0,0 -742,0,0 -743,0,0 -744,0,0 -745,0,0 -746,0,0 -747,0,0 -748,0,0 -749,0,0 -750,0,0 -751,0,0 -752,0,0 -753,0,0 -754,0,0 -755,0,0 -756,0,0 -757,0,0 -758,0,0 -759,0,0 -760,0,0 -761,0,0 -762,0,0 -763,0,0 -764,0,0 -765,0,0 -766,0,0 -767,0,0 -768,0,0 -769,0,0 -770,0,0 -771,0,22 -772,4.5,25.8 -773,15.5,42.8 -774,30.5,46.8 -775,45.5,29.3 -776,49.2,13.6 -777,39.5,0 -778,29.7,15.1 -779,34.8,26.9 -780,40,13.6 -781,42.2,-1 -782,42.1,-1 -783,40.8,-1 -784,37.7,37.6 -785,47,35 -786,48.8,33.4 -787,41.7,-1 -788,27.7,-1 -789,17.2,-1 -790,14,37.6 -791,18.4,25 -792,27.6,17.7 -793,39.8,6.8 -794,34.3,0 -795,28.7,26.5 -796,41.5,40.9 -797,53.7,17.5 -798,42.4,0 -799,31.2,27.3 -800,32.3,53.2 -801,34.5,60.6 -802,37.6,68 -803,41.2,75.4 -804,45.8,82.8 -805,52.3,38.2 -806,42.5,0 -807,32.6,30.5 -808,35,57.9 -809,36,77.3 -810,37.1,96.8 -811,39.6,80.8 -812,43.4,78.3 -813,47.2,73.4 -814,49.6,66.9 -815,50.2,62 -816,50.2,57.7 -817,50.6,62.1 -818,52.3,62.9 -819,54.8,37.5 -820,57,18.3 -821,42.3,0 -822,27.6,29.1 -823,28.4,57 -824,29.1,51.8 -825,29.6,35.3 -826,29.7,33.3 -827,29.8,17.7 -828,29.5,-1 -829,28.9,-1 -830,43,0 -831,57.1,-1 -832,57.7,-1 -833,56,-1 -834,53.8,-1 -835,51.2,-1 -836,48.1,-1 -837,44.5,-1 -838,40.9,-1 -839,38.1,-1 -840,37.2,42.7 -841,37.5,70.8 -842,39.1,48.6 -843,41.3,0.1 -844,42.3,-1 -845,42,-1 -846,40.8,-1 -847,38.6,-1 -848,35.5,-1 -849,32.1,-1 -850,29.6,-1 -851,28.8,39.9 -852,29.2,52.9 -853,30.9,76.1 -854,34.3,76.5 -855,38.3,75.5 -856,42.5,74.8 -857,46.6,74.2 -858,50.7,76.2 -859,54.8,75.1 -860,58.7,36.3 -861,45.2,0 -862,31.8,37.2 -863,33.8,71.2 -864,35.5,46.4 -865,36.6,33.6 -866,37.2,20 -867,37.2,-1 -868,37,-1 -869,36.6,-1 -870,36,-1 -871,35.4,-1 -872,34.7,-1 -873,34.1,-1 -874,33.6,-1 -875,33.3,-1 -876,33.1,-1 -877,32.7,-1 -878,31.4,-1 -879,45,0 -880,58.5,-1 -881,53.7,-1 -882,47.5,-1 -883,40.6,-1 -884,34.1,-1 -885,45.3,0 -886,56.4,-1 -887,51,-1 -888,44.5,-1 -889,36.4,-1 -890,26.6,-1 -891,20,-1 -892,13.3,-1 -893,6.7,-1 -894,0,0 -895,0,0 -896,0,0 -897,0,0 -898,0,0 -899,0,0 -900,0,0 -901,0,5.8 -902,2.5,27.9 -903,12.4,29 -904,19.4,30.1 -905,29.3,31.2 -906,37.1,10.4 -907,40.6,4.9 -908,35.8,0 -909,30.9,7.6 -910,35.4,13.8 -911,36.5,11.1 -912,40.8,48.5 -913,49.8,3.7 -914,41.2,0 -915,32.7,29.7 -916,39.4,52.1 -917,48.8,22.7 -918,41.6,0 -919,34.5,46.6 -920,39.7,84.4 -921,44.7,83.2 -922,49.5,78.9 -923,52.3,83.8 -924,53.4,77.7 -925,52.1,69.6 -926,47.9,63.6 -927,46.4,55.2 -928,46.5,53.6 -929,46.4,62.3 -930,46.1,58.2 -931,46.2,61.8 -932,47.3,62.3 -933,49.3,57.1 -934,52.6,58.1 -935,56.3,56 -936,59.9,27.2 -937,45.8,0 -938,31.8,28.8 -939,32.7,56.5 -940,33.4,62.8 -941,34.6,68.2 -942,35.8,68.6 -943,38.6,65 -944,42.3,61.9 -945,44.1,65.3 -946,45.3,63.2 -947,46.5,30.6 -948,46.7,11.1 -949,45.9,16.1 -950,45.6,21.8 -951,45.9,24.2 -952,46.5,24.7 -953,46.7,24.7 -954,46.8,28.2 -955,47.2,31.2 -956,47.6,29.6 -957,48.2,31.2 -958,48.6,33.5 -959,48.8,-1 -960,47.6,-1 -961,46.3,-1 -962,45.2,-1 -963,43.5,-1 -964,41.4,-1 -965,40.3,-1 -966,39.4,-1 -967,38,-1 -968,36.3,-1 -969,35.3,5.8 -970,35.4,30.2 -971,36.6,55.6 -972,38.6,48.5 -973,39.9,41.8 -974,40.3,38.2 -975,40.8,35 -976,41.9,32.4 -977,43.2,26.4 -978,43.5,-1 -979,42.9,-1 -980,41.5,-1 -981,40.9,-1 -982,40.5,-1 -983,39.5,-1 -984,38.3,-1 -985,36.9,-1 -986,35.4,-1 -987,34.5,-1 -988,33.9,-1 -989,32.6,-1 -990,30.9,-1 -991,29.9,-1 -992,29.2,-1 -993,44.1,0 -994,59.1,-1 -995,56.8,-1 -996,53.5,-1 -997,47.8,-1 -998,41.9,-1 -999,35.9,-1 -1000,44.3,0 -1001,52.6,-1 -1002,43.4,-1 -1003,50.6,0 -1004,57.8,-1 -1005,51.6,-1 -1006,44.8,-1 -1007,48.6,0 -1008,52.4,-1 -1009,45.4,-1 -1010,37.2,-1 -1011,26.3,-1 -1012,17.9,-1 -1013,16.2,1.9 -1014,17.8,7.5 -1015,25.2,18 -1016,39.7,6.5 -1017,38.6,0 -1018,37.4,5.4 -1019,43.4,9.7 -1020,46.9,15.7 -1021,52.5,13.1 -1022,56.2,6.3 -1023,44,0 -1024,31.8,20.9 -1025,38.7,36.3 -1026,47.7,47.5 -1027,54.5,22 -1028,41.3,0 -1029,28.1,26.8 -1030,31.6,49.2 -1031,34.5,39.5 -1032,36.4,24 -1033,36.7,-1 -1034,35.5,-1 -1035,33.8,-1 -1036,33.7,19.8 -1037,35.3,35.1 -1038,38,33.9 -1039,40.1,34.5 -1040,42.2,40.4 -1041,45.2,44 -1042,48.3,35.9 -1043,50.1,29.6 -1044,52.3,38.5 -1045,55.3,57.7 -1046,57,50.7 -1047,57.7,25.2 -1048,42.9,0 -1049,28.2,15.7 -1050,29.2,30.5 -1051,31.1,52.6 -1052,33.4,60.7 -1053,35,61.4 -1054,35.3,18.2 -1055,35.2,14.9 -1056,34.9,11.7 -1057,34.5,12.9 -1058,34.1,15.5 -1059,33.5,-1 -1060,31.8,-1 -1061,30.1,-1 -1062,29.6,10.3 -1063,30,26.5 -1064,31,18.8 -1065,31.5,26.5 -1066,31.7,-1 -1067,31.5,-1 -1068,30.6,-1 -1069,30,-1 -1070,30,-1 -1071,29.4,-1 -1072,44.3,0 -1073,59.2,-1 -1074,58.3,-1 -1075,57.1,-1 -1076,55.4,-1 -1077,53.5,-1 -1078,51.5,-1 -1079,49.7,-1 -1080,47.9,-1 -1081,46.4,-1 -1082,45.5,-1 -1083,45.2,-1 -1084,44.3,-1 -1085,43.6,-1 -1086,43.1,-1 -1087,42.5,25.6 -1088,43.3,25.7 -1089,46.3,24 -1090,47.8,20.6 -1091,47.2,3.8 -1092,45.6,4.4 -1093,44.6,4.1 -1094,44.1,-1 -1095,42.9,-1 -1096,40.9,-1 -1097,39.2,-1 -1098,37,-1 -1099,35.1,2 -1100,35.6,43.3 -1101,38.7,47.6 -1102,41.3,40.4 -1103,42.6,45.7 -1104,43.9,43.3 -1105,46.9,41.2 -1106,52.4,40.1 -1107,56.3,39.3 -1108,57.4,25.5 -1109,57.2,25.4 -1110,57,25.4 -1111,56.8,25.3 -1112,56.3,25.3 -1113,55.6,25.2 -1114,56.2,25.2 -1115,58,12.4 -1116,43.4,0 -1117,28.8,26.2 -1118,30.9,49.9 -1119,32.3,40.5 -1120,32.5,12.4 -1121,32.4,12.2 -1122,32.1,6.4 -1123,31,12.4 -1124,30.1,18.5 -1125,30.4,35.6 -1126,31.2,30.1 -1127,31.5,30.8 -1128,31.5,26.9 -1129,31.7,33.9 -1130,32,29.9 -1131,32.1,-1 -1132,31.4,-1 -1133,30.3,-1 -1134,29.8,-1 -1135,44.3,0 -1136,58.9,-1 -1137,52.1,-1 -1138,44.1,-1 -1139,51.7,0 -1140,59.2,-1 -1141,47.2,-1 -1142,35.1,0 -1143,23.1,-1 -1144,13.1,-1 -1145,5,-1 -1146,0,0 -1147,0,0 -1148,0,0 -1149,0,0 -1150,0,0 -1151,0,0 -1152,0,0 -1153,0,0 -1154,0,0 -1155,0,0 -1156,0,0 -1157,0,0 -1158,0,0 -1159,0,0 -1160,0,0 -1161,0,0 -1162,0,0 -1163,0,0 -1164,0,0 -1165,0,0 -1166,0,0 -1167,0,0 -1168,0,0 -1169,0,0 -1170,0,0 -1171,0,0 -1172,0,0 -1173,0,0 -1174,0,0 -1175,0,0 -1176,0,0 -1177,0,0 -1178,0,0 -1179,0,0 -1180,0,0 -1181,0,0 -1182,0,0 -1183,0,0 -1184,0,0 -1185,0,0 -1186,0,0 -1187,0,0 -1188,0,0 -1189,0,0 -1190,0,0 -1191,0,0 -1192,0,0 -1193,0,0 -1194,0,0 -1195,0,0 -1196,0,20.4 -1197,12.6,41.2 -1198,27.3,20.4 -1199,40.4,7.6 -1200,46.1,-1 -1201,44.6,-1 -1202,42.7,14.7 -1203,42.9,7.3 -1204,36.1,0 -1205,29.3,15 -1206,43.8,22.6 -1207,54.9,9.9 -1208,44.9,0 -1209,34.9,47.4 -1210,42.7,82.7 -1211,52,81.2 -1212,61.8,82.7 -1213,71.3,39.1 -1214,58.1,0 -1215,44.9,42.5 -1216,46.3,83.3 -1217,46.8,74.1 -1218,48.1,75.7 -1219,50.5,75.8 -1220,53.6,76.7 -1221,56.9,77.1 -1222,60.2,78.7 -1223,63.7,78 -1224,67.2,79.6 -1225,70.7,80.9 -1226,74.1,81.1 -1227,77.5,83.6 -1228,80.8,85.6 -1229,84.1,81.6 -1230,87.4,88.3 -1231,90.5,91.9 -1232,93.5,94.1 -1233,96.8,96.6 -1234,100,-1 -1235,96,-1 -1236,81.9,-1 -1237,68.1,-1 -1238,58.1,84.7 -1239,58.5,85.4 -1240,59.5,85.6 -1241,61,86.6 -1242,62.6,86.8 -1243,64.1,87.6 -1244,65.4,87.5 -1245,66.7,87.8 -1246,68.1,43.5 -1247,55.2,0 -1248,42.3,37.2 -1249,43,73.6 -1250,43.5,65.1 -1251,43.8,53.1 -1252,43.9,54.6 -1253,43.9,41.2 -1254,43.8,34.8 -1255,43.6,30.3 -1256,43.3,21.9 -1257,42.8,19.9 -1258,42.3,-1 -1259,41.4,-1 -1260,40.2,-1 -1261,38.7,-1 -1262,37.1,-1 -1263,35.6,-1 -1264,34.2,-1 -1265,32.9,-1 -1266,31.8,-1 -1267,30.7,-1 -1268,29.6,-1 -1269,40.4,0 -1270,51.2,-1 -1271,49.6,-1 -1272,48,-1 -1273,46.4,-1 -1274,45,-1 -1275,43.6,-1 -1276,42.3,-1 -1277,41,-1 -1278,39.6,-1 -1279,38.3,-1 -1280,37.1,-1 -1281,35.9,-1 -1282,34.6,-1 -1283,33,-1 -1284,31.1,-1 -1285,29.2,-1 -1286,43.3,0 -1287,57.4,32.8 -1288,59.9,65.4 -1289,61.9,76.1 -1290,65.6,73.7 -1291,69.9,79.3 -1292,74.1,81.3 -1293,78.3,83.2 -1294,82.6,86 -1295,87,89.5 -1296,91.2,90.8 -1297,95.3,45.9 -1298,81,0 -1299,66.6,38.2 -1300,67.9,75.5 -1301,68.4,80.5 -1302,69,85.5 -1303,70,85.2 -1304,71.6,85.9 -1305,73.3,86.2 -1306,74.8,86.5 -1307,76.3,42.9 -1308,63.3,0 -1309,50.4,21.2 -1310,50.6,42.3 -1311,50.6,53.7 -1312,50.4,90.1 -1313,50.5,97.1 -1314,51,100 -1315,51.9,100 -1316,52.6,100 -1317,52.8,32.4 -1318,47.7,0 -1319,42.6,27.4 -1320,42.1,53.5 -1321,41.8,44.5 -1322,41.4,41.1 -1323,41,21 -1324,40.3,0 -1325,39.3,1 -1326,38.3,15.2 -1327,37.6,57.8 -1328,37.3,73.2 -1329,37.3,59.8 -1330,37.4,52.2 -1331,37.4,16.9 -1332,37.1,34.3 -1333,36.7,51.9 -1334,36.2,25.3 -1335,35.6,-1 -1336,34.6,-1 -1337,33.2,-1 -1338,31.6,-1 -1339,30.1,-1 -1340,28.8,-1 -1341,28,29.5 -1342,28.6,100 -1343,28.8,97.3 -1344,28.8,73.4 -1345,29.6,56.9 -1346,30.3,91.7 -1347,31,90.5 -1348,31.8,81.7 -1349,32.6,79.5 -1350,33.5,86.9 -1351,34.6,100 -1352,35.6,78.7 -1353,36.4,50.5 -1354,37,57 -1355,37.3,69.1 -1356,37.6,49.5 -1357,37.8,44.4 -1358,37.8,43.4 -1359,37.8,34.8 -1360,37.6,24 -1361,37.2,-1 -1362,36.3,-1 -1363,35.1,-1 -1364,33.7,-1 -1365,32.4,-1 -1366,31.1,-1 -1367,29.9,-1 -1368,28.7,-1 -1369,29,58.6 -1370,29.7,88.5 -1371,31,86.3 -1372,31.8,43.4 -1373,31.7,-1 -1374,29.9,-1 -1375,40.2,0 -1376,50.4,-1 -1377,47.9,-1 -1378,45,-1 -1379,43,-1 -1380,40.6,-1 -1381,55.5,0 -1382,70.4,41.7 -1383,73.4,83.2 -1384,74,83.7 -1385,74.9,41.7 -1386,60,0 -1387,45.1,41.6 -1388,47.7,84.2 -1389,50.4,50.2 -1390,53,26.1 -1391,59.5,0 -1392,66.2,38.4 -1393,66.4,76.7 -1394,67.6,100 -1395,68.4,76.6 -1396,68.2,47.2 -1397,69,81.4 -1398,69.7,40.6 -1399,54.7,0 -1400,39.8,19.9 -1401,36.3,40 -1402,36.7,59.4 -1403,36.6,77.5 -1404,36.8,94.3 -1405,36.8,100 -1406,36.4,100 -1407,36.3,79.7 -1408,36.7,49.5 -1409,36.6,39.3 -1410,37.3,62.8 -1411,38.1,73.4 -1412,39,72.9 -1413,40.2,72 -1414,41.5,71.2 -1415,42.9,77.3 -1416,44.4,76.6 -1417,45.4,43.1 -1418,45.3,53.9 -1419,45.1,64.8 -1420,46.5,74.2 -1421,47.7,75.2 -1422,48.1,75.5 -1423,48.6,75.8 -1424,48.9,76.3 -1425,49.9,75.5 -1426,50.4,75.2 -1427,51.1,74.6 -1428,51.9,75 -1429,52.7,37.2 -1430,41.6,0 -1431,30.4,36.6 -1432,30.5,73.2 -1433,30.3,81.6 -1434,30.4,89.3 -1435,31.5,90.4 -1436,32.7,88.5 -1437,33.7,97.2 -1438,35.2,99.7 -1439,36.3,98.8 -1440,37.7,100 -1441,39.2,100 -1442,40.9,100 -1443,42.4,99.5 -1444,43.8,98.7 -1445,45.4,97.3 -1446,47,96.6 -1447,47.8,96.2 -1448,48.8,96.3 -1449,50.5,95.1 -1450,51,95.9 -1451,52,94.3 -1452,52.6,94.6 -1453,53,65.5 -1454,53.2,0 -1455,53.2,-1 -1456,52.6,-1 -1457,52.1,-1 -1458,51.8,-1 -1459,51.3,-1 -1460,50.7,-1 -1461,50.7,-1 -1462,49.8,-1 -1463,49.4,-1 -1464,49.3,-1 -1465,49.1,-1 -1466,49.1,-1 -1467,49.1,8.3 -1468,48.9,16.8 -1469,48.8,21.3 -1470,49.1,22.1 -1471,49.4,26.3 -1472,49.8,39.2 -1473,50.4,83.4 -1474,51.4,90.6 -1475,52.3,93.8 -1476,53.3,94 -1477,54.2,94.1 -1478,54.9,94.3 -1479,55.7,94.6 -1480,56.1,94.9 -1481,56.3,86.2 -1482,56.2,64.1 -1483,56,46.1 -1484,56.2,33.4 -1485,56.5,23.6 -1486,56.3,18.6 -1487,55.7,16.2 -1488,56,15.9 -1489,55.9,21.8 -1490,55.8,20.9 -1491,55.4,18.4 -1492,55.7,25.1 -1493,56,27.7 -1494,55.8,22.4 -1495,56.1,20 -1496,55.7,17.4 -1497,55.9,20.9 -1498,56,22.9 -1499,56,21.1 -1500,55.1,19.2 -1501,55.6,24.2 -1502,55.4,25.6 -1503,55.7,24.7 -1504,55.9,24 -1505,55.4,23.5 -1506,55.7,30.9 -1507,55.4,42.5 -1508,55.3,25.8 -1509,55.4,1.3 -1510,55,-1 -1511,54.4,-1 -1512,54.2,-1 -1513,53.5,-1 -1514,52.4,-1 -1515,51.8,-1 -1516,50.7,-1 -1517,49.9,-1 -1518,49.1,-1 -1519,47.7,-1 -1520,47.3,-1 -1521,46.9,-1 -1522,46.9,-1 -1523,47.2,-1 -1524,47.8,-1 -1525,48.2,0 -1526,48.8,23 -1527,49.1,67.9 -1528,49.4,73.7 -1529,49.8,75 -1530,50.4,75.8 -1531,51.4,73.9 -1532,52.3,72.2 -1533,53.3,71.2 -1534,54.6,71.2 -1535,55.4,68.7 -1536,56.7,67 -1537,57.2,64.6 -1538,57.3,61.9 -1539,57,59.5 -1540,56.7,57 -1541,56.7,69.8 -1542,56.8,58.5 -1543,56.8,47.2 -1544,57,38.5 -1545,57,32.8 -1546,56.8,30.2 -1547,57,27 -1548,56.9,26.2 -1549,56.7,26.2 -1550,57,26.6 -1551,56.7,27.8 -1552,56.7,29.7 -1553,56.8,32.1 -1554,56.5,34.9 -1555,56.6,34.9 -1556,56.3,35.8 -1557,56.6,36.6 -1558,56.2,37.6 -1559,56.6,38.2 -1560,56.2,37.9 -1561,56.6,37.5 -1562,56.4,36.7 -1563,56.5,34.8 -1564,56.5,35.8 -1565,56.5,36.2 -1566,56.5,36.7 -1567,56.7,37.8 -1568,56.7,37.8 -1569,56.6,36.6 -1570,56.8,36.1 -1571,56.5,36.8 -1572,56.9,35.9 -1573,56.7,35 -1574,56.5,36 -1575,56.4,36.5 -1576,56.5,38 -1577,56.5,39.9 -1578,56.4,42.1 -1579,56.5,47 -1580,56.4,48 -1581,56.1,49.1 -1582,56.4,48.9 -1583,56.4,48.2 -1584,56.5,48.3 -1585,56.5,47.9 -1586,56.6,46.8 -1587,56.6,46.2 -1588,56.5,44.4 -1589,56.8,42.9 -1590,56.5,42.8 -1591,56.7,43.2 -1592,56.5,42.8 -1593,56.9,42.2 -1594,56.5,43.1 -1595,56.5,42.9 -1596,56.7,42.7 -1597,56.6,41.5 -1598,56.9,41.8 -1599,56.6,41.9 -1600,56.7,42.6 -1601,56.7,42.6 -1602,56.7,41.5 -1603,56.7,42.2 -1604,56.5,42.2 -1605,56.8,41.9 -1606,56.5,42 -1607,56.7,42.1 -1608,56.4,41.9 -1609,56.7,42.9 -1610,56.7,41.8 -1611,56.7,41.9 -1612,56.8,42 -1613,56.7,41.5 -1614,56.6,41.9 -1615,56.8,41.6 -1616,56.6,41.6 -1617,56.9,42 -1618,56.7,40.7 -1619,56.7,39.3 -1620,56.5,41.4 -1621,56.4,44.9 -1622,56.8,45.2 -1623,56.6,43.6 -1624,56.8,42.2 -1625,56.5,42.3 -1626,56.5,44.4 -1627,56.9,45.1 -1628,56.4,45 -1629,56.7,46.3 -1630,56.7,45.5 -1631,56.8,45 -1632,56.7,44.9 -1633,56.6,45.2 -1634,56.8,46 -1635,56.5,46.6 -1636,56.6,48.3 -1637,56.4,48.6 -1638,56.6,50.3 -1639,56.3,51.9 -1640,56.5,54.1 -1641,56.3,54.9 -1642,56.4,55 -1643,56.4,56.2 -1644,56.2,58.6 -1645,56.2,59.1 -1646,56.2,62.5 -1647,56.4,62.8 -1648,56,64.7 -1649,56.4,65.6 -1650,56.2,67.7 -1651,55.9,68.9 -1652,56.1,68.9 -1653,55.8,69.5 -1654,56,69.8 -1655,56.2,69.3 -1656,56.2,69.8 -1657,56.4,69.2 -1658,56.3,68.7 -1659,56.2,69.4 -1660,56.2,69.5 -1661,56.2,70 -1662,56.4,69.7 -1663,56.2,70.2 -1664,56.4,70.5 -1665,56.1,70.5 -1666,56.5,69.7 -1667,56.2,69.3 -1668,56.5,70.9 -1669,56.4,70.8 -1670,56.3,71.1 -1671,56.4,71 -1672,56.7,68.6 -1673,56.8,68.6 -1674,56.6,68 -1675,56.8,65.1 -1676,56.9,60.9 -1677,57.1,57.4 -1678,57.1,54.3 -1679,57,48.6 -1680,57.4,44.1 -1681,57.4,40.2 -1682,57.6,36.9 -1683,57.5,34.2 -1684,57.4,31.1 -1685,57.5,25.9 -1686,57.5,20.7 -1687,57.6,16.4 -1688,57.6,12.4 -1689,57.6,8.9 -1690,57.5,8 -1691,57.5,5.8 -1692,57.3,5.8 -1693,57.6,5.5 -1694,57.3,4.5 -1695,57.2,3.2 -1696,57.2,3.1 -1697,57.3,4.9 -1698,57.3,4.2 -1699,56.9,5.5 -1700,57.1,5.1 -1701,57,5.2 -1702,56.9,5.5 -1703,56.6,5.4 -1704,57.1,6.1 -1705,56.7,5.7 -1706,56.8,5.8 -1707,57,6.1 -1708,56.7,5.9 -1709,57,6.6 -1710,56.9,6.4 -1711,56.7,6.7 -1712,56.9,6.9 -1713,56.8,5.6 -1714,56.6,5.1 -1715,56.6,6.5 -1716,56.5,10 -1717,56.6,12.4 -1718,56.5,14.5 -1719,56.6,16.3 -1720,56.3,18.1 -1721,56.6,20.7 -1722,56.1,22.6 -1723,56.3,25.8 -1724,56.4,27.7 -1725,56,29.7 -1726,56.1,32.6 -1727,55.9,34.9 -1728,55.9,36.4 -1729,56,39.2 -1730,55.9,41.4 -1731,55.5,44.2 -1732,55.9,46.4 -1733,55.8,48.3 -1734,55.6,49.1 -1735,55.8,49.3 -1736,55.9,47.7 -1737,55.9,47.4 -1738,55.8,46.9 -1739,56.1,46.8 -1740,56.1,45.8 -1741,56.2,46 -1742,56.3,45.9 -1743,56.3,45.9 -1744,56.2,44.6 -1745,56.2,46 -1746,56.4,46.2 -1747,55.8,-1 -1748,55.5,-1 -1749,55,-1 -1750,54.1,-1 -1751,54,-1 -1752,53.3,-1 -1753,52.6,-1 -1754,51.8,-1 -1755,50.7,-1 -1756,49.9,-1 -1757,49.1,-1 -1758,47.7,-1 -1759,46.8,-1 -1760,45.7,-1 -1761,44.8,-1 -1762,43.9,-1 -1763,42.9,-1 -1764,41.5,-1 -1765,39.5,-1 -1766,36.7,-1 -1767,33.8,-1 -1768,31,-1 -1769,40,0 -1770,49.1,-1 -1771,46.2,-1 -1772,43.1,-1 -1773,39.9,-1 -1774,36.6,-1 -1775,33.6,-1 -1776,30.5,-1 -1777,42.8,0 -1778,55.2,-1 -1779,49.9,-1 -1780,44,-1 -1781,37.6,-1 -1782,47.2,0 -1783,56.8,-1 -1784,47.5,-1 -1785,42.9,-1 -1786,31.6,-1 -1787,25.8,-1 -1788,19.9,-1 -1789,14,-1 -1790,8.1,-1 -1791,2.2,-1 -1792,0,0 -1793,0,0 -1794,0,0 -1795,0,0 -1796,0,0 -1797,0,0 -1798,0,0 -1799,0,0 -1800,0,0 diff --git a/VectoCore/Utils/IEnumberableExtensionMethods.cs b/VectoCore/Utils/IEnumberableExtensionMethods.cs index 73e07ec9e1e3986f2a3a7c17a19287594a568e11..d55292fa9fd758df67312ef1cf50499d6de5b3f5 100644 --- a/VectoCore/Utils/IEnumberableExtensionMethods.cs +++ b/VectoCore/Utils/IEnumberableExtensionMethods.cs @@ -11,21 +11,23 @@ namespace TUGraz.VectoCore.Utils return self.Select(StringExtensionMethods.ToDouble); } + public static Func<bool> Once() + { + var once = 0; + return () => once++ == 0; + } + /// <summary> /// Get the two adjacent items where the predicate is true. /// If the predicate never gets true, the last 2 elements are returned. /// </summary> - public static Tuple<T, T> GetSection<T>(this IEnumerable<T> self, Func<T, bool> predicate, out int index) + public static Tuple<T, T> GetSection<T>(this IEnumerable<T> self, Func<T, bool> skip, out int index) { var list = self.ToList(); - if (list.Count < 2) { - throw new InvalidOperationException("GetSection expects a sequence with at least 2 elements."); - } - var p = list.Select((arg1, i) => new { skip = i < list.Count - 2 || predicate(arg1), i, value = arg1 }). - SkipWhile(x => x.skip).Take(2).ToArray(); - - index = p[0].i; - return Tuple.Create(p[0].value, p[1].value); + var skipList = list.Select((arg1, i) => new { skip = skip(arg1) && i < list.Count - 1, i, value = arg1 }); + var p = skipList.SkipWhile(x => x.skip).First(); + index = Math.Max(p.i - 1, 0); + return Tuple.Create(list[index], list[index + 1]); } /// <summary> diff --git a/VectoCore/Utils/VectoMath.cs b/VectoCore/Utils/VectoMath.cs index 66f15820add9d19f62cf2ad40093ab5f346e57ad..5e74bcb189496d57e50e9d0e30547bb6652ba744 100644 --- a/VectoCore/Utils/VectoMath.cs +++ b/VectoCore/Utils/VectoMath.cs @@ -20,7 +20,7 @@ namespace TUGraz.VectoCore.Utils /// <returns></returns> public static TResult Interpolate<T, TResult>(T x1, T x2, TResult y1, TResult y2, T xint) where T : SI where TResult : SIBase<TResult> - { + { return ((xint - x1) * (y2 - y1) / (x2 - x1) + y1).Cast<TResult>(); } diff --git a/VectoCoreTest/Models/Declaration/DeclarationDataTest.cs b/VectoCoreTest/Models/Declaration/DeclarationDataTest.cs index 3e525cdb9c4418bce877b69c2b3e209a09698593..b8e510bbfbf0498451f2d5a1eac0f28980d85d6a 100644 --- a/VectoCoreTest/Models/Declaration/DeclarationDataTest.cs +++ b/VectoCoreTest/Models/Declaration/DeclarationDataTest.cs @@ -76,7 +76,7 @@ namespace TUGraz.VectoCore.Tests.Models.Declaration } [TestMethod] - public void WHTCWeightingTest() + public void WHTCTest() { var whtc = DeclarationData.WHTCCorrection; @@ -101,28 +101,80 @@ namespace TUGraz.VectoCore.Tests.Models.Declaration { var airDrag = DeclarationData.AirDrag; - //declaration - var Categories = Enum.GetValues(typeof(VehicleCategory)).Cast<VehicleCategory>().ToArray(); + var expected = new Dictionary<string, AirDrag.AirDragEntry> { + { "RigidSolo", new AirDrag.AirDragEntry { A1 = 0.013526, A2 = 0.017746, A3 = -0.000666 } }, + { "RigidTrailer", new AirDrag.AirDragEntry { A1 = 0.017125, A2 = 0.072275, A3 = -0.004148 } }, + { "TractorSemitrailer", new AirDrag.AirDragEntry { A1 = 0.034767, A2 = 0.039367, A3 = -0.001897 } }, + { "CoachBus", new AirDrag.AirDragEntry { A1 = -0.000794, A2 = 0.02109, A3 = -0.00109 } } + }; - //todo: insert real test values - var expectedForCategory = new[] { 0, 0, 0, 0, 0 }; - for (var i = 0; i < Categories.Length; i++) { - Assert.AreEqual(expectedForCategory[i], airDrag.Lookup(Categories[i])); + foreach (var kv in expected) { + Assert.AreEqual(kv.Value, airDrag.Lookup(kv.Key)); } - Assert.Inconclusive(); + var expectedCat = new Dictionary<VehicleCategory, AirDrag.AirDragEntry> { + { VehicleCategory.RigidTruck, new AirDrag.AirDragEntry { A1 = 0.013526, A2 = 0.017746, A3 = -0.000666 } }, + { VehicleCategory.Tractor, new AirDrag.AirDragEntry { A1 = 0.034767, A2 = 0.039367, A3 = -0.001897 } }, + { VehicleCategory.CityBus, new AirDrag.AirDragEntry { A1 = -0.000794, A2 = 0.02109, A3 = -0.00109 } }, + { VehicleCategory.Coach, new AirDrag.AirDragEntry { A1 = -0.000794, A2 = 0.02109, A3 = -0.00109 } }, + { VehicleCategory.InterurbanBus, new AirDrag.AirDragEntry { A1 = -0.000794, A2 = 0.02109, A3 = -0.00109 } } + }; + + foreach (var kv in expectedCat) { + Assert.AreEqual(kv.Value, airDrag.Lookup(kv.Key)); + } } [TestMethod] public void DefaultTCTest() { - Assert.Inconclusive(); - } + var tc = DeclarationData.TorqueConverter; - [TestMethod] - public void WHTCTest() - { - Assert.Inconclusive(); + var expected = new[] { + // fixed points + new { nu = 1.000, mu = 1.000, torque = 0.00 }, + new { nu = 1.005, mu = 1.000, torque = 0.00 }, + new { nu = 1.100, mu = 1.000, torque = -40.34 }, + new { nu = 1.222, mu = 1.000, torque = -80.34 }, + new { nu = 1.375, mu = 1.000, torque = -136.11 }, + new { nu = 1.571, mu = 1.000, torque = -216.52 }, + new { nu = 1.833, mu = 1.000, torque = -335.19 }, + new { nu = 2.200, mu = 1.000, torque = -528.77 }, + new { nu = 2.750, mu = 1.000, torque = -883.40 }, + new { nu = 4.400, mu = 1.000, torque = -2462.17 }, + new { nu = 11.000, mu = 1.000, torque = -16540.98 }, + + // interpolated points + new { nu = 1.0025, mu = 1.0, torque = 0.0 }, + new { nu = 1.0525, mu = 1.0, torque = -20.17 }, + new { nu = 1.161, mu = 1.0, torque = -60.34 }, + new { nu = 1.2985, mu = 1.0, torque = -108.225 }, + new { nu = 1.2985, mu = 1.0, torque = -108.225 }, + new { nu = 1.473, mu = 1.0, torque = -176.315 }, + new { nu = 1.702, mu = 1.0, torque = -275.855 }, + new { nu = 2.0165, mu = 1.0, torque = -431.98 }, + new { nu = 2.475, mu = 1.0, torque = -706.085 }, + new { nu = 3.575, mu = 1.0, torque = -1672.785 }, + new { nu = 7.7, mu = 1.0, torque = -9501.575 }, + + // extrapolated points + new { nu = 0.5, mu = 1.0, torque = 0.0 }, + new { nu = 12.0, mu = 1.0, torque = -18674.133 }, // = (12-4.4)*(-16540.98- -2462.17)/(11-4.4)+ -2462.17 + }; + + var referenceSpeed = 150.SI<PerSecond>(); + + var r = new Random(); + + foreach (var exp in expected) { + var mu = tc.LookupMu(exp.nu); + Assert.AreEqual(mu, exp.mu); + + var angularSpeed = r.Next(700).SI<PerSecond>(); + var torque = tc.LookupTorque(exp.nu, angularSpeed, referenceSpeed); + Assert.AreEqual(exp.torque * Math.Pow(angularSpeed.Double() / referenceSpeed.Double(), 2), torque.Double(), + Tolerance); + } } [TestMethod]