Exemplo n.º 1
0
        /// <summary>
        /// 计算起始里程
        /// </summary>
        private void CalcCitStartMileStone()
        {
            if (_fixData != null && _fixData.Count > 0)
            {
                long markedStartPostion = _fixData[0].MarkedStartPoint.FilePointer;
                long sampleCount        = _citProcess.GetAppointSampleCount(_citFilePath, markedStartPostion);
                if (sampleCount > 0)
                {
                    MileStoneFixData data = new MileStoneFixData();
                    data.MarkedEndPoint   = _fixData[0].MarkedStartPoint;
                    data.SamplePointCount = sampleCount;
                    data.SampleRate       = _meanSampleRate;
                    UserMarkedPoint markedStartPoint = new UserMarkedPoint();
                    long[]          points           = _citProcess.GetPositons(_citFilePath);
                    markedStartPoint.FilePointer = points[0];
                    //if (_citFileInfo.iKmInc == 1)
                    //{
                    //    markedStartPoint.UserSetMileage = data.MarkedEndPoint.UserSetMileage + (data.SamplePointCount - 1) * data.SampleRate;
                    //}
                    //else
                    //{
                    //    markedStartPoint.UserSetMileage = data.MarkedEndPoint.UserSetMileage - (data.SamplePointCount - 1) * data.SampleRate;
                    //}
                    markedStartPoint.UserSetMileage = data.MarkedEndPoint.UserSetMileage - (data.SamplePointCount - 1) * data.SampleRate;
                    markedStartPoint.FilePointer    = points[0];

                    data.MarkedStartPoint = markedStartPoint;
                    data.RealDistance     = data.MarkedEndPoint.UserSetMileage - data.MarkedStartPoint.UserSetMileage;
                    _fixData.Insert(0, data);
                }
            }
        }