Commit b339e451 authored by 谢旭's avatar 谢旭

增加计算

parent f56d7979
No preview for this file type
...@@ -135,6 +135,7 @@ ...@@ -135,6 +135,7 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
</ApplicationDefinition> </ApplicationDefinition>
<Compile Include="Controllers\queryController.cs" /> <Compile Include="Controllers\queryController.cs" />
<Compile Include="Extension\CalculateModel.cs" />
<Compile Include="Extension\ExtensionMethod.cs" /> <Compile Include="Extension\ExtensionMethod.cs" />
<Compile Include="Extension\SocketModel.cs" /> <Compile Include="Extension\SocketModel.cs" />
<Compile Include="ProcessSocketRequest.cs" /> <Compile Include="ProcessSocketRequest.cs" />
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CefDemo.Extension
{
class Point
{
public Point(double x,double y,double z)
{
X = x;
Y = y;
Z = z;
}
public double X { get; set; }
public double Y { get; set; }
public double Z { get; set; }
}
class CalculateModel
{
/// <summary>
/// 计算
/// </summary>
/// <param name="Center"></param>
/// <param name="Radius"></param>
/// <param name="point"></param>
/// <returns>返回当前状态</returns>
public static string DistanceToCylinder(Point Center, double Radius ,Point point , double Height, double Buffer_dis )
{
// 内圆半径
//投影到平面计算, 点与圆心的距离
double _distance = P2PDistance(point,Center);
//如果投影再内,再判断高度是否超出
if (_distance < Radius)
{
}
else
{
}
return "";
}
public static double P2PDistance(Point A,Point B)
{
double _x = System.Math.Abs(B.X - A.X);
double _y = System.Math.Abs(B.Y - A.Y);
return Math.Sqrt(_x * _x + _y * _y);
}
}
}
...@@ -144,9 +144,9 @@ namespace CefDemo ...@@ -144,9 +144,9 @@ namespace CefDemo
",\"deviceModel\":\"Galaxy-6\"" + ",\"deviceModel\":\"Galaxy-6\"" +
",\"TN\":\"SG609AE41000059\"" + ",\"TN\":\"SG609AE41000059\"" +
",\"SN\":\"SG609AE41000059\"" + ",\"SN\":\"SG609AE41000059\"" +
",\"sendtime\":\"20191106143620\"" + ",\"sendtime\":\"20200630153620\"" +
",\"deviceBrand\":\"SOUTH\"" + ",\"deviceBrand\":\"SOUTH\"" +
",\"receivetime\":\"20191106143620\"" + ",\"receivetime\":\"20200630153620\"" +
",\"longitude\":" + location.ElementAt(Convert.ToInt32(i++ % 16)).Value.ToString() + ",\"longitude\":" + location.ElementAt(Convert.ToInt32(i++ % 16)).Value.ToString() +
"}"; "}";
if (i==10000000) if (i==10000000)
......
...@@ -7057,3 +7057,55 @@ C:\fakepath(161,8-42): warning X3571: pow(f, e) will not work for negative f, us ...@@ -7057,3 +7057,55 @@ C:\fakepath(161,8-42): warning X3571: pow(f, e) will not work for negative f, us
[0630/134603.758:WARNING:angle_platform_impl.cc(45)] compileToBinary(256): [0630/134603.758:WARNING:angle_platform_impl.cc(45)] compileToBinary(256):
C:\fakepath(164,8-42): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them C:\fakepath(164,8-42): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
[0630/153201.639:INFO:CONSOLE(1)] "This tileset JSON uses the "content.url" property which has been deprecated. Use "content.uri" instead.", source: http://localhost:12345/electircfence/scripts.0f4415c2bf5b47245d95.js (1)
[0630/153209.534:INFO:CONSOLE(1)] "This tile uses a lowercase refine "replace". Instead use "REPLACE".", source: http://localhost:12345/electircfence/scripts.0f4415c2bf5b47245d95.js (1)
[0630/153212.887:WARNING:angle_platform_impl.cc(45)] compileToBinary(256):
C:\fakepath(73,81-126): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
[0630/153231.593:WARNING:angle_platform_impl.cc(45)] compileToBinary(256):
C:\fakepath(168,25-63): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
C:\fakepath(164,8-42): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
[0630/153231.915:WARNING:angle_platform_impl.cc(45)] compileToBinary(256):
C:\fakepath(143,8-42): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
[0630/153232.243:WARNING:angle_platform_impl.cc(45)] compileToBinary(256):
C:\fakepath(186,25-63): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
C:\fakepath(182,8-42): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
[0630/153252.193:WARNING:angle_platform_impl.cc(45)] compileToBinary(256):
C:\fakepath(149,8-42): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
[0630/153252.453:WARNING:angle_platform_impl.cc(45)] compileToBinary(256):
C:\fakepath(161,8-42): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
[0630/153314.674:WARNING:angle_platform_impl.cc(45)] compileToBinary(256):
C:\fakepath(189,25-63): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
C:\fakepath(185,8-42): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
[0630/154337.110:INFO:CONSOLE(1)] "This tileset JSON uses the "content.url" property which has been deprecated. Use "content.uri" instead.", source: http://localhost:12345/electircfence/scripts.0f4415c2bf5b47245d95.js (1)
[0630/154339.743:INFO:CONSOLE(1)] "This tile uses a lowercase refine "replace". Instead use "REPLACE".", source: http://localhost:12345/electircfence/scripts.0f4415c2bf5b47245d95.js (1)
[0630/154342.478:WARNING:angle_platform_impl.cc(45)] compileToBinary(256):
C:\fakepath(73,81-126): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
[0630/154346.252:WARNING:angle_platform_impl.cc(45)] compileToBinary(256):
C:\fakepath(168,25-63): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
C:\fakepath(164,8-42): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
[0630/154346.556:WARNING:angle_platform_impl.cc(45)] compileToBinary(256):
C:\fakepath(186,25-63): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
C:\fakepath(182,8-42): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
[0630/154357.267:WARNING:angle_platform_impl.cc(45)] compileToBinary(256):
C:\fakepath(143,8-42): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
[0630/154358.091:WARNING:angle_platform_impl.cc(45)] compileToBinary(256):
C:\fakepath(161,8-42): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
[0630/154407.886:WARNING:angle_platform_impl.cc(45)] compileToBinary(256):
C:\fakepath(164,8-42): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
[0630/154414.470:WARNING:angle_platform_impl.cc(45)] compileToBinary(256):
C:\fakepath(189,25-63): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
C:\fakepath(185,8-42): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
8a23f417ef448852e86fcf61ae17f2b6ad62d545 a62af6b01bb460873b16bebd0a4a6da462acef2c
...@@ -12,7 +12,7 @@ DEBUG;TRACE ...@@ -12,7 +12,7 @@ DEBUG;TRACE
C:\Users\captain.eugene\Desktop\CefDemo (2)\CefDemo\App.xaml C:\Users\captain.eugene\Desktop\CefDemo (2)\CefDemo\App.xaml
2-1654479502 2-1654479502
19-1132187214 20-1806407172
36-825320036 36-825320036
View\MainWindow.xaml;View\ConHardware.xaml; View\MainWindow.xaml;View\ConHardware.xaml;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment