Repository: dB-SPL/takprotobuf (language: python)

Issue:
Update README.rst



Discussion / hints:

Fix patch:
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
new file mode 100755
index 0000000..5ca7137
--- /dev/null
+++ b/.github/FUNDING.yml
@@ -0,0 +1,13 @@
+# These are supported funding model platforms
+
+github: ampledata 
+patreon: # Replace with a single Patreon username
+open_collective: # Replace with a single Open Collective username
+ko_fi: ampledata
+tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
+community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
+liberapay: # Replace with a single Liberapay username
+issuehunt: # Replace with a single IssueHunt username
+otechie: # Replace with a single Otechie username
+lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
+custom: https://www.buymeacoffee.com/ampledata
diff --git a/.github/workflows/debian.yml b/.github/workflows/debian.yml
new file mode 100755
index 0000000..035a5ba
--- /dev/null
+++ b/.github/workflows/debian.yml
@@ -0,0 +1,63 @@
+name: Build Debian package
+
+on:
+  push:
+    tags:
+      - '*'
+
+env:
+  DEB_BUILD_OPTIONS: nocheck
+
+jobs:
+  build-artifact:
+    runs-on: ubuntu-latest
+
+    steps:
+      - uses: actions/checkout@master
+
+      - name: Install packaging dependencies
+        run: |
+          sudo apt-get update -qq
+          sudo apt-get install -y \
+            python3 python3-dev python3-pip python3-venv python3-all \
+            dh-python debhelper devscripts dput software-properties-common \
+            python3-distutils python3-setuptools python3-wheel python3-stdeb
+
+      - name: Build Debian/Apt sdist_dsc
+        run: |
+          rm -Rf deb_dist/*
+          python3 setup.py --command-packages=stdeb.command sdist_dsc
+
+      - name: Build Debian/Apt bdist_deb
+        run: |
+          export REPO_NAME=$(echo ${{ github.repository }} | awk -F"/" '{print $2}')
+          python3 setup.py --command-packages=stdeb.command bdist_deb
+          ls -al deb_dist/
+          cp deb_dist/python3-${REPO_NAME}_*_all.deb deb_dist/python3-${REPO_NAME}_latest_all.deb
+
+      - uses: actions/upload-artifact@master
+        with:
+          name: artifact-deb
+          path: |
+            deb_dist/*.deb
+
+      - name: Create Release
+        id: create_release
+        uses: actions/create-release@master
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+        with:
+          tag_name: ${{ github.ref }}
+          release_name: Release ${{ github.ref }}
+          draft: false
+          prerelease: false
+
+      - name: Upload Release Asset
+        id: upload-release-asset
+        uses: svenstaro/upload-release-action@v2
+        with:
+          repo_token: ${{ secrets.GITHUB_TOKEN }}
+          file: deb_dist/*.deb
+          tag: ${{ github.ref }}
+          overwrite: true
+          file_glob: true
\ No newline at end of file
diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml
deleted file mode 100644
index 5c2413b..0000000
--- a/.github/workflows/python-package.yml
+++ /dev/null
@@ -1,39 +0,0 @@
-# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
-# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
-
-name: Python package
-
-on:
-  push:
-    branches: [ main ]
-  pull_request:
-    branches: [ main ]
-
-jobs:
-  build:
-
-    runs-on: ubuntu-latest
-    strategy:
-      matrix:
-        python-version: ['3.5', '3.6', '3.7', '3.8']
-
-    steps:
-    - uses: actions/checkout@v2
-    - name: Set up Python ${{ matrix.python-version }}
-      uses: actions/setup-python@v2
-      with:
-        python-version: ${{ matrix.python-version }}
-    - name: Install dependencies
-      run: |
-        python -m pip install --upgrade pip
-        python -m pip install flake8 pytest
-        if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
-    - name: Lint with flake8
-      run: |
-        # stop the build if there are Python syntax errors or undefined names
-        flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
-        # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
-        flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
-    - name: Test with pytest
-      run: |
-        pytest
diff --git a/.github/workflows/python-publish_to_pypi.yml b/.github/workflows/python-publish_to_pypi.yml
new file mode 100755
index 0000000..2c719cf
--- /dev/null
+++ b/.github/workflows/python-publish_to_pypi.yml
@@ -0,0 +1,31 @@
+# This workflow will upload a Python Package using Twine when a release is created
+name: Publish package to PyPI
+
+on:
+  push:
+    tags:
+      - '*'
+
+jobs:
+  deploy:
+
+    runs-on: ubuntu-latest
+
+    steps:
+    - uses: actions/checkout@v2
+    - name: Set up Python
+      uses: actions/setup-python@v2
+      with:
+        python-version: '3.x'
+    - name: Install dependencies
+      run: |
+        python3 -m pip install --upgrade pip
+        python3 -m pip install setuptools wheel twine
+    - name: Build
+      run: |
+        python3 setup.py sdist bdist_wheel
+    - name: Publish package
+      uses: pypa/gh-action-pypi-publish@release/v1
+      with:
+        user: __token__
+        password: ${{ secrets.PYPI_API_TOKEN }}
diff --git a/.gitignore b/.gitignore
new file mode 100755
index 0000000..58a4a05
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,35 @@
+.vscode/
+*.deb
+*.egg
+*.egg-info/
+*.egg/
+*.ignore
+*.py[co]
+*.py[oc]
+*.spl
+*.vagrant
+.DS_Store
+.coverage
+.eggs/
+.eggs/*
+.idea
+.idea/
+.pt
+.vagrant/
+RELEASE-VERSION.txt
+build/
+cover/
+dist/
+dump.rdb
+flake8.log
+local/
+local_*
+metadata/
+nosetests.xml
+output.xml
+pylint.log
+redis-server.log
+redis-server/
+__pycache__
+.ipynb_checkpoints/
+config.ini
diff --git a/LICENSE.md b/LICENSE
similarity index 91%
rename from LICENSE.md
rename to LICENSE
index a405f99..d31d23c 100644
--- a/LICENSE.md
+++ b/LICENSE
@@ -1,6 +1,5 @@
-# MIT License
-
-## Copyright (c) 2020 Delta Bravo-15
+Copyright 2023 Sensors & Signals LLC
+Copyright 2020 Delta Bravo-15 <deltabravo15ga@gmail.com>
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..aec7a6a
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,83 @@
+#
+# Copyright 2023 Sensors & Signals LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# Author:: Greg Albrecht <gba@snstac.com>
+# Copyright:: Copyright 2023 Sensors & Signals LLC
+# License:: Apache License, Version 2.0
+#
+
+this_app = takproto
+.DEFAULT_GOAL := all
+
+all: editable
+
+develop:
+	python3 setup.py develop
+
+editable:
+	python3 -m pip install -e .
+
+install_test_requirements:
+	python3 -m pip install -r requirements_test.txt
+
+install:
+	python3 setup.py install
+
+uninstall:
+	python3 -m pip uninstall -y $(this_app)
+
+reinstall: uninstall install
+
+publish:
+	python3 setup.py publish
+
+clean:
+	@rm -rf *.egg* build dist *.py[oc] */*.py[co] cover doctest_pypi.cfg \
+		nosetests.xml pylint.log output.xml flake8.log tests.log \
+		test-result.xml htmlcov fab.log .coverage __pycache__ \
+		*/__pycache__ .mypy_cache .pytest_cache
+
+pep8:
+	flake8 --max-line-length=88 --extend-ignore=E203,E231 --exit-zero $(this_app)/*.py
+
+flake8: pep8
+
+lint:
+	pylint --msg-template="{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}" \
+		--max-line-length=88 -r n $(this_app)/*.py || exit 0
+
+pylint: lint
+
+checkmetadata:
+	python3 setup.py check -s --restructuredtext
+
+mypy:
+	mypy --strict .
+
+pytest:
+	pytest
+
+test: editable install_test_requirements pytest
+
+test_cov:
+	 pytest --cov=$(this_app) --cov-report term-missing
+
+black:
+	black .
+
+proto:
+	for p in src-protobuf/*.proto; do \
+	  protoc -v -I=src-protobuf --python_out=takprotobuf/proto $$p; \
+	done
diff --git a/README.md b/README.md
deleted file mode 100644
index a06609b..0000000
--- a/README.md
+++ /dev/null
@@ -1,103 +0,0 @@
-# takprotobuf
-
-Python library to encode and decode Cursor-on-Target (CoT) messages using Protocol Buffers.
-
-## Usage
-
-The library currently contains two basic functions.   `parseProto()` decodes a protobuf and returns the contents of the message.  `xmlToProto()` encodes XML to TAK protobuf.  I'll be adding an additional functionton to encode a protobuf directly from a Python oject or class.
-
-### xmlToProto()
-
-Given a string which contains either a CoT message in XML or the path to an XML file containing a CoT message, the function `xmlToProto()` will return a byte array containing the binary protobuf.
-
-For example, if the string `xml` contained:
-```
-<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
-<event version='2.0' uid='aa0b0312-b5cd-4c2c-bbbc-9c4c70216261' type='a-f-G-E-V-C' time='2020-02-08T18:10:44.000Z' start='2020-02-08T18:10:44.000Z' stale='2020-02-08T18:11:11.000Z' how='h-e'><point lat='43.97957317' lon='-66.07737696' hae='26.767999' ce='9999999.0' le='9999999.0' /><detail><uid Droid='Eliopoli HQ'/><contact callsign='Eliopoli HQ' endpoint='192.168.1.10:4242:tcp'/><__group name='Yellow' role='HQ'/><status battery='100'/><takv platform='WinTAK-CIV' device='LENOVO 20QV0007US' os='Microsoft Windows 10 Home' version='1.10.0.137'/><track speed='0.00000000' course='0.00000000'/></detail></event>
-```
-You would call the xmlToProto() function with:
-```
-from takprotobuf import xmlToProto
-xmlToProto(xml)
-```
-The function would return:
-```
-bytearray(b'\xbf\x01\xbf\x12\xff\x01\n\x0ba-f-G-E-V-C*$aa0b0312-b5cd-4c2c-bbbc-9c4c702162610\xa0\xa2\xc7\xb8\x82.8\xa0\xa2\xc7\xb8\x82.@\x98\xf5\xc8\xb8\x82.J\x03h-eQ3\x98T\xa7b\xfdE@Y}*~\xbe\xf3\x84P\xc0aW\\\x1c\x95\x9b\xc4:@i\x00\x00\x00\xe0\xcf\x12cAq\x00\x00\x00\xe0\xcf\x12cAz\x82\x01\x12$\n\x15192.168.1.10:4242:tcp\x12\x0bEliopoli HQ\x1a\x0c\n\x06Yellow\x12\x02HQ*\x02\x08d2F\n\x11LENOVO 20QV0007US\x12\nWinTAK-CIV\x1a\x19Microsoft Windows 10 Home"\n1.10.0.137:\x00')
-```
-
-### parseProto()
-
-Given a bytearray containing a TAK protobuf, `parseProto()` will return an instance of the protobuf class.  You can then access the contents as an object.
-
-If `binary` is a bytearray containing a TAK protobuf:
-```
-bytearray(b'\xbf\x01\xbf\x12\xff\x01\n\x0ba-f-G-E-V-C*$aa0b0312-b5cd-4c2c-bbbc-9c4c702162610\xa0\xa2\xc7\xb8\x82.8\xa0\xa2\xc7\xb8\x82.@\x98\xf5\xc8\xb8\x82.J\x03h-eQ3\x98T\xa7b\xfdE@Y}*~\xbe\xf3\x84P\xc0aW\\\x1c\x95\x9b\xc4:@i\x00\x00\x00\xe0\xcf\x12cAq\x00\x00\x00\xe0\xcf\x12cAz\x82\x01\x12$\n\x15192.168.1.10:4242:tcp\x12\x0bEliopoli HQ\x1a\x0c\n\x06Yellow\x12\x02HQ*\x02\x08d2F\n\x11LENOVO 20QV0007US\x12\nWinTAK-CIV\x1a\x19Microsoft Windows 10 Home"\n1.10.0.137:\x00')
-```
-You would call the parseProto() function with
-```
-from takprotobuf import parseProto
-decoded = parseProto(binary)
-```
-The function reurns an object which contains the data from the protobuf. Individual attributes can be accessed by calling them directly, and a built-in method will return pretty-printed data if you call higher level elements.
-
-For example:
-```
-from takprotobuf import parseProto
-decoded = parseProto(binary)
-print(decoded)
-```
-returns a human-readable representation of the object.  By default, the attributes are laid out in the same hierarchy as TAK protocol, which is different from CoT XML.  I'll be adding the option to return an object that is more similar to the way CoT XML is organized.
-```
-cotEvent {
-  type: "a-f-G-E-V-C"
-  uid: "aa0b0312-b5cd-4c2c-bbbc-9c4c70216261"
-  sendTime: 1581203444000
-  startTime: 1581203444000
-  staleTime: 1581203471000
-  how: "h-e"
-  lat: 43.97957317
-  lon: -66.07737696
-  hae: 26.767999
-  ce: 9999999.0
-  le: 9999999.0
-  detail {
-    contact {
-      endpoint: "192.168.1.10:4242:tcp"
-      callsign: "Eliopoli HQ"
-    }
-    group {
-      name: "Yellow"
-      role: "HQ"
-    }
-    status {
-      battery: 100
-    }
-    takv {
-      device: "LENOVO 20QV0007US"
-      platform: "WinTAK-CIV"
-      os: "Microsoft Windows 10 Home"
-      version: "1.10.0.137"
-    }
-    track {
-    }
-  }
-}
-```
-
-### TAK Protobuf Header Bytes
-
-When TAK clients send UDP packets containing protobufs, there is a three byte header consisting of `0xbf 0x01 0xbf`.  The `xmlToProto()` function adds the header bytes for you, and the `parseProto()` functions expects them to be included in its input.  This may change in the future, as I learn more about the TAK ecosystem.
-
-## To Do
-
-- Clean up processing for the `xmlDetail` element
-- Encode protobuf directly from Python object or class
-- Exception handling
-
-## Credits
-
-I couldn't have created this without all of the examples of CoT XML provided by the developers of FreeTAKServer at https://github.com/FreeTAKTeam/FreeTakServer/tree/master/docs/Example%20metrics/cot
-
-Built using Protoc, the protobuf compiler https://github.com/protocolbuffers/protobuf
-
-and the .proto files from the ATAK repository https://github.com/deptofdefense/AndroidTacticalAssaultKit-CIV/tree/master/commoncommo/core/impl/protobuf
diff --git a/README.rst b/README.rst
new file mode 100644
index 0000000..b5a21a0
--- /dev/null
+++ b/README.rst
@@ -0,0 +1,208 @@
+.. image:: ./docs/pytak_logo-256x264.png
+    :alt: PyTAK Logo
+
+takproto: TAK Protocol Python Module
+************************************
+
+``takproto`` is a Python module to encode & decode 'TAK Protocol Payload - Version 1' 
+Protocol Buffer based Cursor on Target (CoT) messages.
+
+From the ATAK source:
+
+    Version 1 of the TAK Protocol Payload is a Google Protocol Buffer based
+    payload.  Each Payload consists of one (and only one)
+    atakmap::commoncommo::v1::TakMessage message which is serialized using
+    Google protocol buffers version 3.
+
+    Source: https://github.com/deptofdefense/AndroidTacticalAssaultKit-CIV/blob/master/commoncommo/core/impl/protobuf/protocol.txt
+
+``takproto`` is a fork & complete re-write of @dB-SPL's 
+`takprotobuf <https://github.com/dB-SPL/takprotobuf>`_.
+Absolute credit goes to them for their initial implementation. 
+
+Notable differences between the original ``takprotobuf`` & this module ``takproto``:
+
+1. Rebuild proto files using `Protocol Buffers v21 <https://protobuf.dev/>`_.
+2. Added support for encoding & decoding plain XML, Mesh & Stream TAK Protocol formats.
+3. Remove dependency on ``untangle`` module, allowing compatibility with Python 3.6 
+   through 3.10. Unfortunately many single-board computers (i.e. Raspberry Pi) still 
+   ship with Python 3.6, this change allows ``takproto`` to run on those systems.
+4. Added ``xmlDetails`` detection for supporting undefined Protobuf elements in XML.
+5. > 90% test coverage with **new** Unit Tests.
+6. PEP-8 & Black style, linting, documentation & formatting of code.
+
+As much as possible @db-SPL's licensing terms were honored in this fork.
+
+
+Usage
+=====
+
+The `takproto` module exports two functions:
+
+
+xml2proto()
+-----------
+
+Given a string which contains either a CoT message in XML or the path to an XML file 
+containing a CoT message, the function ``xml2proto()`` will return a ``bytearray`` containing 
+the binary protobuf::
+
+    import takproto
+
+    cot = """<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
+    <event version='2.0' uid='aa0b0312-b5cd-4c2c-bbbc-9c4c70216261' type='a-f-G-E-V-C' time='2020-02-08T18:10:44.000Z' start='2020-02-08T18:10:44.000Z' stale='2020-02-08T18:11:11.000Z' how='h-e'>
+        <point lat='43.97957317' lon='-66.07737696' hae='26.767999' ce='9999999.0' le='9999999.0' />
+        <detail>
+            <uid Droid='Eliopoli HQ'/>
+            <contact callsign='Eliopoli HQ' endpoint='192.168.1.10:4242:tcp'/>
+            <__group name='Yellow' role='HQ'/><status battery='100'/>
+            <takv platform='WinTAK-CIV' device='LENOVO 20QV0007US' os='Microsoft Windows 10 Home' version='1.10.0.137'/>
+            <track speed='0.00000000' course='0.00000000'/>
+        </detail>
+    </event>
+    """
+
+    buf = takproto.xml2proto(cot)
+    print(buf)
+
+Would return the CoT XML encoded as TAK Protocol Version 1 Mesh::
+    
+    bytearray(b'\xbf\x01\xbf\x12\xff\x01\n\x0ba-f-G-E-V-C*$aa0b0312-b5cd-4c2c-bbbc-9c4c702162610\xa0\xa2\xc7\xb8\x82.8\xa0\xa2\xc7\xb8\x82.@\x98\xf5\xc8\xb8\x82.J\x03h-eQ3\x98T\xa7b\xfdE@Y}*~\xbe\xf3\x84P\xc0aW\\\x1c\x95\x9b\xc4:@i\x00\x00\x00\xe0\xcf\x12cAq\x00\x00\x00\xe0\xcf\x12cAz\x82\x01\x12$\n\x15192.168.1.10:4242:tcp\x12\x0bEliopoli HQ\x1a\x0c\n\x06Yellow\x12\x02HQ*\x02\x08d2F\n\x11LENOVO 20QV0007US\x12\nWinTAK-CIV\x1a\x19Microsoft Windows 10 Home"\n1.10.0.137:\x00')
+
+Additionally, calling xml2proto with the `takproto.TAKProtoVer.STREAM` flag would return a stream-ready protobuf::
+
+    buf = takproto.xml2proto(cot, takproto.TAKProtoVer.STREAM)
+    print(buf)
+
+Would return the CoT XML encoded as TAK Protocol Version 1 Stream::
+
+    bytearray(b'\xbf\x9f\x02\x12\xff\x01\n\x0ba-f-G-E-V-C*$aa0b0312-b5cd-4c2c-bbbc-9c4c702162610\xa0\xa2\xc7\xb8\x82.8\xa0\xa2\xc7\xb8\x82.@\x98\xf5\xc8\xb8\x82.J\x03h-eQ3\x98T\xa7b\xfdE@Y}*~\xbe\xf3\x84P\xc0aW\\\x1c\x95\x9b\xc4:@i\x00\x00\x00\xe0\xcf\x12cAq\x00\x00\x00\xe0\xcf\x12cAz\x82\x01\x12$\n\x15192.168.1.10:4242:tcp\x12\x0bEliopoli HQ\x1a\x0c\n\x06Yellow\x12\x02HQ*\x02\x08d2F\n\x11LENOVO 20QV0007US\x12\nWinTAK-CIV\x1a\x19Microsoft Windows 10 Home"\n1.10.0.137:\x00')
+
+
+parse_proto()
+-------------
+
+Given a bytearray containing a version 1 protobuf, ``parse_proto()`` will return an 
+instance of the protobuf class. You can then access the contents as an object::
+
+    import takproto
+   
+    pb = bytearray(b'\xbf\x01\xbf\x12\xff\x01\n\x0ba-f-G-E-V-C*$aa0b0312-b5cd-4c2c-bbbc-9c4c702162610\xa0\xa2\xc7\xb8\x82.8\xa0\xa2\xc7\xb8\x82.@\x98\xf5\xc8\xb8\x82.J\x03h-eQ3\x98T\xa7b\xfdE@Y}*~\xbe\xf3\x84P\xc0aW\\\x1c\x95\x9b\xc4:@i\x00\x00\x00\xe0\xcf\x12cAq\x00\x00\x00\xe0\xcf\x12cAz\x82\x01\x12$\n\x15192.168.1.10:4242:tcp\x12\x0bEliopoli HQ\x1a\x0c\n\x06Yellow\x12\x02HQ*\x02\x08d2F\n\x11LENOVO 20QV0007US\x12\nWinTAK-CIV\x1a\x19Microsoft Windows 10 Home"\n1.10.0.137:\x00')
+
+    cot = parse_proto(pb)
+ 
+This method of calling parse_proto would return an object containing the data from the 
+protobuf. If you were to ``print(cot)``, you would see::
+
+    cotEvent {
+        type: "a-f-G-E-V-C"
+        uid: "aa0b0312-b5cd-4c2c-bbbc-9c4c70216261"
+        sendTime: 1581203444000
+        startTime: 1581203444000
+        staleTime: 1581203471000
+        how: "h-e"
+        lat: 43.97957317
+        lon: -66.07737696
+        hae: 26.767999
+        ce: 9999999.0
+        le: 9999999.0
+        detail {
+            contact {
+            endpoint: "192.168.1.10:4242:tcp"
+            callsign: "Eliopoli HQ"
+            }
+            group {
+            name: "Yellow"
+            role: "HQ"
+            }
+            status {
+            battery: 100
+            }
+            takv {
+            device: "LENOVO 20QV0007US"
+            platform: "WinTAK-CIV"
+            os: "Microsoft Windows 10 Home"
+            version: "1.10.0.137"
+            }
+            track {
+            }
+        }
+    }
+
+Object attributes can be accessed by calling them in a Pythonic manner::
+
+    print(cot.cotEvent.detail.contact.callsign)
+    "Eliopoli HQ"
+
+
+Additional Examples
+-------------------
+
+For additional examples using this module, see the `tests/` directory.
+
+
+What's the difference between the TAK Protocol formats?
+=======================================================
+
+Originally the TAK Products spoke Cursor on Target (CoT) encoded as plain XML. Later versions 
+of the TAK Products added support for sending CoT as Google Protobuf, which TPC named 'TAK Protocol Version 1'.
+
+Out of the box, TAK Products such as ATAK and WinTAK configured for 'Mesh SA' will send 
+TAK Protocol Version 1 Mesh formatted CoT. This format utizes a static payload header of 
+the format `191 1 191 <payload>`.
+
+TAK Products configured for connecting to a TAK Server will send TAK Protocol Version 1 Stream 
+formatted CoT. This format utizes a dynamic payload header of the format `191 <varint payload length> <payload>`.
+This header format is required for specifying the size of the payload within the TCP packet.
+
+The `takproto` module supports encoding and decoding all 3 formats of CoT messages.
+
+.. image:: ./docs/takproto_chart.png
+    :alt: TAK Protocol chart
+
+
+Source
+======
+Github: https://github.com/snstac/takproto
+
+
+Authors
+=======
+* Greg Albrecht https://www.snstac.com/
+* Delta Bravo-15 https://github.com/db-SPL
+
+
+Copyright
+=========
+* Copyright 2023 Sensors & Signals LLC
+* Copyright 2020 Delta Bravo-15 <deltabravo15ga@gmail.com>
+
+
+Style
+=====
+Python Black, otherwise Google, then PEP-8.
+
+
+License
+=======
+Copyright 2023 Sensors & Signals LLC
+
+Copyright 2020 Delta Bravo-15 <deltabravo15ga@gmail.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/docs/pytak_logo-256x264.png b/docs/pytak_logo-256x264.png
new file mode 100644
index 0000000..fe8b0fd
Binary files /dev/null and b/docs/pytak_logo-256x264.png differ
diff --git a/docs/pytak_logo.png b/docs/pytak_logo.png
new file mode 100644
index 0000000..98252e5
Binary files /dev/null and b/docs/pytak_logo.png differ
diff --git a/docs/takproto_chart.png b/docs/takproto_chart.png
new file mode 100644
index 0000000..c808643
Binary files /dev/null and b/docs/takproto_chart.png differ
diff --git a/setup.py b/setup.py
index e839bfb..cd18968 100644
--- a/setup.py
+++ b/setup.py
@@ -1,27 +1,88 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+#
+# Copyright 2023 Sensors & Signals LLC
+# Copyright 2020 Delta Bravo-15
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in all
+# copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+#
+
+
+"""Setup for the Python TAK Protocol Packet - Version 1 Module.
+
+:license: MIT License
+:source: <https://github.com/snstac/takproto>
+"""
+
+import os
+import sys
+
 import setuptools
 
-with open("README.md", "r") as fh:
-    long_description = fh.read()
+__title__ = "takproto"
+__version__ = "2.0.0"
+__license__ = "MIT License"
+
+
+def publish():
+    """Publish this package to pypi."""
+    if sys.argv[-1] == "publish":
+        os.system("python setup.py sdist")
+        os.system("twine upload dist/*")
+        sys.exit()
+
+
+publish()
+
+
+def read_readme(readme_file="README.rst") -> str:
+    """Read the contents of the README file for use as a long_description."""
+    readme: str = ""
+    this_directory = os.path.abspath(os.path.dirname(__file__))
+    with open(os.path.join(this_directory, readme_file), encoding="UTF-8") as rmf:
+        readme = rmf.read()
+    return readme
+
 
 setuptools.setup(
-    name="takprotobuf",
-    version="0.0.1",
-    author="dB-SPL",
-    author_email="deltabravo15ga@gmail.com",
-    description="A Python library to encode and decode Cursor-on-Target (CoT) messages using Protocol Buffers.",
-    long_description=long_description,
-    long_description_content_type="text/markdown",
-    url="https://github.com/DeltaBravo15/takprotobuf",
-	keywords=['TAK', 'ATAK', 'WinTAK', 'Python', 'Opensource'],
-    packages=setuptools.find_packages(),
-	install_requires=[
-		'untangle',
-		'lxml',
-    ],
+    version=__version__,
+    name=__title__,
+    packages=[__title__, f"{__title__}.proto"],
+    package_dir={__title__: __title__, f"{__title__}.proto":f"{__title__}/proto"},
+    url=f"https://github.com/snstac/{__title__}",
+    description=(
+        "A Python module to encode & decode 'TAK Protocol Payload - Version 1'"
+        " Protocol Buffer based Cursor on Target (CoT) messages."
+    ),
+    author="Greg Albrecht",
+    author_email="gba@snstac.com",
+    package_data={"": ["LICENSE"]},
+    license="MIT License",
+    long_description=read_readme(),
+    long_description_content_type="text/x-rst",
+    zip_safe=False,
+    include_package_data=True,
     classifiers=[
         "Programming Language :: Python :: 3",
         "License :: OSI Approved :: MIT License",
         "Operating System :: OS Independent",
     ],
-    python_requires='>=3.6',
+    keywords=["Cursor on Target", "ATAK", "TAK", "CoT", "WinTAK", "iTAK"],
+    install_requires=["protobuf >= 4.21.0", "delimited-protobuf >= 1.0.0"],
 )
diff --git a/src-protobuf/.cvsignore b/src-protobuf/.cvsignore
new file mode 100644
index 0000000..ef4ee89
--- /dev/null
+++ b/src-protobuf/.cvsignore
@@ -0,0 +1,2 @@
+*.h
+*.cc
diff --git a/src-protobuf/LICENSE.md b/src-protobuf/LICENSE.md
new file mode 100644
index 0000000..652daaf
--- /dev/null
+++ b/src-protobuf/LICENSE.md
@@ -0,0 +1,1058 @@
+GNU GENERAL PUBLIC LICENSE
+Version 3, 29 June 2007
+
+Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
+Everyone is permitted to copy and distribute verbatim copies
+of this license document, but changing it is not allowed.
+
+Preamble
+
+The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+The precise terms and conditions for copying, distribution and
+modification follow.
+
+TERMS AND CONDITIONS
+
+0. Definitions.
+
+"This License" refers to version 3 of the GNU General Public License.
+
+"Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+"The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+1. Source Code.
+
+The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+The Corresponding Source for a work in source code form is that
+same work.
+
+2. Basic Permissions.
+
+All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+4. Conveying Verbatim Copies.
+
+You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+5. Conveying Modified Source Versions.
+
+You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+a) The work must carry prominent notices stating that you modified
+it, and giving a relevant date.
+
+b) The work must carry prominent notices stating that it is
+released under this License and any conditions added under section
+7. This requirement modifies the requirement in section 4 to
+"keep intact all notices".
+
+c) You must license the entire work, as a whole, under this
+License to anyone who comes into possession of a copy. This
+License will therefore apply, along with any applicable section 7
+additional terms, to the whole of the work, and all its parts,
+regardless of how they are packaged. This License gives no
+permission to license the work in any other way, but it does not
+invalidate such permission if you have separately received it.
+
+d) If the work has interactive user interfaces, each must display
+Appropriate Legal Notices; however, if the Program has interactive
+interfaces that do not display Appropriate Legal Notices, your
+work need not make them do so.
+
+A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+6. Conveying Non-Source Forms.
+
+You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+a) Convey the object code in, or embodied in, a physical product
+(including a physical distribution medium), accompanied by the
+Corresponding Source fixed on a durable physical medium
+customarily used for software interchange.
+
+b) Convey the object code in, or embodied in, a physical product
+(including a physical distribution medium), accompanied by a
+written offer, valid for at least three years and valid for as
+long as you offer spare parts or customer support for that product
+model, to give anyone who possesses the object code either (1) a
+copy of the Corresponding Source for all the software in the
+product that is covered by this License, on a durable physical
+medium customarily used for software interchange, for a price no
+more than your reasonable cost of physically performing this
+conveying of source, or (2) access to copy the
+Corresponding Source from a network server at no charge.
+
+c) Convey individual copies of the object code with a copy of the
+written offer to provide the Corresponding Source. This
+alternative is allowed only occasionally and noncommercially, and
+only if you received the object code with such an offer, in accord
+with subsection 6b.
+
+d) Convey the object code by offering access from a designated
+place (gratis or for a charge), and offer equivalent access to the
+Corresponding Source in the same way through the same place at no
+further charge. You need not require recipients to copy the
+Corresponding Source along with the object code. If the place to
+copy the object code is a network server, the Corresponding Source
+may be on a different server (operated by you or a third party)
+that supports equivalent copying facilities, provided you maintain
+clear directions next to the object code saying where to find the
+Corresponding Source. Regardless of what server hosts the
+Corresponding Source, you remain obligated to ensure that it is
+available for as long as needed to satisfy these requirements.
+
+e) Convey the object code using peer-to-peer transmission, provided
+you inform other peers where the object code and Corresponding
+Source of the work are being offered to the general public at no
+charge under subsection 6d.
+
+A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+"Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+7. Additional Terms.
+
+"Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+a) Disclaiming warranty or limiting liability differently from the
+terms of sections 15 and 16 of this License; or
+
+b) Requiring preservation of specified reasonable legal notices or
+author attributions in that material or in the Appropriate Legal
+Notices displayed by works containing it; or
+
+c) Prohibiting misrepresentation of the origin of that material, or
+requiring that modified versions of such material be marked in
+reasonable ways as different from the original version; or
+
+d) Limiting the use for publicity purposes of names of licensors or
+authors of the material; or
+
+e) Declining to grant rights under trademark law for use of some
+trade names, trademarks, or service marks; or
+
+f) Requiring indemnification of licensors and authors of that
+material by anyone who conveys the material (or modified versions of
+it) with contractual assumptions of liability to the recipient, for
+any liability that these contractual assumptions directly impose on
+those licensors and authors.
+
+All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+If you modify this Program, or any covered work, by linking or combining
+it with ACRA (or a modified version of that library),
+containing parts covered by the terms of the Apache License v2.0, the
+licensors of this Program grant you additional permission to convey the
+resulting work. Corresponding Source for a non-source form of such a
+combination shall include the source code for the parts of ACRA
+used as well as that of the covered work.
+
+If you modify this Program, or any covered work, by linking or combining
+it with AChartEngine (or a modified version of that library),
+containing parts covered by the terms of the Apache License v2.0, the
+licensors of this Program grant you additional permission to convey the
+resulting work. Corresponding Source for a non-source form of such a
+combination shall include the source code for the parts of AChartEngine
+used as well as that of the covered work.
+
+If you modify this Program, or any covered work, by linking or combining
+it with USB Serial for Android (or a modified version of that library),
+containing parts covered by the terms of the GNU Lesser General Public License, the
+licensors of this Program grant you additional permission to convey the
+resulting work. Corresponding Source for a non-source form of such a
+combination shall include the source code for the parts of USB Serial for Android
+used as well as that of the covered work.
+
+If you modify this Program, or any covered work, by linking or combining
+it with DataDroid (or a modified version of that library),
+containing parts covered by the terms of the Beerware License, the
+licensors of this Program grant you additional permission to convey the
+resulting work. Corresponding Source for a non-source form of such a
+combination shall include the source code for the parts of DataDroid
+used as well as that of the covered work.
+
+If you modify this Program, or any covered work, by linking or combining
+it with Jackcess (or a modified version of that library),
+containing parts covered by the terms of the Lesser GNU Public License, the
+licensors of this Program grant you additional permission to convey the
+resulting work. Corresponding Source for a non-source form of such a
+combination shall include the source code for the parts of Jackcess
+used as well as that of the covered work.
+
+If you modify this Program, or any covered work, by linking or combining
+it with Gv2F (or a modified version of that library),
+containing parts covered by the terms of the PAR Gv2F License, the
+licensors of this Program grant you additional permission to convey the
+resulting work.
+
+If you modify this Program, or any covered work, by linking or combining
+it with PGSC Mobile Video (or a modified version of that library),
+containing parts covered by the terms of the PAR Gv2F License, the
+licensors of this Program grant you additional permission to convey the
+resulting work.
+
+If you modify this Program, or any covered work, by linking or combining
+it with OpenCSV (or a modified version of that library),
+containing parts covered by the terms of Apache License v2.0, the
+licensors of this Program grant you additional permission to convey the
+resulting work. Corresponding Source for a non-source form of such a
+combination shall include the source code for the parts of OpenCSV
+used as well as that of the covered work.
+
+If you modify this Program, or any covered work, by linking or combining
+it with OpenNMEA (or a modified version of that library),
+containing parts covered by the terms of the GNU Lesser General Public License, the
+licensors of this Program grant you additional permission to convey the
+resulting work. Corresponding Source for a non-source form of such a
+combination shall include the source code for the parts of OpenNMEA
+used as well as that of the covered work.
+
+If you modify this Program, or any covered work, by linking or combining
+it with Sanselan (or a modified version of that library),
+containing parts covered by the terms of the Apache License v2.0, the
+licensors of this Program grant you additional permission to convey the
+resulting work. Corresponding Source for a non-source form of such a
+combination shall include the source code for the parts of SimpleKML
+used as well as that of the covered work.
+
+If you modify this Program, or any covered work, by linking or combining
+it with SimpleKML (or a modified version of that library),
+containing parts covered by the terms of the Apache License v2.0, the
+licensors of this Program grant you additional permission to convey the
+resulting work. Corresponding Source for a non-source form of such a
+combination shall include the source code for the parts of SimpleKML
+used as well as that of the covered work.
+
+If you modify this Program, or any covered work, by linking or combining
+it with SimpleXML (or a modified version of that library),
+containing parts covered by the terms of the Apache License v2.0, the
+licensors of this Program grant you additional permission to convey the
+resulting work Corresponding Source for a non-source form of such a
+combination shall include the source code for the parts of SimpleXML
+used as well as that of the covered work.
+
+If you modify this Program, or any covered work, by linking or combining
+it with FFMPEG (or a modified version of that library),
+containing parts covered by the terms of the Lesser GNU Public License, the
+licensors of this Program grant you additional permission to convey the
+resulting work. Corresponding Source for a non-source form of such a
+combination shall include the source code for the parts of FFMPEG
+used as well as that of the covered work.
+
+If you modify this Program, or any covered work, by linking or combining
+it with Apache Commons (or a modified version of that library),
+containing parts covered by the terms of Apache License v2.0, the
+licensors of this Program grant you additional permission to convey the
+resulting work. Corresponding Source for a non-source form of such a
+combination shall include the source code for the parts of Apache Commons
+used as well as that of the covered work.
+
+If you modify this Program, or any covered work, by linking or combining
+it with GLU (or a modified version of that library),
+containing parts covered by the terms of SGI Free Software License B, the
+licensors of this Program grant you additional permission to convey the
+resulting work. Corresponding Source for a non-source form of such a
+combination shall include the source code for the parts of GLU
+used as well as that of the covered work.
+
+If you modify this Program, or any covered work, by linking or combining
+it with Jama (or a modified version of that library),
+containing parts that are Public Domain software, the
+licensors of this Program grant you additional permission to convey the
+resulting work. Corresponding Source for a non-source form of such a
+combination shall include the source code for the parts of Jama
+used as well as that of the covered work.
+
+If you modify this Program, or any covered work, by linking or combining
+it with ASSIMP (or a modified version of that library),
+containing parts covered by the terms of the Open Asset Import Library, the
+licensors of this Program grant you additional permission to convey the
+resulting work. Corresponding Source for a non-source form of such a
+combination shall include the source code for the parts of ASSIMP
+used as well as that of the covered work.
+
+If you modify this Program, or any covered work, by linking or combining
+it with LIBCHARSET (or a modified version of that library),
+containing parts covered by the terms of the Lesser GNU Public License, the
+licensors of this Program grant you additional permission to convey the
+resulting work. Corresponding Source for a non-source form of such a
+combination shall include the source code for the parts of LIBCHARSET
+used as well as that of the covered work.
+
+If you modify this Program, or any covered work, by linking or combining
+it with GDAL (or a modified version of that library),
+containing parts covered by the terms of the GDAL/OGR License, the
+licensors of this Program grant you additional permission to convey the
+resulting work. Corresponding Source for a non-source form of such a
+combination shall include the source code for the parts of GDAL
+used as well as that of the covered work.
+
+If you modify this Program, or any covered work, by linking or combining
+it with GEOS (or a modified version of that library),
+containing parts covered by the terms of Lesser GNU Public License, the
+licensors of this Program grant you additional permission to convey the
+resulting work. Corresponding Source for a non-source form of such a
+combination shall include the source code for the parts of GEOS
+used as well as that of the covered work.
+
+If you modify this Program, or any covered work, by linking or combining
+it with LIBICONV (or a modified version of that library),
+containing parts covered by the terms of Lesser GNU Public License, the
+licensors of this Program grant you additional permission to convey the
+resulting work. Corresponding Source for a non-source form of such a
+combination shall include the source code for the parts of LIBICONV
+used as well as that of the covered work.
+
+If you modify this Program, or any covered work, by linking or combining
+it with the MrSID Decode SDK (or a modified version of that library),
+containing parts covered by the terms of LizardTech Geo Express DSDK License, the
+licensors of this Program grant you additional permission to convey the
+resulting work.
+
+If you modify this Program, or any covered work, by linking or combining
+it with Kakadu (or a modified version of that library),
+containing parts covered by the terms of the Kakadu License, the
+licensors of this Program grant you additional permission to convey the
+resulting work.
+
+If you modify this Program, or any covered work, by linking or combining
+it with LIBKML (or a modified version of that library),
+containing parts covered by the terms of the LIBKML license, the
+licensors of this Program grant you additional permission to convey the
+resulting work. Corresponding Source for a non-source form of such a
+combination shall include the source code for the parts of LIBKML
+used as well as that of the covered work.
+
+If you modify this Program, or any covered work, by linking or combining
+it with uriparser (or a modified version of that library),
+containing parts covered by the terms of the uriparser license, the
+licensors of this Program grant you additional permission to convey the
+resulting work. Corresponding Source for a non-source form of such a
+combination shall include the source code for the parts of uriparser
+used as well as that of the covered work.
+
+If you modify this Program, or any covered work, by linking or combining
+it with Boost (or a modified version of that library),
+containing parts covered by the terms of the Boost Software License v1.0, the
+licensors of this Program grant you additional permission to convey the
+resulting work. Corresponding Source for a non-source form of such a
+combination shall include the source code for the parts of Boost
+used as well as that of the covered work.
+
+If you modify this Program, or any covered work, by linking or combining
+it with minizip (or a modified version of that library),
+containing parts covered by the terms of the minizip license, the
+licensors of this Program grant you additional permission to convey the
+resulting work. Corresponding Source for a non-source form of such a
+combination shall include the source code for the parts of minizip
+used as well as that of the covered work.
+
+If you modify this Program, or any covered work, by linking or combining
+it with OGDI (or a modified version of that library),
+containing parts covered by the terms of the OGDI License, the
+licensors of this Program grant you additional permission to convey the
+resulting work Corresponding Source for a non-source form of such a
+combination shall include the source code for the parts of OGDI
+used as well as that of the covered work.
+
+If you modify this Program, or any covered work, by linking or combining
+it with Proj.4 (or a modified version of that library),
+containing parts covered by the terms of the Proj.4 License, the
+licensors of this Program grant you additional permission to convey the
+resulting work. Corresponding Source for a non-source form of such a
+combination shall include the source code for the parts of Proj.4
+used as well as that of the covered work.
+
+If you modify this Program, or any covered work, by linking or combining
+it with SQLite (or a modified version of that library),
+containing parts covered by the terms of the SQLite License, the
+licensors of this Program grant you additional permission to convey the
+resulting work. Corresponding Source for a non-source form of such a
+combination shall include the source code for the parts of SQLite
+used as well as that of the covered work.
+
+If you modify this Program, or any covered work, by linking or combining
+it with SQL Cipher(or a modified version of that library),
+containing parts covered by the terms of the SQL Cipher License, the
+licensors of this Program grant you additional permission to convey the
+resulting work. Corresponding Source for a non-source form of such a
+combination shall include the source code for the parts of SQL Cipher
+used as well as that of the covered work.
+
+If you modify this Program, or any covered work, by linking or combining
+it with SpatiaLite (or a modified version of that library),
+containing parts covered by the terms of the Mozilla Public License 1.1.1, the
+licensors of this Program grant you additional permission to convey the
+resulting work. Corresponding Source for a non-source form of such a
+combination shall include the source code for the parts of SpatiaLite
+used as well as that of the covered work.
+
+If you modify this Program, or any covered work, by linking or combining
+it with zlib (or a modified version of that library),
+containing parts covered by the terms of the zlib License, the
+licensors of this Program grant you additional permission to convey the
+resulting work. Corresponding Source for a non-source form of such a
+combination shall include the source code for the parts of zlib
+used as well as that of the covered work.
+
+If you modify this Program, or any covered work, by linking or combining
+it with tinygltf (or a modified version of that library),
+containing parts covered by the terms of the MIT License, the
+licensors of this Program grant you additional permission to convey the
+resulting work. Corresponding Source for a non-source form of such a
+combination shall include the source code for the parts of tinygltf
+used as well as that of the covered work.
+
+If you modify this Program, or any covered work, by linking or combining
+it with tinygltfloader (or a modified version of that library),
+containing parts covered by the terms of the MIT License, the
+licensors of this Program grant you additional permission to convey the
+resulting work. Corresponding Source for a non-source form of such a
+combination shall include the source code for the parts of tinygltfloader
+used as well as that of the covered work.
+
+If you modify this Program, or any covered work, by linking or combining
+it with JSON For Modern C++ (or a modified version of that library),
+containing parts covered by the terms of the MIT License, the
+licensors of this Program grant you additional permission to convey the
+resulting work. Corresponding Source for a non-source form of such a
+combination shall include the source code for the parts of JSON For Modern C++
+used as well as that of the covered work.
+
+If you modify this Program, or any covered work, by linking or combining
+it with stb_image (or a modified version of that library),
+containing parts that are Public Domain software, the
+licensors of this Program grant you additional permission to convey the
+resulting work. Corresponding Source for a non-source form of such a
+combination shall include the source code for the parts of stb_image
+used as well as that of the covered work.
+
+If you modify this Program, or any covered work, by linking or combining
+it with stb_image_write (or a modified version of that library),
+containing parts that are Public Domain software, the
+licensors of this Program grant you additional permission to convey the
+resulting work. Corresponding Source for a non-source form of such a
+combination shall include the source code for the parts of stb_image_write
+used as well as that of the covered work.
+
+If you modify this Program, or any covered work, by linking or combining
+it with LIBEXPAT (or a modified version of that library),
+containing parts covered by the terms of the LIBEXPAT License, the
+licensors of this Program grant you additional permission to convey the
+resulting work. Corresponding Source for a non-source form of such a
+combination shall include the source code for the parts of LIBEXPAT
+used as well as that of the covered work.
+
+If you modify this Program, or any covered work, by linking or combining
+it with STL Soft (or a modified version of that library),
+containing parts covered by the terms of the STL Soft License, the
+licensors of this Program grant you additional permission to convey the
+resulting work. Corresponding Source for a non-source form of such a
+combination shall include the source code for the parts of STL Soft
+used as well as that of the covered work.
+
+If you modify this Program, or any covered work, by linking or combining
+it with GLUES (or a modified version of that library),
+containing parts covered by the terms of the SGI Free Software License B, the
+licensors of this Program grant you additional permission to convey the
+resulting work. Corresponding Source for a non-source form of such a
+combination shall include the source code for the parts of GLUES
+used as well as that of the covered work.
+
+If you modify this Program, or any covered work, by linking or combining
+it with STB DXT (or a modified version of that library),
+containing parts that are Public Domain software, the
+licensors of this Program grant you additional permission to convey the
+resulting work. Corresponding Source for a non-source form of such a
+combination shall include the source code for the parts of STB DXT
+used as well as that of the covered work.
+
+If you modify this Program, or any covered work, by linking or combining
+it with WMM (or a modified version of that library),
+containing parts that are Public Domain software, the
+licensors of this Program grant you additional permission to convey the
+resulting work. Corresponding Source for a non-source form of such a
+combination shall include the source code for the parts of WMM
+used as well as that of the covered work.
+
+If you modify this Program, or any covered work, by linking or combining
+it with Protocol Buffers (or a modified version of that library),
+containing parts covered by the terms of Protocol Buffers License, the
+licensors of this Program grant you additional permission to convey the
+resulting work. Corresponding Source for a non-source form of such a
+combination shall include the source code for the parts of Protocol Buffers
+used as well as that of the covered work.
+
+If you modify this Program, or any covered work, by linking or combining
+it with LIBMICROHTTPD (or a modified version of that library),
+containing parts covered by the terms of the Lesser GNU Public License, the
+licensors of this Program grant you additional permission to convey the
+resulting work. Corresponding Source for a non-source form of such a
+combination shall include the source code for the parts of LIBMICROHTTPD
+used as well as that of the covered work.
+
+If you modify this Program, or any covered work, by linking or combining
+it with LIBCURL (or a modified version of that library),
+containing parts covered by the terms of the libcurl License, the
+licensors of this Program grant you additional permission to convey the
+resulting work. Corresponding Source for a non-source form of such a
+combination shall include the source code for the parts of LIBCURL
+used as well as that of the covered work.
+
+If you modify this Program, or any covered work, by linking or combining
+it with libxml2 (or a modified version of that library),
+containing parts covered by the terms of the MIT License, the
+licensors of this Program grant you additional permission to convey the
+resulting work. Corresponding Source for a non-source form of such a
+combination shall include the source code for the parts of LIBXML2
+used as well as that of the covered work.
+
+If you modify this Program, or any covered work, by linking or combining
+it with OpenSSL (or a modified version of that library),
+containing parts covered by the terms of the Open SSL License and the SSLeay License, the
+licensors of this Program grant you additional permission to convey the
+resulting work. Corresponding Source for a non-source form of such a
+combination shall include the source code for the parts of OpenSSL
+used as well as that of the covered work.
+
+If you modify this Program, or any covered work, by linking or combining
+it with GNU libstdc++ (or a modified version of that library),
+containing parts covered by the terms of the GNU Public License v3, the
+licensors of this Program grant you additional permission to convey the
+resulting work. Corresponding Source for a non-source form of such a
+combination shall include the source code for the parts of GNU libstdc++
+used as well as that of the covered work.
+
+8. Termination.
+
+You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+9. Acceptance Not Required for Having Copies.
+
+You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+10. Automatic Licensing of Downstream Recipients.
+
+Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+11. Patents.
+
+A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+12. No Surrender of Others' Freedom.
+
+If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+13. Use with the GNU Affero General Public License.
+
+Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+14. Revised Versions of this License.
+
+The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+15. Disclaimer of Warranty.
+
+THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+16. Limitation of Liability.
+
+IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+17. Interpretation of Sections 15 and 16.
+
+If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+END OF TERMS AND CONDITIONS
+
+How to Apply These Terms to Your New Programs
+
+If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+<one line to give the program's name and a brief idea of what it does.>
+Copyright (C) <year> <name of author>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+<program> Copyright (C) <year> <name of author>
+This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+This is free software, and you are welcome to redistribute it
+under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<https://www.gnu.org/licenses/>.
+
+The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<https://www.gnu.org/licenses/why-not-lgpl.html>.
\ No newline at end of file
diff --git a/src-protobuf/contact.proto b/src-protobuf/contact.proto
new file mode 100644
index 0000000..56fca08
--- /dev/null
+++ b/src-protobuf/contact.proto
@@ -0,0 +1,14 @@
+syntax = "proto3";
+option optimize_for = LITE_RUNTIME;
+
+package atakmap.commoncommo.protobuf.v1;
+
+// All items are required unless otherwise noted!
+// "required" means if they are missing on send, the conversion
+// to the message format will be rejected and fall back to opaque
+// XML representation
+message Contact {
+     // Endpoint is optional; if missing/empty do not populate.
+     string endpoint = 1;           // endpoint=
+     string callsign = 2;           // callsign=
+}
diff --git a/src-protobuf/cotevent.proto b/src-protobuf/cotevent.proto
new file mode 100644
index 0000000..6e7af1b
--- /dev/null
+++ b/src-protobuf/cotevent.proto
@@ -0,0 +1,44 @@
+syntax = "proto3";
+
+option optimize_for = LITE_RUNTIME;
+
+package atakmap.commoncommo.protobuf.v1;
+
+import "detail.proto";
+
+// A note about timestamps:
+// Uses "timeMs" units, which is number of milliseconds since
+// 1970-01-01 00:00:00 UTC
+//
+// All items are required unless otherwise noted!
+// "required" means if they are missing in the XML during outbound
+// conversion to protobuf, the message will be
+// rejected
+message CotEvent {
+    // <event>
+
+    string type = 1;               // <event type="x">
+
+    string access = 2;             // optional
+    string qos = 3;                // optional
+    string opex = 4;               // optional
+
+    string uid = 5;                // <event uid="x">
+    uint64 sendTime = 6;           // <event time="x"> converted to timeMs
+    uint64 startTime = 7;          // <event start="x"> converted to timeMs
+    uint64 staleTime = 8;          // <event stale="x"> converted to timeMs
+    string how = 9;                // <event how="x">
+
+    // <point>
+    double lat = 10;               // <point lat="x">
+    double lon = 11;               // <point lon="x">
+    double hae = 12;               // <point hae="x"> use 999999 for unknown
+    double ce = 13;                // <point ce="x"> use 999999 for unknown
+    double le = 14;                // <point ce="x"> use 999999 for unknown
+
+    // comprises children of <detail>
+    // This is optional - if omitted, then the cot message
+    // had no data under <detail>
+    Detail detail = 15;
+}
+
diff --git a/src-protobuf/detail.proto b/src-protobuf/detail.proto
new file mode 100644
index 0000000..cb27b0b
--- /dev/null
+++ b/src-protobuf/detail.proto
@@ -0,0 +1,78 @@
+syntax = "proto3";
+option optimize_for = LITE_RUNTIME;
+
+package atakmap.commoncommo.protobuf.v1;
+
+import "contact.proto";
+import "group.proto";
+import "precisionlocation.proto";
+import "status.proto";
+import "takv.proto";
+import "track.proto";
+
+// CotEvent detail
+// The strong typed message fields are optional. If used, they *MUST* adhere 
+// to the requirements of the message (see their proto file) and
+// their XML source element used to populate the message MUST
+// be omitted from the xmlDetail.
+// WHOLE ELEMENTS MUST BE CONVERTED TO MESSAGES. Do not try to
+// put part of the data from a given element into one of the messages
+// and put other parts of the data in an element of xmlDetail! This applies
+// especially if you add new things to the XML representation which do not
+// have a place in the equivalent protobuf message.  Instead, omit the
+// message and put the entire element in xmlDetail!
+//
+// xmlDetail is optional. If omitted, all Detail data has been
+// converted to the strongly typed message fields.
+// If present, this contains any remaining detail data that has NOT been
+// included in one of the strongly typed message fields.  To process the
+// xmlDetail, the following rules MUST be followed:
+// Senders of this message MUST:
+//     1. Remove child elements used to populate the other message
+//        fields.  If the same child element appears more times than an
+//        associated message field(s) is intended to encompass, or if any
+//        error occurs mapping to the message equivalent, do not remove
+//        the element(s) in question and do not populate the message
+//        equivalent.
+//     2. If no data under <detail> remains, STOP - do not populate
+//        xmlDetail
+//     3. Serialize the remaining XML tree under <detail>....</detail>
+//        as XML in UTF-8 encoding
+//     4. Remove the <detail> and </detail> element tags
+//     5. Remove the XML header
+//     6. Place the result in xmlDetail
+// Receivers of this message MUST do the equivalent of the following:
+//     1. If the field is not present (zero length), stop - do nothing
+//     2. Prepend <detail> and append </detail>
+//     3. Prepend an XML header for UTF-8 encoding, version 1.0 
+//        (<?xml version="1.0" encoding="UTF-8"?> or similar)
+//     4. Read the result, expecting a valid XML document with a document
+//        root of <detail>
+//     5. Merge in XML equivalents of each of the strongly typed
+//        messages present in this Detail message.
+//        In the event that a sending application does not follow 
+//        sending rule #1 above properly and data for the same element
+//        appears in xmlDetail, the data in xmlDetail should be left alone
+//        and the data in the equivalent message should ignored.
+
+message Detail {
+    string xmlDetail = 1;
+
+    // <contact>
+    Contact contact = 2;
+
+    // <__group>
+    Group group = 3;
+
+    // <precisionlocation>
+    PrecisionLocation precisionLocation = 4;
+
+    // <status>
+    Status status = 5;
+
+    // <takv>
+    Takv takv = 6;
+
+    // <track>
+    Track track = 7;
+}
diff --git a/src-protobuf/group.proto b/src-protobuf/group.proto
new file mode 100644
index 0000000..a25ca50
--- /dev/null
+++ b/src-protobuf/group.proto
@@ -0,0 +1,13 @@
+syntax = "proto3";
+option optimize_for = LITE_RUNTIME;
+
+package atakmap.commoncommo.protobuf.v1;
+
+// All items are required unless otherwise noted!
+// "required" means if they are missing on send, the conversion
+// to the message format will be rejected and fall back to opaque
+// XML representation
+message Group {
+     string name = 1;           // name=
+     string role = 2;           // role=
+}
diff --git a/src-protobuf/precisionlocation.proto b/src-protobuf/precisionlocation.proto
new file mode 100644
index 0000000..4419f0a
--- /dev/null
+++ b/src-protobuf/precisionlocation.proto
@@ -0,0 +1,13 @@
+syntax = "proto3";
+option optimize_for = LITE_RUNTIME;
+
+package atakmap.commoncommo.protobuf.v1;
+
+// All items are required unless otherwise noted!
+// "required" means if they are missing on send, the conversion
+// to the message format will be rejected and fall back to opaque
+// XML representation
+message PrecisionLocation {
+     string geopointsrc = 1;        // geopointsrc=
+     string altsrc = 2;             // altsrc=
+}
diff --git a/src-protobuf/protocol.txt b/src-protobuf/protocol.txt
new file mode 100644
index 0000000..c953ba5
--- /dev/null
+++ b/src-protobuf/protocol.txt
@@ -0,0 +1,352 @@
+*** Traditional Protocol - "Protocol Version 0"
+
+Clients send and receive XML CoT <event> messages.
+"Mesh" network participants announce via "SA" messages via UDP datagrams
+over multicast to a well known address and port.  Each UDP datagram contains
+one (and only one) CoT XML message as its payload.
+
+Messages directed only to specific network participants are send by making
+TCP connection to the remote recipient, sending the CoT XML, then closing
+the connection.
+
+
+Streaming connections (to TAK servers) send the same XML-based CoT payloads
+over TCP sockets.  The TCP stream is comprised of one CoT <event> after
+another.  Messages are delimited and broken apart by searching for the token
+"</event>" and breaking apart immediately after that token.
+When sending, messages must be prefaced by XML header (<?xml ... ?>),
+followed by a newline, followed by the complete XML <event>.  TAK servers
+require that no arbitrary newlines follow the </event> end of message and
+that the next character immediate commences the next <?xml ... ?> header.
+
+
+
+*** TAK Protocol - Design Goals
+
+The goal of the new TAK Protocol design is to allow interoperation with
+other legacy clients and TAK server, as well as to strongly identify 
+what rendition of communication will be used in a session.  This is to allow
+for future expansion or complete revision of the protocol while allowing
+an opportunity to support mixed client versions (and varying versions of TAK
+servers).
+
+
+*** TAK Protocol - Ground Rules
+
+All clients obey the following basic rules regardless of the version(s)
+of TAK protocol that they support.  These rules are important base rules
+upon which the protocol version negotiations detailed in subsequent sections
+rely:
+
+1. A client sending TAK protocol version "V" is also capable of receiving
+   and decoding version "V"
+2. All clients must support decoding TAK protocol version "0" (legacy XML)
+
+
+*** TAK Protocol - Generic Framework - Mesh Networks
+
+Mesh networks broadcasts (SA announces, etc) will reuse the existing UDP
+datagram-based networking already in place.   Directed (unicasted) TCP
+messages will reuse the existing connect, send 1 message, disconnect
+networking.
+
+For both TCP and UDP, instead of sending CoT as XML, clients will send data
+packets whose payloads contain one message complying with the new "TAK
+Protocol".
+Both types of messages will utilize a data payload that begins with the "TAK
+Protocol Header" followed by the "TAK Protocol Payload".  The header
+serves to self-identify as a TAK Protocol message, as well as indicate a
+particular version number to which the subsequent Payload comforms.
+
+TAK Protocol Message: <TAK Protocol Header> <TAK Protocol Payload>
+
+
+The "TAK Protocol Header" is nothing more than a set of "magic numbers" to
+identify the message header as such, and a version identifier to indicate
+what TAK Protocol version the remainder of the payload is comprised of.
+
+TAK Protocol Header: <magic byte> <tak protocol version> <magic byte>
+Where....
+<magic byte> is the single byte 0xbf
+<tak protocol version> is the version number of the TAK Protocol the payload
+in the remainder of the message conforms to.  This is encoded as a "varint".
+See "TAK Protocol Varint Encoding".
+
+
+
+*** TAK Protocol - Generic Framework - Streaming Connections
+
+Steaming connections (TAK server connections) use a different message style
+as the repeating protocol version information in every message that is done
+in mesh TAK Protocol Messages would be a waste of resources in the streaming
+environment (since all messages will use the same Version).
+The TAK Protocol Stream Message is instead defined to provide the length of
+the streaming message (necessary to break apart the message from its
+neighbors to avoid need to scan for special tokens).
+
+In a streaming connection, "TAK Protocol Streaming Messages" are sent one
+after another (with no intervening data) over the streaming connection.
+
+TAK Protocol Stream Message: 
+<TAK Protocol Streaming Header> <TAK Protocol Payload>
+
+Important to note here is that the "TAK Protocol Payload" is precisely the
+same in form and content to that which is used for mesh network messages for
+a given protocol version.
+
+
+
+The "TAK Protocol Streaming Header" is as follows:
+
+TAK Protocol Streaming Header:
+<magic byte> <message length>
+Where...
+<magic byte> is the single byte 0xbf
+<message length> is the number of bytes in the "TAK Protocol Payload" which
+                 follows the header. This is encoded as a "varint".
+
+As mentioned prior, the version identification for the message's payload
+format is omitted from the streaming header.  Protocol version negotiation
+is expected to occur outside of core TAK Protocol message exchange.
+See "Streaming Connection Protocol Negotiation".
+
+
+
+
+*** TAK Protocol Payload - Version 1
+
+Version 1 of the TAK Protocol Payload is a Google Protocol Buffer based
+payload.  Each Payload consists of one (and only one)
+atakmap::commoncommo::v1::TakMessage message which is serialized using
+Google protocol buffers version 3.
+
+See the .proto files for more information on the specific messages and their
+fields, as well as the mapping to/from CoT XML.
+
+Revising the messages used by Version 1 may be done in accordance with the
+following rules:
+
+1. Additional message fields MAY be added to the end of existing messages
+   following normal google protobuf rules if and only if
+   ignorance of the new fields on decoding is 100% irrelevant to correct
+   semantic operation at the TAK application level of ALL TAK applications.
+2. Otherwise, any and all changes must be tied to a protocol version change.
+
+
+This version of TAK Protocol does not define any additional attributes to be
+used during Streaming Connection Protocol Negotiation.
+
+
+
+*** Streaming Connection Protocol Negotiation
+
+TAK clients often connect to a variety of TAK servers, each of which may be
+a different version of software capable of different versions of the TAK
+Protocol (or indeed not capable of the TAK Protocol and simply only
+supporting traditional streaming CoT as XML).
+
+Because of the desire to allow operation of various client and server
+versions, and the desire to keep the traditional XML encoding available, the
+following negotiation is performed when connecting to a TAK server with a
+client that supports the TAK Protocol.
+
+1. Once the connection is established, client and server should expect to
+   exchange traditional CoT XML messages per "Traditional Protocol" section.
+   Note, however, if the server requires authentication, the auth XML message
+   MUST be the first message sent to the TAK server by the client.
+   Even if awaiting auth, the server MAY send CoT XML.  Upon supplying an
+   auth message (when required), one of two things happens:
+  1a. If the server accepts the auth, proceed to 2.
+  1b. If the server denies the auth, the connection is closed.
+2. Client and server continue to expect to exchange traditional 
+   CoT XML messages per "Traditional Protocol" section.
+3. A server which supports the TAK Protocol MAY send the following CoT XML
+   message to indicate this support (whitespace added, xml header omitted):
+<event version='2.0' uid='protouid' type='t-x-takp-v' time='TIME' start='TIME' stale='TIME' how='m-g'>
+  <point lat='0.0' lon='0.0' hae='0.0' ce='999999' le='999999'/>
+  <detail>
+    <TakControl>
+      <TakProtocolSupport version="1"/>
+    </TakControl>
+  </detail>
+</event>
+
+   ... where the version attribute is an integer number specifying
+   a version of the TAK Protocol the server supports.  This message
+   may contain one or more TakProtocolSupport elements inside the single
+   <TakControl> detail, each specifying a supported version.
+   The TAK server MUST send this message no more than once per connection.
+
+   To allow for ancillary information in the negotiation, the
+   TakProtocolSupport element MAY contain additional attributes compliant
+   with the Protocol version indicated.
+4. Client and server continue to expect to exchange traditional CoT XML
+   messages per "Traditional Protocol" section.
+5. If the client wishes to initiate a transfer to TAK Protocol encoding, it
+   selects one of the supported versions advertised in the server's message
+   from step 3.  It then sends the following CoT XML:
+<event version='2.0' uid='protouid' type='t-x-takp-q' time='TIME' start='TIME' stale='TIME' how='m-g'>
+  <point lat='0.0' lon='0.0' hae='0.0' ce='999999' le='999999'/>
+  <detail>
+    <TakControl>
+      <TakRequest version="1"/>
+    </TakControl>
+  </detail>
+</event>
+
+   ... where the version attribute is the integer version chosen above.
+   Only ONE TakRequest element is allowed.
+
+   To allow for ancillary information in the negotiation, the
+   TakRequest element MAY contain additional attributes compliant
+   with the Protocol version indicated.
+
+   Clients SHALL NOT send this message unless they have observed the
+   message from step #3, above, first.
+   Server MUST examine all receive CoT events for this message from the point
+   in time when the message in #3 is sent until at least one minute following
+   that point in time.  If a "false" status is subsequently issued per step #6
+   below step, this time limit SHALL be extended to at least one minute
+   from the point in time the failure response message specified in 
+   #6 is issued to allow the client additional time to retry.
+
+6. Once the client sends the message in #5, it MUST NOT send additional
+   CoT XML to the server.  Client also MUST still process incoming CoT XML
+   from the server.  The client MUST wait in this state for a response per
+   the following for at least one minute.  
+   The server MAY still send CoT XML messages up until it notices the
+   control request from the client (from step #5) and is ready to respond.
+   The server MUST then respond as soon as possible to the client with the
+   following message to indicate either acceptance or denial of the request:
+<event version='2.0' uid='protouid' type='t-x-takp-r' time='TIME' start='TIME' stale='TIME' how='m-g'>
+  <point lat='0.0' lon='0.0' hae='0.0' ce='999999' le='999999'/>
+  <detail>
+    <TakControl>
+      <TakResponse status="true"/>
+    </TakControl>
+  </detail>
+</event>
+   
+   ... where the status attribute is either true (to indicate the server
+   accepts the requested version) or false (to indicate that the server
+   denies the request).
+   Only ONE TakResponse element is allowed.
+
+   To allow for ancillary information in the negotiation, the
+   TakResponse element MAY contain additional attributes compliant
+   with the Protocol version selected in the request that this response
+   applies to.
+
+   If no response is received by the client before its timeout elapses, 
+   the client SHALL disconnect as the entire negotiation is in an
+   indeterminate state. The client SHOULD reconnect and begin again at step
+   1, possibly with a longer timeout or alternate protocol version choice.
+
+7. Operation at this point depends on the response send in #6:
+7a. If status was true: The server MUST NOT send additiona CoT XML after the
+    "true" response in #6.  Instead, the server SHALL send all future data
+    in accordance with the TAK Protocol Streaming Connection framework
+    and containing TAK Payloads of the negotiated version.
+    The client MAY resume sending messages at this time but MUST immediately
+    send said messages in accordance with the TAK Protocol Streaming
+    Connection framework and containing TAK Payloads of the negotiated
+    version.  NOTE: the negotiated version SHALL be the same for both
+    directions of the streaming connection!
+7b. If status was false: Both client and server resume operation as though
+    they were back at step #4.  The client may attempt a new negotiation
+    if it wishes, or may simply continue to exchange traditional XML-based
+    CoT messages.
+
+In the messages in 3, 5, and 6 above, the following common rules apply:
+a. "protouid" is any valid UID representing the negotiation transaction.
+   The server generates this when offering protocol versions.  The client
+   re-uses it when placing request(s) and the server re-uses it when
+   issuing the response to a request.
+   The UID SHALL be unique from UIDs used for other messages and purposes.
+b. "TIME" is filled with a valid time representation per the CoT schemas.
+   The TIME values may be different from each other as needed.
+
+
+*** "Mesh Network" Protocol Negotiation
+
+Mesh networking in TAK products relies on repeated broadcasting of
+device presence and "SA" data that gives basic information on how to reach
+local network participants.  To allow for clients with mixed TAK protocol
+versions (as well as legacy XML only capabilities), the following protocol
+selection and support advertisement shall be performed on each device:
+
+1. All devices supporting TAK Protocol versions > 0 (legacy xml) MUST
+   broadcast to all configured and active non-TAK server broadcast destinations
+   the TakControl message in a TakMessage at least once every 60 seconds.
+   This information MAY be sent alongside CotEvent data or standalone.
+   This message indicates the minimum and maximum versions of TAK protocol
+   that the device can **decode**.
+   Note that devices not supporting TAK protocol > 0 will not be sending these
+   messages.
+   It is RECOMMENDED that devices do *not* frequently change the
+   version information in these messages as receivers may optimize around
+   the information being mostly static/fixed.
+   This information SHALL be sent using the protocol level
+   determined under the rule in 4 except when rule 4 results in 
+   protocol level 0, in which case TakControl information
+   SHALL be sent using the lowest protocol version > 0 supported by the
+   sender.
+2. Each device MUST examine and decode the TakControl message in any message
+   it receives and knows how to decode.  If for a version that the device
+   does not support, it MAY discard the message.
+3. Each device MUST maintain the minimum and maximum supported TAK protocol
+   versions known from every client known to exist on the network based on
+   the following ruleset:
+   3a. Newly detected clients are assigned a min/max supported version
+       equal to the version used to relay the message that resulted
+       in discovery of the client. Note that this could be version 0
+       (legacy XML)
+   3b. Upon receipt of a TakControl message, the min/max version info
+       is updated to match the information in the message.  Optimizing
+       for infrequent changes of this info is recommended. 
+       Note that TakControl messages do NOT allow versions of 0 in them.
+       Support for version 0 is implied (see base rules) and need not be
+       tracked except for those clients which support *only* version 0.
+   3c. Known clients that have not sent any TakControl messages in the previous
+       2 minutes shall revert to a minimum and maximum version equal
+       to the version used in the most recently received message that
+       keeps the client from becoming entirely stale. Note that this could
+       be version 0 (legacy XML).
+   3d. Received messages that are not decodable by the receiver should
+       continue to be treated as not having received TakControl messages
+       under 3c.
+4. Devices MUST send out broadcast messages using the highest protocol version
+   supported by *all* known contacts (including consideration of the
+   sending device itself) tracked based on the rules in (3) at the time
+   of sending.
+   This includes SA announcements/broadcasts.
+   If there is no version overlap suitable for all versions, then protocol
+   "version 0" must be used.
+   If this is "version 0" (legacy xml), then XML shall be used.
+5. Whenever the version computed via rule 5 changes, clients SHALL immediately
+   send out a TakControl message using the new version per rule 1.
+   This must be done even if not otherwise broadcasting a message.
+
+
+
+*** TAK Protocol Varint Encoding
+
+The varints used in the headers of the TAK Protocol are encoded in
+accordance with the UNSIGNED varint rules for Google protocol buffers. 
+This encoding is summarized here:
+
+1. The value must be UNSIGNED.  Only values equal to or greater than zero 
+   are allowed.
+2. The value to be encoded is taken 7 bits at a time, starting with the
+   least significant 7 bits (bits 7 -> 0), then the next least significant bits
+   (14 -> 8), etc.  This repeats over all 7 bit values that are significant
+   (that is, up to and including the most significant '1' bit).
+3. For each 7 bit group:
+  3a. Let S = 0 if this is the the last 7 bit group, else let S = 1
+  3b. Output a byte that is (S << 7) | (the 7 bits)
+
+The TAK Protocol use of Varints limits use to 64-bit values.  This
+effectively limits the range as [ 0, (2^63 - 1) ] and the varint coded value
+to be limited to 10 bytes.
+
+
diff --git a/src-protobuf/status.proto b/src-protobuf/status.proto
new file mode 100644
index 0000000..e8d5227
--- /dev/null
+++ b/src-protobuf/status.proto
@@ -0,0 +1,12 @@
+syntax = "proto3";
+option optimize_for = LITE_RUNTIME;
+
+package atakmap.commoncommo.protobuf.v1;
+
+// All items are required unless otherwise noted!
+// "required" means if they are missing on send, the conversion
+// to the message format will be rejected and fall back to opaque
+// XML representation
+message Status {
+     uint32 battery = 1;           // battery=
+}
diff --git a/src-protobuf/takcontrol.proto b/src-protobuf/takcontrol.proto
new file mode 100644
index 0000000..42a331a
--- /dev/null
+++ b/src-protobuf/takcontrol.proto
@@ -0,0 +1,24 @@
+syntax = "proto3";
+option optimize_for = LITE_RUNTIME;
+
+package atakmap.commoncommo.protobuf.v1;
+
+// TAK Protocol control message
+// This specifies to a recipient what versions
+// of protocol elements this sender supports during
+// decoding.
+message TakControl {
+    // Lowest TAK protocol version supported
+    // If not filled in (reads as 0), version 1 is assumed
+    uint32 minProtoVersion = 1;
+
+    // Highest TAK protocol version supported
+    // If not filled in (reads as 0), version 1 is assumed
+    uint32 maxProtoVersion = 2;
+
+    // UID of the sending contact. May be omitted if
+    // this message is paired in a TakMessage with a CotEvent
+    // and the CotEvent contains this information
+    string contactUid = 3;
+}
+
diff --git a/src-protobuf/takmessage.proto b/src-protobuf/takmessage.proto
new file mode 100644
index 0000000..8c61a49
--- /dev/null
+++ b/src-protobuf/takmessage.proto
@@ -0,0 +1,18 @@
+syntax = "proto3";
+option optimize_for = LITE_RUNTIME;
+
+import "cotevent.proto";
+import "takcontrol.proto";
+
+package atakmap.commoncommo.protobuf.v1;
+
+// Top level message sent for TAK Messaging Protocol Version 1.
+message TakMessage {
+    // Optional - if omitted, continue using last reported control
+    // information
+    TakControl takControl = 1;
+
+    // Optional - if omitted, no event data in this message
+    CotEvent cotEvent = 2;
+}
+
diff --git a/src-protobuf/takv.proto b/src-protobuf/takv.proto
new file mode 100644
index 0000000..a4848eb
--- /dev/null
+++ b/src-protobuf/takv.proto
@@ -0,0 +1,15 @@
+syntax = "proto3";
+option optimize_for = LITE_RUNTIME;
+
+package atakmap.commoncommo.protobuf.v1;
+
+// All items are required unless otherwise noted!
+// "required" means if they are missing on send, the conversion
+// to the message format will be rejected and fall back to opaque
+// XML representation
+message Takv {
+     string device = 1;             // device=
+     string platform = 2;           // platform=
+     string os = 3;                 // os=
+     string version = 4;            // version=
+}
diff --git a/src-protobuf/track.proto b/src-protobuf/track.proto
new file mode 100644
index 0000000..19a7b67
--- /dev/null
+++ b/src-protobuf/track.proto
@@ -0,0 +1,13 @@
+syntax = "proto3";
+option optimize_for = LITE_RUNTIME;
+
+package atakmap.commoncommo.protobuf.v1;
+
+// All items are required unless otherwise noted!
+// "required" means if they are missing on send, the conversion
+// to the message format will be rejected and fall back to opaque
+// XML representation
+message Track {
+     double speed = 1;           // speed=
+     double course = 2;          // course=
+}
diff --git a/takprotobuf/.gitignore b/takproto/.gitignore
old mode 100644
new mode 100755
similarity index 100%
rename from takprotobuf/.gitignore
rename to takproto/.gitignore
diff --git a/takproto/__init__.py b/takproto/__init__.py
new file mode 100644
index 0000000..efe32a6
--- /dev/null
+++ b/takproto/__init__.py
@@ -0,0 +1,45 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+#
+# Copyright 2023 Sensors & Signals LLC
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in all
+# copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+#
+
+"""TAKProto Module.
+
+:author: Greg Albrecht <gba@snstac.com>
+:copyright: Copyright 2023 Sensors & Signals LLC
+:license: MIT License
+:source: <https://github.com/snstac/takproto>
+"""
+
+from .functions import (  # NOQA
+    xml2proto,
+    parse_proto,
+    parse_mesh,
+    parse_stream,
+    format_time,
+)
+from .constants import TAKProtoVer  # NOQA
+
+__author__ = "Greg Albrecht <gba@snstac.com>"
+__copyright__ = "Copyright 2023 Sensors & Signals LLC"
+__license__ = "MIT License"
+__source__ = "https://github.com/snstac/takproto"
diff --git a/takproto/constants.py b/takproto/constants.py
new file mode 100644
index 0000000..ac88df5
--- /dev/null
+++ b/takproto/constants.py
@@ -0,0 +1,44 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+#
+# Copyright 2023 Sensors & Signals LLC
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in all
+# copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+#
+
+"""TAKProto Constants."""
+
+from enum import Enum
+
+__author__ = "Greg Albrecht <gba@snstac.com>"
+__copyright__ = "Copyright 2023 Sensors & Signals LLC"
+__license__ = "Apache License, Version 2.0"
+
+
+DEFAULT_PROTO_HEADER = bytearray(b"\xbf")
+DEFAULT_MESH_HEADER = bytearray(b"\xbf\x01\xbf")
+ISO_8601_UTC = "%Y-%m-%dT%H:%M:%S.%fZ"
+
+
+class TAKProtoVer(Enum):
+    """Enumerator for TAK Protocol Versions."""
+
+    XML = 0
+    MESH = 1
+    STREAM = 2
diff --git a/takproto/functions.py b/takproto/functions.py
new file mode 100644
index 0000000..b1391ce
--- /dev/null
+++ b/takproto/functions.py
@@ -0,0 +1,220 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+#
+# Copyright 2023 Sensors & Signals LLC
+# Copyright 2020 Delta Bravo-15 <deltabravo15ga@gmail.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in all
+# copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+#
+"""TAKProto Functions for manipulating TAK Protocol Version 1 messages."""
+
+import re
+import xml.etree.ElementTree as ET
+
+from datetime import datetime
+from io import BytesIO
+from typing import Optional
+
+import delimited_protobuf as dpb
+
+from takproto.constants import (
+    ISO_8601_UTC,
+    DEFAULT_MESH_HEADER,
+    DEFAULT_PROTO_HEADER,
+    TAKProtoVer,
+)
+from takproto.proto import TakMessage
+
+
+def parse_proto(msg: bytearray) -> Optional[bytearray]:
+    """Parse TAK Protocol Version 1 Mesh & Stream message."""
+    parsed = None
+
+    if msg[:3] == DEFAULT_MESH_HEADER:
+        parsed = parse_mesh(msg)
+    elif msg[0] in DEFAULT_PROTO_HEADER:
+        parsed = parse_stream(msg)
+    return parsed
+
+
+def parse_mesh(msg):
+    """Parse TAK Protocol Version 1 Mesh message."""
+    msg = msg[3:]
+    protobuf = TakMessage()
+    protobuf.ParseFromString(bytes(msg))
+    return protobuf
+
+
+def parse_stream(msg):
+    """Parse TAK Protocol Version 1 Stream message."""
+    bio = BytesIO(msg[1:])
+    msg = dpb.read(bio, TakMessage)
+    return msg
+
+
+def format_time(time: str) -> int:
+    """Format timestamp as microseconds."""
+    s_time = datetime.strptime(time + "+0000", ISO_8601_UTC + "%z")
+    return int(s_time.timestamp() * 1000)
+
+
+def xml2proto(
+    xml: str, protover: Optional[TAKProtoVer] = None
+):  # NOQA pylint: disable=too-many-locals,too-many-branches,too-many-statements
+    """Convert plain XML CoT to Protobuf."""
+    event = ET.fromstring(xml)
+    tak_message = TakMessage()
+    tak_control = tak_message.takControl
+    new_event = tak_message.cotEvent
+
+    # If this is a GeoChat message, extract the sender's UID from the event UID and
+    # place it in takControl.contactUid
+    uid = event.get("uid")
+    if uid and "GeoChat." in uid:
+        tak_control.contactUid = uid.split(".")[1]
+
+    base_attribs = ["type", "access", "qos", "opex", "uid", "how"]
+    for attrib in base_attribs:
+        val = event.get(attrib)
+        if val:
+            setattr(new_event, attrib, val)
+
+    # TAK protobuf times are expressed as miliseconds since 1970-01-01 00:00:00 UTC
+    # Convert time, start, and stale, from ISO time format to miliseconds since epoch
+    time_attribs = ["time", "start", "stale"]
+    for attrib in time_attribs:
+        val = event.get(attrib)
+        if val:
+            if attrib == "time":
+                attrib = "send"
+            setattr(new_event, f"{attrib}Time", format_time(val))
+
+    # If the event element includes a point child, write the attributes
+    point = event.find("point")
+    if point is not None:
+        attribs = ["lat", "lon", "hae", "ce", "le"]
+        for attrib in attribs:
+            val = point.get(attrib)
+            if val:
+                setattr(new_event, attrib, float(val))
+
+    detail = event.find("detail")
+    if detail is not None:
+        # If the XML includes a <detail> element, create new_event.detail
+        new_detail = new_event.detail
+
+        # The new_event.detail field of a TAK protobuf is structured differently
+        # from CoT XML. new_event.detail may only contain xmlDetail, contact,
+        # __group, precisionlocation, status, takv, and track. xmlDetail should
+        # contain an XML string with any data that does not adhere to the other
+        # strongly-typed fields. See more information about each field below.
+
+        # If this is a GeoChat message, write the contents of <detail> in xmlDetail.
+        if uid and "GeoChat." in uid:
+            pattern = "<detail>(.*?)</detail>"
+            xmldetailstr = re.search(pattern, xml).group(1)
+            new_detail.xmlDetail = xmldetailstr
+        else:
+            # Add unknown elements to xmlDetail field.
+            known_elem = [
+                "contact",
+                "__group",
+                "precisionlocation",
+                "status",
+                "takv",
+                "track",
+            ]
+            for elem in detail.iterfind("*"):
+                if elem.tag not in known_elem:
+                    new_detail.xmlDetail = ET.tostring(elem).strip()
+
+        contact = detail.find("contact")
+        if contact is not None:
+            attribs = ["endpoint", "callsign"]
+            for attrib in attribs:
+                attrib_val = contact.get(attrib)
+                if attrib_val:
+                    setattr(new_detail.contact, attrib, attrib_val)
+
+        group = detail.find("__group")  # pylint: disable=protected-access
+        if group is not None:
+            attribs = ["name", "role"]
+            for attrib in attribs:
+                attrib_val = group.get(attrib)
+                if attrib_val:
+                    setattr(new_detail.group, attrib, attrib_val)
+
+        prec_loc = detail.find("precisionlocation")
+        if prec_loc is not None:
+            attribs = ["geopointsrc", "altsrc"]
+            for attrib in attribs:
+                attrib_val = prec_loc.get(attrib)
+                if attrib_val:
+                    setattr(new_detail.precisionLocation, attrib, attrib_val)
+
+        status = detail.find("status")
+        if status is not None:
+            battery = status.get("battery")
+            if battery:
+                new_detail.status.battery = int(battery)
+
+        takv = detail.find("takv")
+        if takv is not None:
+            attribs = ["device", "platform", "os", "version"]
+            for attrib in attribs:
+                attrib_val = takv.get(attrib)
+                if attrib_val:
+                    setattr(new_detail.takv, attrib, attrib_val)
+
+        # The fields in track are double-precision floating-point numbers.
+        # We can use Python's native float, since that is actually 64-bit
+        # floating-point.
+        track = detail.find("track")
+        if track is not None:
+            attribs = ["speed", "course"]
+            for attrib in attribs:
+                attrib_val = track.get(attrib)
+                if attrib_val:
+                    setattr(new_detail.track, attrib, float(attrib_val))
+
+    output = msg2proto(tak_message, protover)
+    return output
+
+
+def msg2proto(msg, protover: Optional[TAKProtoVer] = None) -> bytearray:
+    """Convert a TakMessage into a TAK Protocol Version 1 protobuf."""
+    protover = protover or TAKProtoVer.MESH
+
+    output_ba = bytearray()
+    header_ba = bytearray()
+    proto_ba = bytearray()
+
+    if protover == TAKProtoVer.MESH:
+        header_ba = DEFAULT_MESH_HEADER
+        proto_ba = bytearray(msg.SerializeToString())
+    elif protover == TAKProtoVer.STREAM:
+        header_ba = DEFAULT_PROTO_HEADER
+        output_io = BytesIO()
+        dpb.write(output_io, msg)
+        proto_ba = bytearray(output_io.getvalue())
+    else:
+        raise ValueError(f"Unsupported TAKProtoVer: {protover}")
+
+    output_ba = header_ba + proto_ba
+    return output_ba
diff --git a/takprotobuf/proto/.gitignore b/takproto/proto/.gitignore
old mode 100644
new mode 100755
similarity index 100%
rename from takprotobuf/proto/.gitignore
rename to takproto/proto/.gitignore
diff --git a/takprotobuf/proto/__init__.py b/takproto/proto/__init__.py
similarity index 97%
rename from takprotobuf/proto/__init__.py
rename to takproto/proto/__init__.py
index 7272148..897e6bd 100644
--- a/takprotobuf/proto/__init__.py
+++ b/takproto/proto/__init__.py
@@ -1,2 +1,1 @@
-
 from .takmessage_pb2 import TakMessage
diff --git a/takproto/proto/contact_pb2.py b/takproto/proto/contact_pb2.py
new file mode 100644
index 0000000..be537a0
--- /dev/null
+++ b/takproto/proto/contact_pb2.py
@@ -0,0 +1,27 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler.  DO NOT EDIT!
+# source: contact.proto
+"""Generated protocol buffer code."""
+from google.protobuf.internal import builder as _builder
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import descriptor_pool as _descriptor_pool
+from google.protobuf import symbol_database as _symbol_database
+
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
+    b'\n\rcontact.proto\x12\x1f\x61takmap.commoncommo.protobuf.v1"-\n\x07\x43ontact\x12\x10\n\x08\x65ndpoint\x18\x01 \x01(\t\x12\x10\n\x08\x63\x61llsign\x18\x02 \x01(\tB\x02H\x03\x62\x06proto3'
+)
+
+_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
+_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "contact_pb2", globals())
+if _descriptor._USE_C_DESCRIPTORS == False:
+
+    DESCRIPTOR._options = None
+    DESCRIPTOR._serialized_options = b"H\003"
+    _CONTACT._serialized_start = 50
+    _CONTACT._serialized_end = 95
+# @@protoc_insertion_point(module_scope)
diff --git a/takproto/proto/cotevent_pb2.py b/takproto/proto/cotevent_pb2.py
new file mode 100644
index 0000000..bf1f097
--- /dev/null
+++ b/takproto/proto/cotevent_pb2.py
@@ -0,0 +1,30 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler.  DO NOT EDIT!
+# source: cotevent.proto
+"""Generated protocol buffer code."""
+from google.protobuf.internal import builder as _builder
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import descriptor_pool as _descriptor_pool
+from google.protobuf import symbol_database as _symbol_database
+
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+from . import detail_pb2 as detail__pb2
+
+
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
+    b"\n\x0e\x63otevent.proto\x12\x1f\x61takmap.commoncommo.protobuf.v1\x1a\x0c\x64\x65tail.proto\"\x8d\x02\n\x08\x43otEvent\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x0e\n\x06\x61\x63\x63\x65ss\x18\x02 \x01(\t\x12\x0b\n\x03qos\x18\x03 \x01(\t\x12\x0c\n\x04opex\x18\x04 \x01(\t\x12\x0b\n\x03uid\x18\x05 \x01(\t\x12\x10\n\x08sendTime\x18\x06 \x01(\x04\x12\x11\n\tstartTime\x18\x07 \x01(\x04\x12\x11\n\tstaleTime\x18\x08 \x01(\x04\x12\x0b\n\x03how\x18\t \x01(\t\x12\x0b\n\x03lat\x18\n \x01(\x01\x12\x0b\n\x03lon\x18\x0b \x01(\x01\x12\x0b\n\x03hae\x18\x0c \x01(\x01\x12\n\n\x02\x63\x65\x18\r \x01(\x01\x12\n\n\x02le\x18\x0e \x01(\x01\x12\x37\n\x06\x64\x65tail\x18\x0f \x01(\x0b\x32'.atakmap.commoncommo.protobuf.v1.DetailB\x02H\x03\x62\x06proto3"
+)
+
+_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
+_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "cotevent_pb2", globals())
+if _descriptor._USE_C_DESCRIPTORS == False:
+
+    DESCRIPTOR._options = None
+    DESCRIPTOR._serialized_options = b"H\003"
+    _COTEVENT._serialized_start = 66
+    _COTEVENT._serialized_end = 335
+# @@protoc_insertion_point(module_scope)
diff --git a/takproto/proto/detail_pb2.py b/takproto/proto/detail_pb2.py
new file mode 100644
index 0000000..c967bd5
--- /dev/null
+++ b/takproto/proto/detail_pb2.py
@@ -0,0 +1,35 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler.  DO NOT EDIT!
+# source: detail.proto
+"""Generated protocol buffer code."""
+from google.protobuf.internal import builder as _builder
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import descriptor_pool as _descriptor_pool
+from google.protobuf import symbol_database as _symbol_database
+
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+from . import contact_pb2 as contact__pb2
+from . import group_pb2 as group__pb2
+from . import precisionlocation_pb2 as precisionlocation__pb2
+from . import status_pb2 as status__pb2
+from . import takv_pb2 as takv__pb2
+from . import track_pb2 as track__pb2
+
+
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
+    b"\n\x0c\x64\x65tail.proto\x12\x1f\x61takmap.commoncommo.protobuf.v1\x1a\rcontact.proto\x1a\x0bgroup.proto\x1a\x17precisionlocation.proto\x1a\x0cstatus.proto\x1a\ntakv.proto\x1a\x0btrack.proto\"\x81\x03\n\x06\x44\x65tail\x12\x11\n\txmlDetail\x18\x01 \x01(\t\x12\x39\n\x07\x63ontact\x18\x02 \x01(\x0b\x32(.atakmap.commoncommo.protobuf.v1.Contact\x12\x35\n\x05group\x18\x03 \x01(\x0b\x32&.atakmap.commoncommo.protobuf.v1.Group\x12M\n\x11precisionLocation\x18\x04 \x01(\x0b\x32\x32.atakmap.commoncommo.protobuf.v1.PrecisionLocation\x12\x37\n\x06status\x18\x05 \x01(\x0b\x32'.atakmap.commoncommo.protobuf.v1.Status\x12\x33\n\x04takv\x18\x06 \x01(\x0b\x32%.atakmap.commoncommo.protobuf.v1.Takv\x12\x35\n\x05track\x18\x07 \x01(\x0b\x32&.atakmap.commoncommo.protobuf.v1.TrackB\x02H\x03\x62\x06proto3"
+)
+
+_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
+_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "detail_pb2", globals())
+if _descriptor._USE_C_DESCRIPTORS == False:
+
+    DESCRIPTOR._options = None
+    DESCRIPTOR._serialized_options = b"H\003"
+    _DETAIL._serialized_start = 142
+    _DETAIL._serialized_end = 527
+# @@protoc_insertion_point(module_scope)
diff --git a/takproto/proto/group_pb2.py b/takproto/proto/group_pb2.py
new file mode 100644
index 0000000..a9be445
--- /dev/null
+++ b/takproto/proto/group_pb2.py
@@ -0,0 +1,27 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler.  DO NOT EDIT!
+# source: group.proto
+"""Generated protocol buffer code."""
+from google.protobuf.internal import builder as _builder
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import descriptor_pool as _descriptor_pool
+from google.protobuf import symbol_database as _symbol_database
+
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
+    b'\n\x0bgroup.proto\x12\x1f\x61takmap.commoncommo.protobuf.v1"#\n\x05Group\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04role\x18\x02 \x01(\tB\x02H\x03\x62\x06proto3'
+)
+
+_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
+_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "group_pb2", globals())
+if _descriptor._USE_C_DESCRIPTORS == False:
+
+    DESCRIPTOR._options = None
+    DESCRIPTOR._serialized_options = b"H\003"
+    _GROUP._serialized_start = 48
+    _GROUP._serialized_end = 83
+# @@protoc_insertion_point(module_scope)
diff --git a/takproto/proto/precisionlocation_pb2.py b/takproto/proto/precisionlocation_pb2.py
new file mode 100644
index 0000000..10050ba
--- /dev/null
+++ b/takproto/proto/precisionlocation_pb2.py
@@ -0,0 +1,27 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler.  DO NOT EDIT!
+# source: precisionlocation.proto
+"""Generated protocol buffer code."""
+from google.protobuf.internal import builder as _builder
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import descriptor_pool as _descriptor_pool
+from google.protobuf import symbol_database as _symbol_database
+
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
+    b'\n\x17precisionlocation.proto\x12\x1f\x61takmap.commoncommo.protobuf.v1"8\n\x11PrecisionLocation\x12\x13\n\x0bgeopointsrc\x18\x01 \x01(\t\x12\x0e\n\x06\x61ltsrc\x18\x02 \x01(\tB\x02H\x03\x62\x06proto3'
+)
+
+_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
+_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "precisionlocation_pb2", globals())
+if _descriptor._USE_C_DESCRIPTORS == False:
+
+    DESCRIPTOR._options = None
+    DESCRIPTOR._serialized_options = b"H\003"
+    _PRECISIONLOCATION._serialized_start = 60
+    _PRECISIONLOCATION._serialized_end = 116
+# @@protoc_insertion_point(module_scope)
diff --git a/takproto/proto/status_pb2.py b/takproto/proto/status_pb2.py
new file mode 100644
index 0000000..c01fb99
--- /dev/null
+++ b/takproto/proto/status_pb2.py
@@ -0,0 +1,27 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler.  DO NOT EDIT!
+# source: status.proto
+"""Generated protocol buffer code."""
+from google.protobuf.internal import builder as _builder
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import descriptor_pool as _descriptor_pool
+from google.protobuf import symbol_database as _symbol_database
+
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
+    b'\n\x0cstatus.proto\x12\x1f\x61takmap.commoncommo.protobuf.v1"\x19\n\x06Status\x12\x0f\n\x07\x62\x61ttery\x18\x01 \x01(\rB\x02H\x03\x62\x06proto3'
+)
+
+_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
+_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "status_pb2", globals())
+if _descriptor._USE_C_DESCRIPTORS == False:
+
+    DESCRIPTOR._options = None
+    DESCRIPTOR._serialized_options = b"H\003"
+    _STATUS._serialized_start = 49
+    _STATUS._serialized_end = 74
+# @@protoc_insertion_point(module_scope)
diff --git a/takproto/proto/takcontrol_pb2.py b/takproto/proto/takcontrol_pb2.py
new file mode 100644
index 0000000..0543c41
--- /dev/null
+++ b/takproto/proto/takcontrol_pb2.py
@@ -0,0 +1,27 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler.  DO NOT EDIT!
+# source: takcontrol.proto
+"""Generated protocol buffer code."""
+from google.protobuf.internal import builder as _builder
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import descriptor_pool as _descriptor_pool
+from google.protobuf import symbol_database as _symbol_database
+
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
+    b'\n\x10takcontrol.proto\x12\x1f\x61takmap.commoncommo.protobuf.v1"R\n\nTakControl\x12\x17\n\x0fminProtoVersion\x18\x01 \x01(\r\x12\x17\n\x0fmaxProtoVersion\x18\x02 \x01(\r\x12\x12\n\ncontactUid\x18\x03 \x01(\tB\x02H\x03\x62\x06proto3'
+)
+
+_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
+_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "takcontrol_pb2", globals())
+if _descriptor._USE_C_DESCRIPTORS == False:
+
+    DESCRIPTOR._options = None
+    DESCRIPTOR._serialized_options = b"H\003"
+    _TAKCONTROL._serialized_start = 53
+    _TAKCONTROL._serialized_end = 135
+# @@protoc_insertion_point(module_scope)
diff --git a/takproto/proto/takmessage_pb2.py b/takproto/proto/takmessage_pb2.py
new file mode 100644
index 0000000..b9a7fca
--- /dev/null
+++ b/takproto/proto/takmessage_pb2.py
@@ -0,0 +1,31 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler.  DO NOT EDIT!
+# source: takmessage.proto
+"""Generated protocol buffer code."""
+from google.protobuf.internal import builder as _builder
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import descriptor_pool as _descriptor_pool
+from google.protobuf import symbol_database as _symbol_database
+
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+from . import cotevent_pb2 as cotevent__pb2
+from . import takcontrol_pb2 as takcontrol__pb2
+
+
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
+    b'\n\x10takmessage.proto\x12\x1f\x61takmap.commoncommo.protobuf.v1\x1a\x0e\x63otevent.proto\x1a\x10takcontrol.proto"\x8a\x01\n\nTakMessage\x12?\n\ntakControl\x18\x01 \x01(\x0b\x32+.atakmap.commoncommo.protobuf.v1.TakControl\x12;\n\x08\x63otEvent\x18\x02 \x01(\x0b\x32).atakmap.commoncommo.protobuf.v1.CotEventB\x02H\x03\x62\x06proto3'
+)
+
+_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
+_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "takmessage_pb2", globals())
+if _descriptor._USE_C_DESCRIPTORS == False:
+
+    DESCRIPTOR._options = None
+    DESCRIPTOR._serialized_options = b"H\003"
+    _TAKMESSAGE._serialized_start = 88
+    _TAKMESSAGE._serialized_end = 226
+# @@protoc_insertion_point(module_scope)
diff --git a/takproto/proto/takv_pb2.py b/takproto/proto/takv_pb2.py
new file mode 100644
index 0000000..4cd4e91
--- /dev/null
+++ b/takproto/proto/takv_pb2.py
@@ -0,0 +1,27 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler.  DO NOT EDIT!
+# source: takv.proto
+"""Generated protocol buffer code."""
+from google.protobuf.internal import builder as _builder
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import descriptor_pool as _descriptor_pool
+from google.protobuf import symbol_database as _symbol_database
+
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
+    b'\n\ntakv.proto\x12\x1f\x61takmap.commoncommo.protobuf.v1"E\n\x04Takv\x12\x0e\n\x06\x64\x65vice\x18\x01 \x01(\t\x12\x10\n\x08platform\x18\x02 \x01(\t\x12\n\n\x02os\x18\x03 \x01(\t\x12\x0f\n\x07version\x18\x04 \x01(\tB\x02H\x03\x62\x06proto3'
+)
+
+_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
+_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "takv_pb2", globals())
+if _descriptor._USE_C_DESCRIPTORS == False:
+
+    DESCRIPTOR._options = None
+    DESCRIPTOR._serialized_options = b"H\003"
+    _TAKV._serialized_start = 47
+    _TAKV._serialized_end = 116
+# @@protoc_insertion_point(module_scope)
diff --git a/takproto/proto/track_pb2.py b/takproto/proto/track_pb2.py
new file mode 100644
index 0000000..1e7c1ad
--- /dev/null
+++ b/takproto/proto/track_pb2.py
@@ -0,0 +1,27 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler.  DO NOT EDIT!
+# source: track.proto
+"""Generated protocol buffer code."""
+from google.protobuf.internal import builder as _builder
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import descriptor_pool as _descriptor_pool
+from google.protobuf import symbol_database as _symbol_database
+
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
+    b'\n\x0btrack.proto\x12\x1f\x61takmap.commoncommo.protobuf.v1"&\n\x05Track\x12\r\n\x05speed\x18\x01 \x01(\x01\x12\x0e\n\x06\x63ourse\x18\x02 \x01(\x01\x42\x02H\x03\x62\x06proto3'
+)
+
+_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
+_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "track_pb2", globals())
+if _descriptor._USE_C_DESCRIPTORS == False:
+
+    DESCRIPTOR._options = None
+    DESCRIPTOR._serialized_options = b"H\003"
+    _TRACK._serialized_start = 48
+    _TRACK._serialized_end = 86
+# @@protoc_insertion_point(module_scope)
diff --git a/takprotobuf/__init__.py b/takprotobuf/__init__.py
deleted file mode 100644
index 13239b4..0000000
--- a/takprotobuf/__init__.py
+++ /dev/null
@@ -1,3 +0,0 @@
-from .xmlToProto import xmlToProto
-from .parseProto import parseProto
-#from .protoBuilder import protoBuilder
\ No newline at end of file
diff --git a/takprotobuf/parseProto.py b/takprotobuf/parseProto.py
deleted file mode 100644
index 780b1e1..0000000
--- a/takprotobuf/parseProto.py
+++ /dev/null
@@ -1,12 +0,0 @@
-from .proto import TakMessage
-
-def parseProto(binary, raw=None):
-	header = binary[:3]
-	if header != bytearray(b'\xbf\x01\xbf'):
-		return -1
-	
-	else:
-		binary = binary[3:]
-		protobuf = TakMessage()
-		protobuf.ParseFromString(binary)
-		return protobuf
\ No newline at end of file
diff --git a/takprotobuf/proto/contact_pb2.py b/takprotobuf/proto/contact_pb2.py
deleted file mode 100644
index ea82d3e..0000000
--- a/takprotobuf/proto/contact_pb2.py
+++ /dev/null
@@ -1,77 +0,0 @@
-# Generated by the protocol buffer compiler.  DO NOT EDIT!
-# source: contact.proto
-
-import sys
-_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
-from google.protobuf import descriptor as _descriptor
-from google.protobuf import message as _message
-from google.protobuf import reflection as _reflection
-from google.protobuf import symbol_database as _symbol_database
-# @@protoc_insertion_point(imports)
-
-_sym_db = _symbol_database.Default()
-
-
-
-
-DESCRIPTOR = _descriptor.FileDescriptor(
-  name='contact.proto',
-  package='',
-  syntax='proto3',
-  serialized_options=_b('H\003'),
-  serialized_pb=_b('\n\rcontact.proto\"-\n\x07\x43ontact\x12\x10\n\x08\x65ndpoint\x18\x01 \x01(\t\x12\x10\n\x08\x63\x61llsign\x18\x02 \x01(\tB\x02H\x03\x62\x06proto3')
-)
-
-
-
-
-_CONTACT = _descriptor.Descriptor(
-  name='Contact',
-  full_name='Contact',
-  filename=None,
-  file=DESCRIPTOR,
-  containing_type=None,
-  fields=[
-    _descriptor.FieldDescriptor(
-      name='endpoint', full_name='Contact.endpoint', index=0,
-      number=1, type=9, cpp_type=9, label=1,
-      has_default_value=False, default_value=_b("").decode('utf-8'),
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR),
-    _descriptor.FieldDescriptor(
-      name='callsign', full_name='Contact.callsign', index=1,
-      number=2, type=9, cpp_type=9, label=1,
-      has_default_value=False, default_value=_b("").decode('utf-8'),
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR),
-  ],
-  extensions=[
-  ],
-  nested_types=[],
-  enum_types=[
-  ],
-  serialized_options=None,
-  is_extendable=False,
-  syntax='proto3',
-  extension_ranges=[],
-  oneofs=[
-  ],
-  serialized_start=17,
-  serialized_end=62,
-)
-
-DESCRIPTOR.message_types_by_name['Contact'] = _CONTACT
-_sym_db.RegisterFileDescriptor(DESCRIPTOR)
-
-Contact = _reflection.GeneratedProtocolMessageType('Contact', (_message.Message,), dict(
-  DESCRIPTOR = _CONTACT,
-  __module__ = 'contact_pb2'
-  # @@protoc_insertion_point(class_scope:Contact)
-  ))
-_sym_db.RegisterMessage(Contact)
-
-
-DESCRIPTOR._options = None
-# @@protoc_insertion_point(module_scope)
diff --git a/takprotobuf/proto/cotevent_pb2.py b/takprotobuf/proto/cotevent_pb2.py
deleted file mode 100644
index 260d1c9..0000000
--- a/takprotobuf/proto/cotevent_pb2.py
+++ /dev/null
@@ -1,171 +0,0 @@
-# Generated by the protocol buffer compiler.  DO NOT EDIT!
-# source: cotevent.proto
-
-import sys
-_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
-from google.protobuf import descriptor as _descriptor
-from google.protobuf import message as _message
-from google.protobuf import reflection as _reflection
-from google.protobuf import symbol_database as _symbol_database
-# @@protoc_insertion_point(imports)
-
-_sym_db = _symbol_database.Default()
-
-
-from . import detail_pb2 as detail__pb2
-
-
-DESCRIPTOR = _descriptor.FileDescriptor(
-  name='cotevent.proto',
-  package='',
-  syntax='proto3',
-  serialized_options=_b('H\003'),
-  serialized_pb=_b('\n\x0e\x63otevent.proto\x1a\x0c\x64\x65tail.proto\"\xed\x01\n\x08\x43otEvent\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x0e\n\x06\x61\x63\x63\x65ss\x18\x02 \x01(\t\x12\x0b\n\x03qos\x18\x03 \x01(\t\x12\x0c\n\x04opex\x18\x04 \x01(\t\x12\x0b\n\x03uid\x18\x05 \x01(\t\x12\x10\n\x08sendTime\x18\x06 \x01(\x04\x12\x11\n\tstartTime\x18\x07 \x01(\x04\x12\x11\n\tstaleTime\x18\x08 \x01(\x04\x12\x0b\n\x03how\x18\t \x01(\t\x12\x0b\n\x03lat\x18\n \x01(\x01\x12\x0b\n\x03lon\x18\x0b \x01(\x01\x12\x0b\n\x03hae\x18\x0c \x01(\x01\x12\n\n\x02\x63\x65\x18\r \x01(\x01\x12\n\n\x02le\x18\x0e \x01(\x01\x12\x17\n\x06\x64\x65tail\x18\x0f \x01(\x0b\x32\x07.DetailB\x02H\x03\x62\x06proto3')
-  ,
-  dependencies=[detail__pb2.DESCRIPTOR,])
-
-
-
-
-_COTEVENT = _descriptor.Descriptor(
-  name='CotEvent',
-  full_name='CotEvent',
-  filename=None,
-  file=DESCRIPTOR,
-  containing_type=None,
-  fields=[
-    _descriptor.FieldDescriptor(
-      name='type', full_name='CotEvent.type', index=0,
-      number=1, type=9, cpp_type=9, label=1,
-      has_default_value=False, default_value=_b("").decode('utf-8'),
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR),
-    _descriptor.FieldDescriptor(
-      name='access', full_name='CotEvent.access', index=1,
-      number=2, type=9, cpp_type=9, label=1,
-      has_default_value=False, default_value=_b("").decode('utf-8'),
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR),
-    _descriptor.FieldDescriptor(
-      name='qos', full_name='CotEvent.qos', index=2,
-      number=3, type=9, cpp_type=9, label=1,
-      has_default_value=False, default_value=_b("").decode('utf-8'),
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR),
-    _descriptor.FieldDescriptor(
-      name='opex', full_name='CotEvent.opex', index=3,
-      number=4, type=9, cpp_type=9, label=1,
-      has_default_value=False, default_value=_b("").decode('utf-8'),
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR),
-    _descriptor.FieldDescriptor(
-      name='uid', full_name='CotEvent.uid', index=4,
-      number=5, type=9, cpp_type=9, label=1,
-      has_default_value=False, default_value=_b("").decode('utf-8'),
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR),
-    _descriptor.FieldDescriptor(
-      name='sendTime', full_name='CotEvent.sendTime', index=5,
-      number=6, type=4, cpp_type=4, label=1,
-      has_default_value=False, default_value=0,
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR),
-    _descriptor.FieldDescriptor(
-      name='startTime', full_name='CotEvent.startTime', index=6,
-      number=7, type=4, cpp_type=4, label=1,
-      has_default_value=False, default_value=0,
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR),
-    _descriptor.FieldDescriptor(
-      name='staleTime', full_name='CotEvent.staleTime', index=7,
-      number=8, type=4, cpp_type=4, label=1,
-      has_default_value=False, default_value=0,
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR),
-    _descriptor.FieldDescriptor(
-      name='how', full_name='CotEvent.how', index=8,
-      number=9, type=9, cpp_type=9, label=1,
-      has_default_value=False, default_value=_b("").decode('utf-8'),
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR),
-    _descriptor.FieldDescriptor(
-      name='lat', full_name='CotEvent.lat', index=9,
-      number=10, type=1, cpp_type=5, label=1,
-      has_default_value=False, default_value=float(0),
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR),
-    _descriptor.FieldDescriptor(
-      name='lon', full_name='CotEvent.lon', index=10,
-      number=11, type=1, cpp_type=5, label=1,
-      has_default_value=False, default_value=float(0),
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR),
-    _descriptor.FieldDescriptor(
-      name='hae', full_name='CotEvent.hae', index=11,
-      number=12, type=1, cpp_type=5, label=1,
-      has_default_value=False, default_value=float(0),
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR),
-    _descriptor.FieldDescriptor(
-      name='ce', full_name='CotEvent.ce', index=12,
-      number=13, type=1, cpp_type=5, label=1,
-      has_default_value=False, default_value=float(0),
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR),
-    _descriptor.FieldDescriptor(
-      name='le', full_name='CotEvent.le', index=13,
-      number=14, type=1, cpp_type=5, label=1,
-      has_default_value=False, default_value=float(0),
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR),
-    _descriptor.FieldDescriptor(
-      name='detail', full_name='CotEvent.detail', index=14,
-      number=15, type=11, cpp_type=10, label=1,
-      has_default_value=False, default_value=None,
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR),
-  ],
-  extensions=[
-  ],
-  nested_types=[],
-  enum_types=[
-  ],
-  serialized_options=None,
-  is_extendable=False,
-  syntax='proto3',
-  extension_ranges=[],
-  oneofs=[
-  ],
-  serialized_start=33,
-  serialized_end=270,
-)
-
-_COTEVENT.fields_by_name['detail'].message_type = detail__pb2._DETAIL
-DESCRIPTOR.message_types_by_name['CotEvent'] = _COTEVENT
-_sym_db.RegisterFileDescriptor(DESCRIPTOR)
-
-CotEvent = _reflection.GeneratedProtocolMessageType('CotEvent', (_message.Message,), dict(
-  DESCRIPTOR = _COTEVENT,
-  __module__ = 'cotevent_pb2'
-  # @@protoc_insertion_point(class_scope:CotEvent)
-  ))
-_sym_db.RegisterMessage(CotEvent)
-
-
-DESCRIPTOR._options = None
-# @@protoc_insertion_point(module_scope)
diff --git a/takprotobuf/proto/detail_pb2.py b/takprotobuf/proto/detail_pb2.py
deleted file mode 100644
index 9cb3ce1..0000000
--- a/takprotobuf/proto/detail_pb2.py
+++ /dev/null
@@ -1,125 +0,0 @@
-# Generated by the protocol buffer compiler.  DO NOT EDIT!
-# source: detail.proto
-
-import sys
-_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
-from google.protobuf import descriptor as _descriptor
-from google.protobuf import message as _message
-from google.protobuf import reflection as _reflection
-from google.protobuf import symbol_database as _symbol_database
-# @@protoc_insertion_point(imports)
-
-_sym_db = _symbol_database.Default()
-
-
-from . import contact_pb2 as contact__pb2
-from . import group_pb2 as group__pb2
-from . import precisionlocation_pb2 as precisionlocation__pb2
-from . import status_pb2 as status__pb2
-from . import takv_pb2 as takv__pb2
-from . import track_pb2 as track__pb2
-
-
-DESCRIPTOR = _descriptor.FileDescriptor(
-  name='detail.proto',
-  package='',
-  syntax='proto3',
-  serialized_options=_b('H\003'),
-  serialized_pb=_b('\n\x0c\x64\x65tail.proto\x1a\rcontact.proto\x1a\x0bgroup.proto\x1a\x17precisionlocation.proto\x1a\x0cstatus.proto\x1a\ntakv.proto\x1a\x0btrack.proto\"\xc1\x01\n\x06\x44\x65tail\x12\x11\n\txmlDetail\x18\x01 \x01(\t\x12\x19\n\x07\x63ontact\x18\x02 \x01(\x0b\x32\x08.Contact\x12\x15\n\x05group\x18\x03 \x01(\x0b\x32\x06.Group\x12-\n\x11precisionLocation\x18\x04 \x01(\x0b\x32\x12.PrecisionLocation\x12\x17\n\x06status\x18\x05 \x01(\x0b\x32\x07.Status\x12\x13\n\x04takv\x18\x06 \x01(\x0b\x32\x05.Takv\x12\x15\n\x05track\x18\x07 \x01(\x0b\x32\x06.TrackB\x02H\x03\x62\x06proto3')
-  ,
-  dependencies=[contact__pb2.DESCRIPTOR,group__pb2.DESCRIPTOR,precisionlocation__pb2.DESCRIPTOR,status__pb2.DESCRIPTOR,takv__pb2.DESCRIPTOR,track__pb2.DESCRIPTOR,])
-
-
-
-
-_DETAIL = _descriptor.Descriptor(
-  name='Detail',
-  full_name='Detail',
-  filename=None,
-  file=DESCRIPTOR,
-  containing_type=None,
-  fields=[
-    _descriptor.FieldDescriptor(
-      name='xmlDetail', full_name='Detail.xmlDetail', index=0,
-      number=1, type=9, cpp_type=9, label=1,
-      has_default_value=False, default_value=_b("").decode('utf-8'),
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR),
-    _descriptor.FieldDescriptor(
-      name='contact', full_name='Detail.contact', index=1,
-      number=2, type=11, cpp_type=10, label=1,
-      has_default_value=False, default_value=None,
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR),
-    _descriptor.FieldDescriptor(
-      name='group', full_name='Detail.group', index=2,
-      number=3, type=11, cpp_type=10, label=1,
-      has_default_value=False, default_value=None,
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR),
-    _descriptor.FieldDescriptor(
-      name='precisionLocation', full_name='Detail.precisionLocation', index=3,
-      number=4, type=11, cpp_type=10, label=1,
-      has_default_value=False, default_value=None,
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR),
-    _descriptor.FieldDescriptor(
-      name='status', full_name='Detail.status', index=4,
-      number=5, type=11, cpp_type=10, label=1,
-      has_default_value=False, default_value=None,
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR),
-    _descriptor.FieldDescriptor(
-      name='takv', full_name='Detail.takv', index=5,
-      number=6, type=11, cpp_type=10, label=1,
-      has_default_value=False, default_value=None,
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR),
-    _descriptor.FieldDescriptor(
-      name='track', full_name='Detail.track', index=6,
-      number=7, type=11, cpp_type=10, label=1,
-      has_default_value=False, default_value=None,
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR),
-  ],
-  extensions=[
-  ],
-  nested_types=[],
-  enum_types=[
-  ],
-  serialized_options=None,
-  is_extendable=False,
-  syntax='proto3',
-  extension_ranges=[],
-  oneofs=[
-  ],
-  serialized_start=109,
-  serialized_end=302,
-)
-
-_DETAIL.fields_by_name['contact'].message_type = contact__pb2._CONTACT
-_DETAIL.fields_by_name['group'].message_type = group__pb2._GROUP
-_DETAIL.fields_by_name['precisionLocation'].message_type = precisionlocation__pb2._PRECISIONLOCATION
-_DETAIL.fields_by_name['status'].message_type = status__pb2._STATUS
-_DETAIL.fields_by_name['takv'].message_type = takv__pb2._TAKV
-_DETAIL.fields_by_name['track'].message_type = track__pb2._TRACK
-DESCRIPTOR.message_types_by_name['Detail'] = _DETAIL
-_sym_db.RegisterFileDescriptor(DESCRIPTOR)
-
-Detail = _reflection.GeneratedProtocolMessageType('Detail', (_message.Message,), dict(
-  DESCRIPTOR = _DETAIL,
-  __module__ = 'detail_pb2'
-  # @@protoc_insertion_point(class_scope:Detail)
-  ))
-_sym_db.RegisterMessage(Detail)
-
-
-DESCRIPTOR._options = None
-# @@protoc_insertion_point(module_scope)
diff --git a/takprotobuf/proto/group_pb2.py b/takprotobuf/proto/group_pb2.py
deleted file mode 100644
index 08e096f..0000000
--- a/takprotobuf/proto/group_pb2.py
+++ /dev/null
@@ -1,77 +0,0 @@
-# Generated by the protocol buffer compiler.  DO NOT EDIT!
-# source: group.proto
-
-import sys
-_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
-from google.protobuf import descriptor as _descriptor
-from google.protobuf import message as _message
-from google.protobuf import reflection as _reflection
-from google.protobuf import symbol_database as _symbol_database
-# @@protoc_insertion_point(imports)
-
-_sym_db = _symbol_database.Default()
-
-
-
-
-DESCRIPTOR = _descriptor.FileDescriptor(
-  name='group.proto',
-  package='',
-  syntax='proto3',
-  serialized_options=_b('H\003'),
-  serialized_pb=_b('\n\x0bgroup.proto\"#\n\x05Group\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04role\x18\x02 \x01(\tB\x02H\x03\x62\x06proto3')
-)
-
-
-
-
-_GROUP = _descriptor.Descriptor(
-  name='Group',
-  full_name='Group',
-  filename=None,
-  file=DESCRIPTOR,
-  containing_type=None,
-  fields=[
-    _descriptor.FieldDescriptor(
-      name='name', full_name='Group.name', index=0,
-      number=1, type=9, cpp_type=9, label=1,
-      has_default_value=False, default_value=_b("").decode('utf-8'),
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR),
-    _descriptor.FieldDescriptor(
-      name='role', full_name='Group.role', index=1,
-      number=2, type=9, cpp_type=9, label=1,
-      has_default_value=False, default_value=_b("").decode('utf-8'),
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR),
-  ],
-  extensions=[
-  ],
-  nested_types=[],
-  enum_types=[
-  ],
-  serialized_options=None,
-  is_extendable=False,
-  syntax='proto3',
-  extension_ranges=[],
-  oneofs=[
-  ],
-  serialized_start=15,
-  serialized_end=50,
-)
-
-DESCRIPTOR.message_types_by_name['Group'] = _GROUP
-_sym_db.RegisterFileDescriptor(DESCRIPTOR)
-
-Group = _reflection.GeneratedProtocolMessageType('Group', (_message.Message,), dict(
-  DESCRIPTOR = _GROUP,
-  __module__ = 'group_pb2'
-  # @@protoc_insertion_point(class_scope:Group)
-  ))
-_sym_db.RegisterMessage(Group)
-
-
-DESCRIPTOR._options = None
-# @@protoc_insertion_point(module_scope)
diff --git a/takprotobuf/proto/precisionlocation_pb2.py b/takprotobuf/proto/precisionlocation_pb2.py
deleted file mode 100644
index 53b3d46..0000000
--- a/takprotobuf/proto/precisionlocation_pb2.py
+++ /dev/null
@@ -1,77 +0,0 @@
-# Generated by the protocol buffer compiler.  DO NOT EDIT!
-# source: precisionlocation.proto
-
-import sys
-_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
-from google.protobuf import descriptor as _descriptor
-from google.protobuf import message as _message
-from google.protobuf import reflection as _reflection
-from google.protobuf import symbol_database as _symbol_database
-# @@protoc_insertion_point(imports)
-
-_sym_db = _symbol_database.Default()
-
-
-
-
-DESCRIPTOR = _descriptor.FileDescriptor(
-  name='precisionlocation.proto',
-  package='',
-  syntax='proto3',
-  serialized_options=_b('H\003'),
-  serialized_pb=_b('\n\x17precisionlocation.proto\"8\n\x11PrecisionLocation\x12\x13\n\x0bgeopointsrc\x18\x01 \x01(\t\x12\x0e\n\x06\x61ltsrc\x18\x02 \x01(\tB\x02H\x03\x62\x06proto3')
-)
-
-
-
-
-_PRECISIONLOCATION = _descriptor.Descriptor(
-  name='PrecisionLocation',
-  full_name='PrecisionLocation',
-  filename=None,
-  file=DESCRIPTOR,
-  containing_type=None,
-  fields=[
-    _descriptor.FieldDescriptor(
-      name='geopointsrc', full_name='PrecisionLocation.geopointsrc', index=0,
-      number=1, type=9, cpp_type=9, label=1,
-      has_default_value=False, default_value=_b("").decode('utf-8'),
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR),
-    _descriptor.FieldDescriptor(
-      name='altsrc', full_name='PrecisionLocation.altsrc', index=1,
-      number=2, type=9, cpp_type=9, label=1,
-      has_default_value=False, default_value=_b("").decode('utf-8'),
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR),
-  ],
-  extensions=[
-  ],
-  nested_types=[],
-  enum_types=[
-  ],
-  serialized_options=None,
-  is_extendable=False,
-  syntax='proto3',
-  extension_ranges=[],
-  oneofs=[
-  ],
-  serialized_start=27,
-  serialized_end=83,
-)
-
-DESCRIPTOR.message_types_by_name['PrecisionLocation'] = _PRECISIONLOCATION
-_sym_db.RegisterFileDescriptor(DESCRIPTOR)
-
-PrecisionLocation = _reflection.GeneratedProtocolMessageType('PrecisionLocation', (_message.Message,), dict(
-  DESCRIPTOR = _PRECISIONLOCATION,
-  __module__ = 'precisionlocation_pb2'
-  # @@protoc_insertion_point(class_scope:PrecisionLocation)
-  ))
-_sym_db.RegisterMessage(PrecisionLocation)
-
-
-DESCRIPTOR._options = None
-# @@protoc_insertion_point(module_scope)
diff --git a/takprotobuf/proto/status_pb2.py b/takprotobuf/proto/status_pb2.py
deleted file mode 100644
index 227abea..0000000
--- a/takprotobuf/proto/status_pb2.py
+++ /dev/null
@@ -1,70 +0,0 @@
-# Generated by the protocol buffer compiler.  DO NOT EDIT!
-# source: status.proto
-
-import sys
-_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
-from google.protobuf import descriptor as _descriptor
-from google.protobuf import message as _message
-from google.protobuf import reflection as _reflection
-from google.protobuf import symbol_database as _symbol_database
-# @@protoc_insertion_point(imports)
-
-_sym_db = _symbol_database.Default()
-
-
-
-
-DESCRIPTOR = _descriptor.FileDescriptor(
-  name='status.proto',
-  package='',
-  syntax='proto3',
-  serialized_options=_b('H\003'),
-  serialized_pb=_b('\n\x0cstatus.proto\"\x19\n\x06Status\x12\x0f\n\x07\x62\x61ttery\x18\x01 \x01(\rB\x02H\x03\x62\x06proto3')
-)
-
-
-
-
-_STATUS = _descriptor.Descriptor(
-  name='Status',
-  full_name='Status',
-  filename=None,
-  file=DESCRIPTOR,
-  containing_type=None,
-  fields=[
-    _descriptor.FieldDescriptor(
-      name='battery', full_name='Status.battery', index=0,
-      number=1, type=13, cpp_type=3, label=1,
-      has_default_value=False, default_value=0,
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR),
-  ],
-  extensions=[
-  ],
-  nested_types=[],
-  enum_types=[
-  ],
-  serialized_options=None,
-  is_extendable=False,
-  syntax='proto3',
-  extension_ranges=[],
-  oneofs=[
-  ],
-  serialized_start=16,
-  serialized_end=41,
-)
-
-DESCRIPTOR.message_types_by_name['Status'] = _STATUS
-_sym_db.RegisterFileDescriptor(DESCRIPTOR)
-
-Status = _reflection.GeneratedProtocolMessageType('Status', (_message.Message,), dict(
-  DESCRIPTOR = _STATUS,
-  __module__ = 'status_pb2'
-  # @@protoc_insertion_point(class_scope:Status)
-  ))
-_sym_db.RegisterMessage(Status)
-
-
-DESCRIPTOR._options = None
-# @@protoc_insertion_point(module_scope)
diff --git a/takprotobuf/proto/takcontrol_pb2.py b/takprotobuf/proto/takcontrol_pb2.py
deleted file mode 100644
index 1433519..0000000
--- a/takprotobuf/proto/takcontrol_pb2.py
+++ /dev/null
@@ -1,84 +0,0 @@
-# Generated by the protocol buffer compiler.  DO NOT EDIT!
-# source: takcontrol.proto
-
-import sys
-_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
-from google.protobuf import descriptor as _descriptor
-from google.protobuf import message as _message
-from google.protobuf import reflection as _reflection
-from google.protobuf import symbol_database as _symbol_database
-# @@protoc_insertion_point(imports)
-
-_sym_db = _symbol_database.Default()
-
-
-
-
-DESCRIPTOR = _descriptor.FileDescriptor(
-  name='takcontrol.proto',
-  package='',
-  syntax='proto3',
-  serialized_options=_b('H\003'),
-  serialized_pb=_b('\n\x10takcontrol.proto\"R\n\nTakControl\x12\x17\n\x0fminProtoVersion\x18\x01 \x01(\r\x12\x17\n\x0fmaxProtoVersion\x18\x02 \x01(\r\x12\x12\n\ncontactUid\x18\x03 \x01(\tB\x02H\x03\x62\x06proto3')
-)
-
-
-
-
-_TAKCONTROL = _descriptor.Descriptor(
-  name='TakControl',
-  full_name='TakControl',
-  filename=None,
-  file=DESCRIPTOR,
-  containing_type=None,
-  fields=[
-    _descriptor.FieldDescriptor(
-      name='minProtoVersion', full_name='TakControl.minProtoVersion', index=0,
-      number=1, type=13, cpp_type=3, label=1,
-      has_default_value=False, default_value=0,
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR),
-    _descriptor.FieldDescriptor(
-      name='maxProtoVersion', full_name='TakControl.maxProtoVersion', index=1,
-      number=2, type=13, cpp_type=3, label=1,
-      has_default_value=False, default_value=0,
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR),
-    _descriptor.FieldDescriptor(
-      name='contactUid', full_name='TakControl.contactUid', index=2,
-      number=3, type=9, cpp_type=9, label=1,
-      has_default_value=False, default_value=_b("").decode('utf-8'),
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR),
-  ],
-  extensions=[
-  ],
-  nested_types=[],
-  enum_types=[
-  ],
-  serialized_options=None,
-  is_extendable=False,
-  syntax='proto3',
-  extension_ranges=[],
-  oneofs=[
-  ],
-  serialized_start=20,
-  serialized_end=102,
-)
-
-DESCRIPTOR.message_types_by_name['TakControl'] = _TAKCONTROL
-_sym_db.RegisterFileDescriptor(DESCRIPTOR)
-
-TakControl = _reflection.GeneratedProtocolMessageType('TakControl', (_message.Message,), dict(
-  DESCRIPTOR = _TAKCONTROL,
-  __module__ = 'takcontrol_pb2'
-  # @@protoc_insertion_point(class_scope:TakControl)
-  ))
-_sym_db.RegisterMessage(TakControl)
-
-
-DESCRIPTOR._options = None
-# @@protoc_insertion_point(module_scope)
diff --git a/takprotobuf/proto/takmessage_pb2.py b/takprotobuf/proto/takmessage_pb2.py
deleted file mode 100644
index 5438974..0000000
--- a/takprotobuf/proto/takmessage_pb2.py
+++ /dev/null
@@ -1,82 +0,0 @@
-# Generated by the protocol buffer compiler.  DO NOT EDIT!
-# source: takmessage.proto
-
-import sys
-_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
-from google.protobuf import descriptor as _descriptor
-from google.protobuf import message as _message
-from google.protobuf import reflection as _reflection
-from google.protobuf import symbol_database as _symbol_database
-# @@protoc_insertion_point(imports)
-
-_sym_db = _symbol_database.Default()
-
-
-from . import cotevent_pb2 as cotevent__pb2
-from . import takcontrol_pb2 as takcontrol__pb2
-
-
-DESCRIPTOR = _descriptor.FileDescriptor(
-  name='takmessage.proto',
-  package='',
-  syntax='proto3',
-  serialized_options=_b('H\003'),
-  serialized_pb=_b('\n\x10takmessage.proto\x1a\x0e\x63otevent.proto\x1a\x10takcontrol.proto\"J\n\nTakMessage\x12\x1f\n\ntakControl\x18\x01 \x01(\x0b\x32\x0b.TakControl\x12\x1b\n\x08\x63otEvent\x18\x02 \x01(\x0b\x32\t.CotEventB\x02H\x03\x62\x06proto3')
-  ,
-  dependencies=[cotevent__pb2.DESCRIPTOR,takcontrol__pb2.DESCRIPTOR,])
-
-
-
-
-_TAKMESSAGE = _descriptor.Descriptor(
-  name='TakMessage',
-  full_name='TakMessage',
-  filename=None,
-  file=DESCRIPTOR,
-  containing_type=None,
-  fields=[
-    _descriptor.FieldDescriptor(
-      name='takControl', full_name='TakMessage.takControl', index=0,
-      number=1, type=11, cpp_type=10, label=1,
-      has_default_value=False, default_value=None,
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR),
-    _descriptor.FieldDescriptor(
-      name='cotEvent', full_name='TakMessage.cotEvent', index=1,
-      number=2, type=11, cpp_type=10, label=1,
-      has_default_value=False, default_value=None,
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR),
-  ],
-  extensions=[
-  ],
-  nested_types=[],
-  enum_types=[
-  ],
-  serialized_options=None,
-  is_extendable=False,
-  syntax='proto3',
-  extension_ranges=[],
-  oneofs=[
-  ],
-  serialized_start=54,
-  serialized_end=128,
-)
-
-_TAKMESSAGE.fields_by_name['takControl'].message_type = takcontrol__pb2._TAKCONTROL
-_TAKMESSAGE.fields_by_name['cotEvent'].message_type = cotevent__pb2._COTEVENT
-DESCRIPTOR.message_types_by_name['TakMessage'] = _TAKMESSAGE
-_sym_db.RegisterFileDescriptor(DESCRIPTOR)
-
-TakMessage = _reflection.GeneratedProtocolMessageType('TakMessage', (_message.Message,), dict(
-  DESCRIPTOR = _TAKMESSAGE,
-  __module__ = 'takmessage_pb2'
-  # @@protoc_insertion_point(class_scope:TakMessage)
-  ))
-_sym_db.RegisterMessage(TakMessage)
-
-
-DESCRIPTOR._options = None
-# @@protoc_insertion_point(module_scope)
diff --git a/takprotobuf/proto/takv_pb2.py b/takprotobuf/proto/takv_pb2.py
deleted file mode 100644
index 7d1cd28..0000000
--- a/takprotobuf/proto/takv_pb2.py
+++ /dev/null
@@ -1,91 +0,0 @@
-# Generated by the protocol buffer compiler.  DO NOT EDIT!
-# source: takv.proto
-
-import sys
-_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
-from google.protobuf import descriptor as _descriptor
-from google.protobuf import message as _message
-from google.protobuf import reflection as _reflection
-from google.protobuf import symbol_database as _symbol_database
-# @@protoc_insertion_point(imports)
-
-_sym_db = _symbol_database.Default()
-
-
-
-
-DESCRIPTOR = _descriptor.FileDescriptor(
-  name='takv.proto',
-  package='',
-  syntax='proto3',
-  serialized_options=_b('H\003'),
-  serialized_pb=_b('\n\ntakv.proto\"E\n\x04Takv\x12\x0e\n\x06\x64\x65vice\x18\x01 \x01(\t\x12\x10\n\x08platform\x18\x02 \x01(\t\x12\n\n\x02os\x18\x03 \x01(\t\x12\x0f\n\x07version\x18\x04 \x01(\tB\x02H\x03\x62\x06proto3')
-)
-
-
-
-
-_TAKV = _descriptor.Descriptor(
-  name='Takv',
-  full_name='Takv',
-  filename=None,
-  file=DESCRIPTOR,
-  containing_type=None,
-  fields=[
-    _descriptor.FieldDescriptor(
-      name='device', full_name='Takv.device', index=0,
-      number=1, type=9, cpp_type=9, label=1,
-      has_default_value=False, default_value=_b("").decode('utf-8'),
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR),
-    _descriptor.FieldDescriptor(
-      name='platform', full_name='Takv.platform', index=1,
-      number=2, type=9, cpp_type=9, label=1,
-      has_default_value=False, default_value=_b("").decode('utf-8'),
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR),
-    _descriptor.FieldDescriptor(
-      name='os', full_name='Takv.os', index=2,
-      number=3, type=9, cpp_type=9, label=1,
-      has_default_value=False, default_value=_b("").decode('utf-8'),
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR),
-    _descriptor.FieldDescriptor(
-      name='version', full_name='Takv.version', index=3,
-      number=4, type=9, cpp_type=9, label=1,
-      has_default_value=False, default_value=_b("").decode('utf-8'),
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR),
-  ],
-  extensions=[
-  ],
-  nested_types=[],
-  enum_types=[
-  ],
-  serialized_options=None,
-  is_extendable=False,
-  syntax='proto3',
-  extension_ranges=[],
-  oneofs=[
-  ],
-  serialized_start=14,
-  serialized_end=83,
-)
-
-DESCRIPTOR.message_types_by_name['Takv'] = _TAKV
-_sym_db.RegisterFileDescriptor(DESCRIPTOR)
-
-Takv = _reflection.GeneratedProtocolMessageType('Takv', (_message.Message,), dict(
-  DESCRIPTOR = _TAKV,
-  __module__ = 'takv_pb2'
-  # @@protoc_insertion_point(class_scope:Takv)
-  ))
-_sym_db.RegisterMessage(Takv)
-
-
-DESCRIPTOR._options = None
-# @@protoc_insertion_point(module_scope)
diff --git a/takprotobuf/proto/track_pb2.py b/takprotobuf/proto/track_pb2.py
deleted file mode 100644
index 74d2036..0000000
--- a/takprotobuf/proto/track_pb2.py
+++ /dev/null
@@ -1,77 +0,0 @@
-# Generated by the protocol buffer compiler.  DO NOT EDIT!
-# source: track.proto
-
-import sys
-_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
-from google.protobuf import descriptor as _descriptor
-from google.protobuf import message as _message
-from google.protobuf import reflection as _reflection
-from google.protobuf import symbol_database as _symbol_database
-# @@protoc_insertion_point(imports)
-
-_sym_db = _symbol_database.Default()
-
-
-
-
-DESCRIPTOR = _descriptor.FileDescriptor(
-  name='track.proto',
-  package='',
-  syntax='proto3',
-  serialized_options=_b('H\003'),
-  serialized_pb=_b('\n\x0btrack.proto\"&\n\x05Track\x12\r\n\x05speed\x18\x01 \x01(\x01\x12\x0e\n\x06\x63ourse\x18\x02 \x01(\x01\x42\x02H\x03\x62\x06proto3')
-)
-
-
-
-
-_TRACK = _descriptor.Descriptor(
-  name='Track',
-  full_name='Track',
-  filename=None,
-  file=DESCRIPTOR,
-  containing_type=None,
-  fields=[
-    _descriptor.FieldDescriptor(
-      name='speed', full_name='Track.speed', index=0,
-      number=1, type=1, cpp_type=5, label=1,
-      has_default_value=False, default_value=float(0),
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR),
-    _descriptor.FieldDescriptor(
-      name='course', full_name='Track.course', index=1,
-      number=2, type=1, cpp_type=5, label=1,
-      has_default_value=False, default_value=float(0),
-      message_type=None, enum_type=None, containing_type=None,
-      is_extension=False, extension_scope=None,
-      serialized_options=None, file=DESCRIPTOR),
-  ],
-  extensions=[
-  ],
-  nested_types=[],
-  enum_types=[
-  ],
-  serialized_options=None,
-  is_extendable=False,
-  syntax='proto3',
-  extension_ranges=[],
-  oneofs=[
-  ],
-  serialized_start=15,
-  serialized_end=53,
-)
-
-DESCRIPTOR.message_types_by_name['Track'] = _TRACK
-_sym_db.RegisterFileDescriptor(DESCRIPTOR)
-
-Track = _reflection.GeneratedProtocolMessageType('Track', (_message.Message,), dict(
-  DESCRIPTOR = _TRACK,
-  __module__ = 'track_pb2'
-  # @@protoc_insertion_point(class_scope:Track)
-  ))
-_sym_db.RegisterMessage(Track)
-
-
-DESCRIPTOR._options = None
-# @@protoc_insertion_point(module_scope)
diff --git a/takprotobuf/xmlToProto.py b/takprotobuf/xmlToProto.py
deleted file mode 100644
index 18a50db..0000000
--- a/takprotobuf/xmlToProto.py
+++ /dev/null
@@ -1,141 +0,0 @@
-import untangle
-import time
-from datetime import datetime
-import re
-from .proto import TakMessage
-
-def xmlToProto(xml):
-	cot = untangle.parse(xml)
-	takMessage = TakMessage()
-	takControl = takMessage.takControl
-	cotEvent = takMessage.cotEvent
-
-	# If this is a GeoChat message, extract the sender's UID from the event UID and place it in takControl.contactUid
-	if "GeoChat." in cot.event['uid']:
-		takControl.contactUid = cot.event['uid'].split(".")[1]
-
-	# If XML contains an event element, write the attributes
-	if 'event' in dir(cot):		
-		if cot.event['type']:
-			cotEvent.type = cot.event['type']
-
-		if cot.event['access']:
-			cotEvent.access = cot.event['access']
-
-		if cot.event['qos']:
-			cotEvent.qos = cot.event['qos']
-
-		if cot.event['opex']:
-			cotEvent.opex = cot.event['opex']
-
-		if cot.event['uid']:
-			cotEvent.uid = cot.event['uid']
-
-		# TAK protobuf times are expressed as miliseconds since 1970-01-01 00:00:00 UTC
-		# Convert time, start, and stale, from ISO time format to miliseconds since epoch
-		if cot.event['time']:
-			sendTime = datetime.strptime(cot.event['time'], '%Y-%m-%dT%H:%M:%S.%fZ')
-			sendTime = int(sendTime.timestamp() * 1000)
-			cotEvent.sendTime = sendTime
-					
-		if cot.event['start']:
-			startTime = datetime.strptime(cot.event['start'], '%Y-%m-%dT%H:%M:%S.%fZ')
-			startTime = int(startTime.timestamp() * 1000)
-			cotEvent.startTime = startTime
-
-		if cot.event['stale']:
-			staleTime = datetime.strptime(cot.event['stale'], '%Y-%m-%dT%H:%M:%S.%fZ')
-			staleTime = int(staleTime.timestamp() * 1000)
-			cotEvent.staleTime = staleTime
-
-		if cot.event['how']:
-			cotEvent.how = cot.event['how']
-
-		# If the event element includes a point child, write the attributes
-		if 'point' in dir(cot.event):
-
-			if cot.event.point['lat']:
-				cotEvent.lat = float(cot.event.point['lat'])
-
-			if cot.event.point['lon']:
-				cotEvent.lon = float(cot.event.point['lon'])
-
-			if cot.event.point['hae']:
-				cotEvent.hae = float(cot.event.point['hae'])
-
-			if cot.event.point['ce']:
-				cotEvent.ce = float(cot.event.point['ce'])
-
-			if cot.event.point['le']:
-				cotEvent.le = float(cot.event.point['le'])
-
-		# If the XML includes a <detail> element, create cotEvent.detail
-		if 'detail' in dir(cot.event):
-			detail = cotEvent.detail
-			
-			# The cotEvent.detail field of a TAK protobuf is structured differently from CoT XML.
-			# cotEvent.detail may only contain xmlDetail, contact, __group, precisionlocation, status,
-			# takv, and track. xmlDetail should contain an XML string with any data that does not
-			# adhere to the other strongly-typed fields. See more information about each field below.
-			
-			# If this is a GeoChat message, write the contents of <detail> in xmlDetail.
-			if "GeoChat." in cot.event['uid']:
-				pattern = "<detail>(.*?)</detail>"
-				xmldetailstr = re.search(pattern, xml).group(1)
-				detail.xmlDetail = xmldetailstr
-
-			if 'contact' in dir(cot.event.detail):
-				if cot.event.detail.contact['endpoint']:
-					detail.contact.endpoint = cot.event.detail.contact['endpoint'] # must be a string
-
-				if cot.event.detail.contact['callsign']:
-					detail.contact.callsign = cot.event.detail.contact['callsign'] # must be a string
-
-				if '__group' in dir(cot.event.detail):
-					if cot.event.detail.__group['name']:
-						detail.group.name = cot.event.detail.__group['name'] # must be a string
-
-					if cot.event.detail.__group['role']:
-						detail.group.role = cot.event.detail.__group['role'] # must be a string
-
-					if 'precisionlocation' in dir(cot.event.detail):
-						if cot.event.detail.precisionlocation['geopointsrc']:
-							detail.precisionLocation.geopointsrc = cot.event.detail.precisionlocation['geopointsrc'] # must be a string
-							
-						if cot.event.detail.precisionlocation['altsrc']:
-							detail.precisionLocation.altsrc = cot.event.detail.precisionlocation['altsrc'] # must be a string
-
-			if 'status' in dir(cot.event.detail):
-				if cot.event.detail.status['battery']:
-					detail.status.battery = int(cot.event.detail.status['battery']) # must be an integer
-
-			if 'takv' in dir(cot.event.detail):
-				if cot.event.detail.takv['device']:
-					detail.takv.device = cot.event.detail.takv['device'] # must be a string
-
-				if cot.event.detail.takv['platform']:
-					detail.takv.platform = cot.event.detail.takv['platform'] # must be a string
-
-				if cot.event.detail.takv['os']:
-					detail.takv.os = cot.event.detail.takv['os'] # must be a string
-
-				if cot.event.detail.takv['version']:
-					detail.takv.version = cot.event.detail.takv['version'] # must be a string
-
-			# The fields in track are double-precision floating-point numbers.
-			# We can use Python's native float, since that is actually 64-bit floating-point.
-			if 'track' in dir(cot.event.detail):
-				if cot.event.detail.track['speed']:
-					detail.track.speed = float(cot.event.detail.track['speed']) # must be floating-point
-
-				if cot.event.detail.track['course']:
-					detail.track.course = float(cot.event.detail.track['course']) # must be floating-point
-					
-	
-	# TAK protocol packets have a three-byte header.  The two 0xbf bytes on the outside identify the packet
-	# as containing TAK protocol.  The 0x01 byte in the middle identifies the TAK protocol version, in our
-	# case, version 1.
-	headerByteArray = bytearray(b'\xbf\x01\xbf')
-	takMessageByteArray = bytearray(takMessage.SerializeToString())
-	outputByteArray = headerByteArray + takMessageByteArray
-	return outputByteArray
\ No newline at end of file


Test patch:
diff --git a/.github/workflows/python-test_and_lint.yml b/.github/workflows/python-test_and_lint.yml
new file mode 100755
index 0000000..485e9c7
--- /dev/null
+++ b/.github/workflows/python-test_and_lint.yml
@@ -0,0 +1,38 @@
+name: Lint & Test Code
+
+on:
+  push:
+    branches: [ main ]
+  pull_request:
+    branches: [ main ]
+
+jobs:
+  build:
+
+    runs-on: ubuntu-20.04
+    strategy:
+      fail-fast: false
+      matrix:
+        python-version: [3.6, 3.7, 3.8, 3.9, "3.10"]
+
+    steps:
+    - uses: actions/checkout@v2
+    - name: Set up Python ${{ matrix.python-version }}
+      uses: actions/setup-python@v2
+      with:
+        python-version: ${{ matrix.python-version }}
+    - name: Install test requirements
+      run: |
+        make install_test_requirements
+    - name: Install package itself (editable)
+      run: |
+        make editable
+    - name: Lint with pylint
+      run: |
+        make pylint
+    - name: Lint with flake8
+      run: |
+        make flake8
+    - name: Test with pytest-cov
+      run: |
+        make test_cov
diff --git a/requirements_test.txt b/requirements_test.txt
new file mode 100644
index 0000000..9120a8a
--- /dev/null
+++ b/requirements_test.txt
@@ -0,0 +1,5 @@
+pytest-asyncio
+pytest-cov
+pylint
+flake8
+black
diff --git a/tests/test_functions.py b/tests/test_functions.py
new file mode 100644
index 0000000..d3b6895
--- /dev/null
+++ b/tests/test_functions.py
@@ -0,0 +1,126 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+#
+# Copyright 2023 Sensors & Signals LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# Author:: Greg Albrecht <gba@snstac.com>
+# Copyright:: Copyright 2023 Sensors & Signals LLC
+# License:: Apache License, Version 2.0
+#
+
+"""TAKProto Module Tests."""
+
+from datetime import datetime, timezone
+import unittest
+
+import takproto
+
+
+__author__ = "Greg Albrecht <gba@snstac.com>"
+__copyright__ = "Copyright 2023 Sensors & Signals LLC"
+__license__ = "Apache License, Version 2.0"
+
+
+class TestFunctions(unittest.TestCase):
+    def test_format_timestamp(self):
+        """Test formatting timestamp to and from Protobuf format."""
+        t_time = "2020-02-08T18:10:44.000000Z"
+        t_ts = 1581185444000
+        ts = takproto.format_time(t_time)
+        self.assertEqual(ts, t_ts)
+
+        t_ts2 = t_ts / 1000
+        time2 = datetime.fromtimestamp(t_ts2, timezone.utc).strftime(
+            "%Y-%m-%dT%H:%M:%S.%fZ"
+        )
+        self.assertEqual(time2, t_time)
+
+    def test_xml2proto_default(self):
+        """Test encoding XML string as Protobuf bytearray."""
+        t_xml = """<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
+        <event version='2.0' uid='aa0b0312-b5cd-4c2c-bbbc-9c4c70216261' type='a-f-G-E-V-C' time='2020-02-08T18:10:44.000Z' start='2020-02-08T18:10:44.000Z' stale='2020-02-08T18:11:11.000Z' how='h-e'><point lat='43.97957317' lon='-66.07737696' hae='26.767999' ce='9999999.0' le='9999999.0' /><detail><uid Droid='Eliopoli HQ'/><contact callsign='Eliopoli HQ' endpoint='192.168.1.10:4242:tcp'/><__group name='Yellow' role='HQ'/><status battery='100'/><takv platform='WinTAK-CIV' device='LENOVO 20QV0007US' os='Microsoft Windows 10 Home' version='1.10.0.137'/><track speed='0.00000000' course='0.00000000'/></detail></event>
+        """
+
+        t_ba = bytearray(
+            b'\xbf\x01\xbf\x12\x9c\x02\n\x0ba-f-G-E-V-C*$aa0b0312-b5cd-4c2c-bbbc-9c4c702162610\xa0\xd1\xfc\xaf\x82.8\xa0\xd1\xfc\xaf\x82.@\x98\xa4\xfe\xaf\x82.J\x03h-eQ3\x98T\xa7b\xfdE@Y}*~\xbe\xf3\x84P\xc0aW\\\x1c\x95\x9b\xc4:@i\x00\x00\x00\xe0\xcf\x12cAq\x00\x00\x00\xe0\xcf\x12cAz\x9f\x01\n\x1b<uid Droid="Eliopoli HQ" />\x12$\n\x15192.168.1.10:4242:tcp\x12\x0bEliopoli HQ\x1a\x0c\n\x06Yellow\x12\x02HQ*\x02\x08d2F\n\x11LENOVO 20QV0007US\x12\nWinTAK-CIV\x1a\x19Microsoft Windows 10 Home"\n1.10.0.137:\x00'
+        )
+
+        buf = takproto.xml2proto(t_xml)
+
+        print("Generated: ")
+        print(takproto.parse_proto(bytes(buf)))
+        print(buf)
+
+        print("Expected: ")
+        print(takproto.parse_proto(bytes(t_ba)))
+        print(t_ba)
+
+        self.assertEqual(bytes(buf), bytes(t_ba))
+
+    def test_xml2proto_mesh(self):
+        """Test encoding CoT XML string as TAK Protocol Version 1 Mesh Protobuf."""
+        t_xml = """<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
+        <event version='2.0' uid='aa0b0312-b5cd-4c2c-bbbc-9c4c70216261' type='a-f-G-E-V-C' time='2020-02-08T18:10:44.000Z' start='2020-02-08T18:10:44.000Z' stale='2020-02-08T18:11:11.000Z' how='h-e'><point lat='43.97957317' lon='-66.07737696' hae='26.767999' ce='9999999.0' le='9999999.0' /><detail><uid Droid='Eliopoli HQ'/><contact callsign='Eliopoli HQ' endpoint='192.168.1.10:4242:tcp'/><__group name='Yellow' role='HQ'/><status battery='100'/><takv platform='WinTAK-CIV' device='LENOVO 20QV0007US' os='Microsoft Windows 10 Home' version='1.10.0.137'/><track speed='0.00000000' course='0.00000000'/></detail></event>
+        """
+
+        t_ba = bytearray(
+            b'\xbf\x01\xbf\x12\x9c\x02\n\x0ba-f-G-E-V-C*$aa0b0312-b5cd-4c2c-bbbc-9c4c702162610\xa0\xd1\xfc\xaf\x82.8\xa0\xd1\xfc\xaf\x82.@\x98\xa4\xfe\xaf\x82.J\x03h-eQ3\x98T\xa7b\xfdE@Y}*~\xbe\xf3\x84P\xc0aW\\\x1c\x95\x9b\xc4:@i\x00\x00\x00\xe0\xcf\x12cAq\x00\x00\x00\xe0\xcf\x12cAz\x9f\x01\n\x1b<uid Droid="Eliopoli HQ" />\x12$\n\x15192.168.1.10:4242:tcp\x12\x0bEliopoli HQ\x1a\x0c\n\x06Yellow\x12\x02HQ*\x02\x08d2F\n\x11LENOVO 20QV0007US\x12\nWinTAK-CIV\x1a\x19Microsoft Windows 10 Home"\n1.10.0.137:\x00'
+        )
+
+        buf = takproto.xml2proto(t_xml, takproto.TAKProtoVer.MESH)
+
+        self.assertEqual(bytes(buf), bytes(t_ba))
+
+    def test_parse_proto_mesh(self):
+        """Test encoding CoT XML string as TAK Protocol Version 1 Mesh Protobuf."""
+        t_ba = bytearray(
+            b'\xbf\x01\xbf\x12\x9c\x02\n\x0ba-f-G-E-V-C*$aa0b0312-b5cd-4c2c-bbbc-9c4c702162610\xa0\xd1\xfc\xaf\x82.8\xa0\xd1\xfc\xaf\x82.@\x98\xa4\xfe\xaf\x82.J\x03h-eQ3\x98T\xa7b\xfdE@Y}*~\xbe\xf3\x84P\xc0aW\\\x1c\x95\x9b\xc4:@i\x00\x00\x00\xe0\xcf\x12cAq\x00\x00\x00\xe0\xcf\x12cAz\x9f\x01\n\x1b<uid Droid="Eliopoli HQ" />\x12$\n\x15192.168.1.10:4242:tcp\x12\x0bEliopoli HQ\x1a\x0c\n\x06Yellow\x12\x02HQ*\x02\x08d2F\n\x11LENOVO 20QV0007US\x12\nWinTAK-CIV\x1a\x19Microsoft Windows 10 Home"\n1.10.0.137:\x00'
+        )
+
+        parsed = takproto.parse_proto(t_ba)
+        cot_event = parsed.cotEvent
+
+        self.assertEqual(cot_event.type, "a-f-G-E-V-C")
+        self.assertEqual(cot_event.uid, "aa0b0312-b5cd-4c2c-bbbc-9c4c70216261")
+        self.assertEqual(cot_event.detail.xmlDetail, '<uid Droid="Eliopoli HQ" />')
+        self.assertEqual(cot_event.detail.contact.callsign, "Eliopoli HQ")
+
+    def test_xml2proto_stream(self):
+        """Test encoding CoT XML string as TAK Protocol Version 1 Stream Protobuf."""
+        t_xml = """<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
+        <event version='2.0' uid='aa0b0312-b5cd-4c2c-bbbc-9c4c70216261' type='a-f-G-E-V-C' time='2020-02-08T18:10:44.000Z' start='2020-02-08T18:10:44.000Z' stale='2020-02-08T18:11:11.000Z' how='h-e'><point lat='43.97957317' lon='-66.07737696' hae='26.767999' ce='9999999.0' le='9999999.0' /><detail><uid Droid='Eliopoli HQ'/><contact callsign='Eliopoli HQ' endpoint='192.168.1.10:4242:tcp'/><__group name='Yellow' role='HQ'/><status battery='100'/><takv platform='WinTAK-CIV' device='LENOVO 20QV0007US' os='Microsoft Windows 10 Home' version='1.10.0.137'/><track speed='0.00000000' course='0.00000000'/></detail></event>
+        """
+
+        t_ba = bytearray(
+            b'\xbf\x9f\x02\x12\x9c\x02\n\x0ba-f-G-E-V-C*$aa0b0312-b5cd-4c2c-bbbc-9c4c702162610\xa0\xd1\xfc\xaf\x82.8\xa0\xd1\xfc\xaf\x82.@\x98\xa4\xfe\xaf\x82.J\x03h-eQ3\x98T\xa7b\xfdE@Y}*~\xbe\xf3\x84P\xc0aW\\\x1c\x95\x9b\xc4:@i\x00\x00\x00\xe0\xcf\x12cAq\x00\x00\x00\xe0\xcf\x12cAz\x9f\x01\n\x1b<uid Droid="Eliopoli HQ" />\x12$\n\x15192.168.1.10:4242:tcp\x12\x0bEliopoli HQ\x1a\x0c\n\x06Yellow\x12\x02HQ*\x02\x08d2F\n\x11LENOVO 20QV0007US\x12\nWinTAK-CIV\x1a\x19Microsoft Windows 10 Home"\n1.10.0.137:\x00'
+        )
+
+        buf = takproto.xml2proto(t_xml, takproto.TAKProtoVer.STREAM)
+
+        self.assertEqual(bytes(buf), bytes(t_ba))
+
+    def test_parse_proto_stream(self):
+        """Test encoding CoT XML string as TAK Protocol Version 1 Stream Protobuf."""
+        t_ba = bytearray(
+            b'\xbf\x9f\x02\x12\x9c\x02\n\x0ba-f-G-E-V-C*$aa0b0312-b5cd-4c2c-bbbc-9c4c702162610\xa0\xd1\xfc\xaf\x82.8\xa0\xd1\xfc\xaf\x82.@\x98\xa4\xfe\xaf\x82.J\x03h-eQ3\x98T\xa7b\xfdE@Y}*~\xbe\xf3\x84P\xc0aW\\\x1c\x95\x9b\xc4:@i\x00\x00\x00\xe0\xcf\x12cAq\x00\x00\x00\xe0\xcf\x12cAz\x9f\x01\n\x1b<uid Droid="Eliopoli HQ" />\x12$\n\x15192.168.1.10:4242:tcp\x12\x0bEliopoli HQ\x1a\x0c\n\x06Yellow\x12\x02HQ*\x02\x08d2F\n\x11LENOVO 20QV0007US\x12\nWinTAK-CIV\x1a\x19Microsoft Windows 10 Home"\n1.10.0.137:\x00'
+        )
+
+        parsed = takproto.parse_proto(t_ba)
+        cot_event = parsed.cotEvent
+
+        self.assertEqual(cot_event.type, "a-f-G-E-V-C")
+        self.assertEqual(cot_event.uid, "aa0b0312-b5cd-4c2c-bbbc-9c4c70216261")
+        self.assertEqual(cot_event.detail.xmlDetail, '<uid Droid="Eliopoli HQ" />')
+        self.assertEqual(cot_event.detail.contact.callsign, "Eliopoli HQ")