Giter Club home page Giter Club logo

Comments (3)

quantumbagel avatar quantumbagel commented on June 6, 2024

Hi Vaibhav!

First thing: this program is a little bit of a buggy mess, so it may just be doing some funky stuff it shouldn't be doing :)

I'm writing a replacement for this code (PyAerial) that avoids interfacing with dump1090 and is overall much better in my testing. However, it's still in development and doesn't have all of the features that airstrik does currently.

The code segment that's crashing, for reference:
image

My best guess for what's going on here is this:

kval is simply each data point (value, time). The code here is determining the closest data point from each type (altitude, latitude, longitude) to the time (closest_time) where the plane is closest to the sensor by distance. It seems like kval is getting set to either an empty string or 1-length string, which should (obviously) never happen. Please add this line after for kval in plane_history[aircraft['hex']][item][::-1]::

print(kval, type(kval), item, plane_history[aircraft['hex']][item][::-1])

Please let me know what this addition prints.

Thanks for catching this!

from airstrik.py.

vpatil33 avatar vpatil33 commented on June 6, 2024
 ['N401NC', 1710446394.3] <class 'list'> flight_name_id [['N401NC', 1710446394.3]]
 7 <class 'str'> flight_id 781b4a

I get the above output before the program crashes. It looks like the first line is a valid case, with the format [data, time]. However, the second line shows kval getting set to a 1-length string: "7" as you said, which is causing the error. Since flight_id isn't really a data point (it doesn't change), I assume it should be ignored?

from airstrik.py.

quantumbagel avatar quantumbagel commented on June 6, 2024

I've pushed a patch for this bug. Please try again and see if this fixes the issue.

from airstrik.py.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.