Python package used to access air vehicle telemetry while in War Thunder air battles
Project description
Overview
Python package to access vehicle telemetry and match data in real-time while in War Thunder air battles (NOT tanks). Here are some things you can access/do with this package:
- Get telemetry information on your vehicle and others identified on user's mini map
- Data available for both user and other match player's vehicles:
- Location in latitude/longitude (DD)
- Heading angle
- Airspeed
- Pitch angle
- Data avilable only for user's vehicle:
- Roll angle
- Flap state
- Gear state
- Altitude
- Data available for both user and other match player's vehicles:
- Data on other objects identified on user's mini map
- Object's location in latitude/longitude (DD)
- Airfields have 2 locations, one for each end of the runway
- Object's faction (friendly or enemy)
- Object's type (fighter, bomber, heavy tank, etc)
- Object's location in latitude/longitude (DD)
- Map name
- Chat comments (anything typed into chat)
- Match events (death, crash, etc)
- Log data in an ACMI format compatible with Tacview
To Install
pip install WarThunder
Example Python Script
from pprint import pprint
from WarThunder import telemetry
if __name__ == '__main__':
try:
print('Starting')
telem = telemetry.TelemInterface()
while True:
if telem.get_telemetry():
pprint(telem.basic_telemetry)
except KeyboardInterrupt:
print('Closing')
This library makes use of War Thunder's localhost server pages (http://localhost:8111/indicators, http://localhost:8111/state, http://localhost:8111/map.img, http://localhost:8111/map_obj.json, and http://localhost:8111/map_info.json, and more!) that the game automatically serves when you launch a game match. If it is an air battle, these pages will include JSON formatted data with valid airplane telemetry. This telemetry is then converted and returned to the calling function/user.
The data can then be easily used for any custom application (i.e. telemetry datalogger and grapher).
Example Use-Case:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for WarThunder-2.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a41b016314f5394bcfbba6279c7b8fb325b6a1e6874392ec98ec2880614d6b20 |
|
MD5 | ba281ed53c093308452bd8113b8dddf2 |
|
BLAKE2b-256 | 636d265264075fcf2e7c6a69e309627033c4e4e47f2db6ecf2db502753c13378 |