V1.3.3.6 Merge with V1.4.x

pull/2/head
dl2alf 2022-01-02 09:22:23 +01:00
rodzic 36b8938a32
commit 8653f6f95e
6 zmienionych plików z 2881 dodań i 2787 usunięć

Wyświetl plik

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// indem Sie "*" wie unten gezeigt eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.3.3.1")]
[assembly: AssemblyFileVersion("1.3.3.1")]
[assembly: AssemblyVersion("1.3.3.4")]
[assembly: AssemblyFileVersion("1.3.3.4")]

Wyświetl plik

@ -74,7 +74,7 @@ namespace System.Net
throw new TimeoutException("Connection timed out.");
}
while (!trailer.Contains("\r\n"));
Console.WriteLine("Reading content [" + contentlength.ToString() + " bytes]: " + resp);
// Console.WriteLine("Reading content [" + contentlength.ToString() + " bytes]: " + resp);
response += resp;
return true;
}
@ -91,6 +91,8 @@ namespace System.Net
int contentlength = 0;
// chunked transfer, first line should contain content length
// read stream bytewise until CRLF is detected
try
{
do
{
count = stream.Read(buff, 0, buff.Length);
@ -129,12 +131,17 @@ namespace System.Net
throw new TimeoutException("Connection timed out.");
}
while (!trailer.Contains("\r\n"));
Console.WriteLine("Reading chunked content [" + contentlength.ToString() + " bytes]: " + resp);
}
catch (Exception ex)
{
Console.WriteLine("Error while reading chunked content: " + ex.Message);
}
// Console.WriteLine("Reading chunked content [" + contentlength.ToString() + " bytes]: " + resp);
response += resp;
return false;
}
public static string DownloadFile (string url, int timeout, string apikey)
public static string DownloadFile(string url, int timeout, string apikey)
{
string response = "";
Uri uri = null;

Wyświetl plik

@ -178,7 +178,7 @@ namespace AirScout.PlaneFeeds.Plugin.VirtualRadarServer
}
[Export(typeof(IPlaneFeedPlugin))]
[Export(typeof(IPlaneFeedPlugin))]
[ExportMetadata("Name", "PlaneFeedPlugin")]
public class VirtualRadarServerPlugin : IPlaneFeedPlugin
{
@ -377,7 +377,6 @@ namespace AirScout.PlaneFeeds.Plugin.VirtualRadarServer
{
// deserialize JSON
dynamic root = JsonConvert.DeserializeObject(json);
// get local time of request in milliseconds
DateTime lt = DateTime.UtcNow;
long ltime = (long)(lt - new DateTime(1970, 1, 1)).TotalMilliseconds;
@ -410,7 +409,7 @@ namespace AirScout.PlaneFeeds.Plugin.VirtualRadarServer
{
PlaneFeedPluginPlaneInfo plane = new PlaneFeedPluginPlaneInfo();
// get hex first
plane.Hex = ReadPropertyString(ac, "Icao").Trim().Replace("\"","");
plane.Hex = ReadPropertyString(ac, "Icao").Trim().Replace("\"", "");
// get position
plane.Lat = ReadPropertyDouble(ac, "Lat");
plane.Lon = ReadPropertyDouble(ac, "Long");

Wyświetl plik

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
// übernehmen, indem Sie "*" eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.3.3.6")]
[assembly: AssemblyFileVersion("1.3.3.6")]
[assembly: AssemblyVersion("1.3.3.7")]
[assembly: AssemblyFileVersion("1.3.3.7")]

Wyświetl plik

@ -460,6 +460,9 @@ namespace ScoutBase.Propagation
// return null if elevation path is null for whatever reason
if (ep == null)
return null;
// using (StreamWriter sw = new StreamWriter(File.OpenWrite("propagation.csv")))
{
// sw.WriteLine("i;dist1;dist2;f1c1;f1c2;elv;eps1;eps1_min;eps2;eps2_min");
for (int i = 0; i < ep.Count; i++)
{
double dist1 = i * stepwidth / 1000.0;
@ -470,23 +473,38 @@ namespace ScoutBase.Propagation
double eps1;
double eps2;
if (dist1 > nf)
{
eps1 = ScoutBase.Core.Propagation.EpsilonFromHeights(h1, dist1, ep.Path[i] + f1c1, radius);
else
eps1 = ScoutBase.Core.Propagation.EpsilonFromHeights(h1, nf, ep.Path[i] + f1c1, radius);
if (eps1 > eps1_min)
eps1_min = eps1;
}
if (dist2 > nf)
{
eps2 = ScoutBase.Core.Propagation.EpsilonFromHeights(h2, dist2, ep.Path[i] + f1c2, radius);
else
eps2 = ScoutBase.Core.Propagation.EpsilonFromHeights(h2, nf, ep.Path[i] + f1c2, radius);
if (eps2 > eps2_min)
eps2_min = eps2;
}
if (caller != null)
{
// abort calculation if cancellation pending
if (caller.WorkerSupportsCancellation && caller.CancellationPending)
return null;
}
/*
sw.WriteLine(
i.ToString() + ";" +
dist1.ToString("F8") + ";" +
dist2.ToString("F8") + ";" +
f1c1.ToString("F8") + ";" +
f1c2.ToString("F8") + ";" +
ep.Path[i].ToString() + ";" +
eps1.ToString("F8") + ";" +
eps1_min.ToString("F8") + ";" +
eps2.ToString("F8") + ";" +
eps2_min.ToString("F8")
);
*/
}
}
PropagationPathDesignator pp = new PropagationPathDesignator(lat1, lon1, h1, lat2, lon2, h2, qrg, radius, f1_clearance, stepwidth, eps1_min, eps2_min, localobstruction);
// take status from elevation path