Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADSB tracks received are reported with undefined course (9999999.0) to CoT network #17

Closed
dnlbaldwin opened this issue Dec 16, 2022 · 3 comments

Comments

@dnlbaldwin
Copy link

dnlbaldwin commented Dec 16, 2022

Library version: 5.1.1
Platform: Raspberry Pi 4 8 GB running Ubuntu Server
TAK Server: Taky 0.8.4

I'm seeing tracks that are received by dump1090 being reported with an undefined course when received at my TAK application. When I poll the /data/aircraft.json page it shows that the aircraft has a course, however it is received as undefined when reported from Taky.

/data/aircraft.json

{"hex":"c0211f","flight":"MAL7054 ","alt_baro":34000,"alt_geom":33725,"gs":422.9,"track":245.6,"baro_rate":64,"squawk":"1053","emergency":"none","category":"A4","nav_qnh":1013.6,"nav_altitude_mcp":34016,"nav_heading":253.8,"nav_modes":["vnav","tcas"],"lat":45.140076,"lon":-76.108458,"nic":8,"rc":186,"seen_pos":3.2,"version":2,"nic_baro":1,"nac_p":9,"nac_v":1,"sil":3,"sil_type":"perhour","mlat":[],"tisb":[],"messages":4396,"seen":2.9,"rssi":-16.7}

CoT

<event version="2.0" uid="ICAO-C0211F" type="a-n-A-C-F" how="m-g" time="2022-12-16T03:20:08.437Z" start="2022-12-16T03:20:08.437Z" stale="2022-12-16T03:22:08.437Z"><point lat="45.612396" lon="-74.596163" hae="5227.3" ce="9.0" le="1.0"/><detail uid="ICAO-C0211F"><UID Droid="ICAO-C0211F"/><contact callsign="MAL7054"/><track course="9999999.0" speed="208.34982"/><remarks>MAL7054 Squawk: 1053 C0211F Cat.: A4 adsbcot@ubuntu</remarks></detail></event>

@ampledata
Copy link
Collaborator

ampledata commented Dec 16, 2022 via email

@dnlbaldwin
Copy link
Author

Hi Greg,

Here's my config.ini:

[adsbcot]
COT_URL = tcp://<Local CoT server address>:8087
DUMP1090_URL = http://127.0.0.1:8080/data/aircraft.json
POLL_INTERVAL = 1

I just took a deeper dive into your code and maybe this is the culprit?

https://github.com/ampledata/adsbcot/blob/main/adsbcot/functions.py#L221

It looks like dump1090 is reporting course as 'track' and you're looking for 'trk'. I wonder if different versions of dump1090 report slightly different text in their aircraft objects.

@dnlbaldwin
Copy link
Author

Hey Greg, do you have any comments on my PR?

ampledata added a commit that referenced this issue Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants