Beispiel #1
0
        private void HandleHome()
        {
            _inputPackets
            .Where(_ => _.MessageId == HomePositionPacket.PacketMessageId)
            .Cast <HomePositionPacket>()
            .Select(_ => _.Payload)
            .Subscribe(_home, _disposeCancel.Token);
            _home
            .Select(_ => new GeoPoint(_.Latitude / 10000000D, _.Longitude / 10000000D, _.Altitude / 1000D))
            .Subscribe(_homePos, _disposeCancel.Token);

            _disposeCancel.Token.Register(() => _home.Dispose());
        }