/pyacmi

TacView ACMI FileParser

Primary LanguagePythonApache License 2.0Apache-2.0

pyacmi: TacView ACMI FileParser

PyPI Latest Release License Package Status

**.acmi is a file used by tacview for creating flight recording from simulators or real world.

The source code is currently hosted on GitHub at: https://github.com/wangtong2015/pyacmi

ACMI file documentation: Technical Reference - ACMI flight recordings 2.2

Installation

You can install pyacmi via pip or pip3 for Python 3+:

$ pip3 install pyacmi

You can install a specific version of pyacmi by:

$ pip3 install pyacmi==1.2.3

You can upgrade pyacmi to the latest version by:

$ pip3 install --upgrade pyacmi

Example

from pyacmi import Acmi

acmi = Acmi()
acmi.load_acmi(filepath='test.acmi')
print(acmi)

print(acmi.reference_latitude, acmi.reference_longitude, acmi.reference_time)

# 打印所有的object
for obj_id in acmi.objects:
    obj = acmi.objects[obj_id]
    print(obj)
    print(obj.id, obj.name, obj.country, obj.tags, obj.type)

# 导出成csv
acmi.export_csv('test.csv', remove_empty=True, export_obj_ids=None)

Credits