Ejemplo n.º 1
0
 /// <summary>
 /// Reinitialize the values.
 /// </summary>
 private void Clear()
 {
     // Initialize all the sentences
     _prevSA = null;
     _prevTS = null;
     _prevRA = null;
     _prevWI = null;
     _prevWS = null;
     _prevWE = null;
     _prevWD = null;
     _prevBI = null;
     _prevBS = null;
     _prevBE = null;
     _prevBD = null;
     _prevEns = new DataSet.Ensemble();
     _count = 0;
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Set the data sets for the BD message.
        /// </summary>
        /// <param name="sentence">Message with the BD data.</param>
        private void SetBD(string sentence)
        {
            _prevBD = new BD(sentence);

            // Set DVL DataSet
            _prevEns.DvlData.BtEastDistance = _prevBD.E;
            _prevEns.DvlData.BtNorthDistance = _prevBD.N;
            _prevEns.DvlData.BtUpwardDistance = _prevBD.U;
            _prevEns.DvlData.BtEarthRangeToWaterMassCenter = _prevBD.RangeToBottom;
            _prevEns.DvlData.BtEarthTimeLastGoodVel = _prevBD.Time;
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Set the data sets for the BD message.
        /// </summary>
        /// <param name="sentence">Message with the BD data.</param>
        private void SetBD(string sentence)
        {
            // Verify byte count
            if (sentence.Count(x => x == ',') != BD.NUM_ELEM - 1)
            {
                return;
            }

            var bd = new BD(sentence);

            if (bd != null)
            {
                // Add DVL dataset
                if (_prevEns.DvlData == null)
                {
                    _prevEns.DvlData = new DataSet.DvlDataSet();
                    _prevEns.IsDvlDataAvail = true;
                }
                _prevEns.DvlData.BtEastDistance = bd.E;
                _prevEns.DvlData.BtNorthDistance = bd.N;
                _prevEns.DvlData.BtUpwardDistance = bd.U;
                _prevEns.DvlData.BtRangeToBottom = bd.RangeToBottom;
                _prevEns.DvlData.BtEarthTimeLastGoodVel = bd.Time;

                                // Add DVL dataset
                if (_prevEns.DvlData == null)
                {
                    _prevEns.DvlData = new DataSet.DvlDataSet();
                    _prevEns.IsDvlDataAvail = true;
                }
                _prevEns.DvlData.RangeBeam0 = bd.RangeToBottom;
                _prevEns.DvlData.RangeBeam1 = bd.RangeToBottom;
                _prevEns.DvlData.RangeBeam2 = bd.RangeToBottom;
                _prevEns.DvlData.RangeBeam3 = bd.RangeToBottom;

                // Add Bottom Track DataSet
                if (!_prevEns.IsBottomTrackAvail)
                {
                    _prevEns.BottomTrackData = new DataSet.BottomTrackDataSet();
                    _prevEns.IsBottomTrackAvail = true;
                }
                _prevEns.BottomTrackData.Range[0] = bd.RangeToBottom;
                _prevEns.BottomTrackData.Range[1] = bd.RangeToBottom;
                _prevEns.BottomTrackData.Range[2] = bd.RangeToBottom;
                _prevEns.BottomTrackData.Range[3] = bd.RangeToBottom;
            }

            _prevBD = bd;
        }