Ejemplo n.º 1
0
 public int getOffsetLineByDKMileage(double startm, double endm, double stepm, double offsetm, out double[] mileage, out double[] x, out double[] y, out double[] z, out double[] dir, bool includeLastPoint = false)
 {
     getLocalMileageByDKMileage(mDKCode, startm, out startm);
     getLocalMileageByDKMileage(mDKCode, endm, out endm);
     return(CSubLine.getOffsetLineByMileage(startm, endm, stepm, meter, longitude, latitude, altitude, heading, mOffset, mOffsetX, mOffsetY, offsetm,
                                            out mileage, out x, out y, out z, out dir, includeLastPoint));
 }
Ejemplo n.º 2
0
        /// <summary>
        /// 获取中线,根据 pathNode 0判断单线复线,
        /// </summary>
        /// <param name="ml"></param>
        /// <param name="xl"></param>
        /// <param name="yl"></param>
        /// <param name="zl"></param>
        /// <param name="dl"></param>
        /// <returns></returns>
        public bool getContactLine(out double[] x, out double[] y, out double[] z,
                                   out double[] x2, out double[] y2, out double[] z2)
        {
            double[] m, m2, dir, dir2;
            m  = x = y = z = dir = null;
            m2 = x2 = y2 = z2 = dir2 = null;

            List <PathNode> ls = mPathNodeList; //getSubPath(startDKCode, startMileage, endDKCode, endMileage);

            if (ls == null || ls.Count == 0)
            {
                return(false);
            }
            //int totalCount = 0;
            // 如果是单线,接触网为中线,如果是复线,接触网为左线
            CSubLine.getSubLineByMileage(0, mLength, 50, mm, mx, my, mz, md, out m, out x, out y, out z, out dir);
            if (ls[0].mRL.mIsDouble)
            {
                // 复线,求另一个接触网
                CSubLine.getOffsetLineByMileage(0, mLength, 50, mm, mx, my, mz, md, moff, mxoff, myoff, moff * 2, out m2, out x2, out y2, out z2, out dir2, true);
                return(true);
            }

            //CSubLine.getSubLineByMileage(0, mLength, mStepM, mm, mx, my, mz, md, out ml, out xl, out yl, out zl, out dl, true);
            return(false);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 如果复线,返回两条接触网线,如果单线,返回一条
        /// </summary>
        /// <param name="m"></param>
        /// <param name="x"></param>
        /// <param name="y"></param>
        /// <param name="z"></param>
        /// <param name="dir"></param>
        /// <param name="m2"></param>
        /// <param name="x2"></param>
        /// <param name="y2"></param>
        /// <param name="z2"></param>
        /// <param name="dir2"></param>
        /// <returns></returns>
        public bool getContactLineByMileage(out double[] m, out double[] x, out double[] y, out double[] z, out double[] dir,
                                            out double[] m2, out double[] x2, out double[] y2, out double[] z2, out double[] dir2)
        {
            m  = x = y = z = dir = null;
            m2 = x2 = y2 = z2 = dir2 = null;
            CSubLine.getSubLineByMileage(0, Math.Abs(mEnd - mStart), 50, meter, longitude, latitude, altitude, heading, out m, out x, out y, out z, out dir);

            if (mIsDouble)
            {
                CSubLine.getOffsetLineByMileage(0, Math.Abs(mEnd - mStart), 50, meter, longitude, latitude, altitude, heading, mOffset, mOffsetX, mOffsetY, mOffset * 2,
                                                out m2, out x2, out y2, out z2, out dir2, false);
            }

            return(mIsDouble);
        }
Ejemplo n.º 4
0
 public void getPolePos(out double[] x, out double[] y, out double[] z, out double[] dir)
 {
     //double dis = 0;
     double[] m;
     m = x = y = z = dir = null;
     if (meter == null || meter.Length == 0)
     {
         return;
     }
     //x = new double[m.Length];
     //y = new double[m.Length];
     //z = new double[m.Length];
     if (mIsDouble)
     {
         CSubLine.getOffsetLineByMileage(0, Math.Abs(mEnd - mStart), 50, meter, longitude, latitude, altitude, heading, mOffset, mOffsetX, mOffsetY, mOffset * 2,
                                         out m, out x, out y, out z, out dir, false);
     }
 }