//{ // N = 0.0; // E = 0.0; //} public BlhPoint GetBL(string Id, string N, string E, string H) { NehPoint geoPoint = new NehPoint(); geoPoint.Id = Id; geoPoint.N = N.ToDouble(); geoPoint.E = E.ToDouble(); geoPoint.H = H.ToDouble(); return GetBL(geoPoint); }
protected void InitBounds(double minB_deg, double minL_deg, double maxB_deg, double maxL_deg) { double n, e; GetNE(Calc.DegToRad(minB_deg), Calc.DegToRad(minL_deg), out n, out e); MinE = e; MinN = n; GetNE(Calc.DegToRad(maxB_deg), Calc.DegToRad(maxL_deg), out n, out e); MaxE = e; MaxN = n; mSamplePoint = null; }
public override PointBase FromWgs84(BlhPoint p) { double n, e; GetNE(p.B, p.L, out n, out e); var res = new NehPoint(); res.Assign(p); res.N = n; res.E = e; return res; }
public BlhPoint GetBL(NehPoint pnt) { double n = pnt.N; double e = pnt.E; double b; double l; GetBL(n, e, out b, out l); BlhPoint res = new BlhPoint(); res.Id = pnt.Id; res.B = b; res.L = l; res.H = pnt.H; return res; }
public NehPoint GetNE(BlhPoint pnt) { double n; double e; double b = pnt.B; double l = pnt.L; GetNE(b, l, out n, out e); NehPoint res = new NehPoint(); res.Id = pnt.Id; res.N = n; res.E = e; res.H = pnt.H; return res; }
public static NehPoint Add(this ICollection<NehPoint> points, double n, double e, double h) { var res = new NehPoint(n, e, h); points.Add(res); res.Id = (points.Count -1).ToString(); return res; }
//Current, bieząca /// <summary> /// Length from StartPoint to point moved parperdicular to Line /// </summary> /// <param name="point"></param> /// <returns></returns> public double AlongLengthTo(NehPoint point) { var dn = point.N - StartPoint.N; var de = point.E - StartPoint.E; return dn * CosAz + de * SinAz; }
/// <summary> /// Parperdicular dinstance from point to Line /// </summary> /// <param name="point"></param> /// <returns></returns> public double OrtoDistTo(NehPoint point) { var dn = point.N - StartPoint.N; var de = point.E - StartPoint.E; return de * CosAz - dn * SinAz; }
public NehLine(NehPoint start, NehPoint end) { mStartPoint = start; mEndPoint = end; mStartPoint.PropertyChanged += OnCoordinateChanged; mEndPoint.PropertyChanged += OnCoordinateChanged; }
public NehPoint Move(double dist, Angle azimuth) { var res = new NehPoint(); res.N = this.N + dist * Math.Cos(azimuth); res.E = this.E + dist * Math.Sin(azimuth); return res; }