Giter Club home page Giter Club logo

skyportal's Introduction

Hi there, I'm sco1! ๐Ÿ‘‹

StackOverflow Slack HackerNews Mastodon

I'm a Boston-based Aerospace Engineer focused on test & evaluation.

Programming Interests

  • Data collection, postprocessing, and visualization
  • CLI and GUI tooling
  • Code quality
  • Software testing

I also find joy in making hilarious things like:

skyportal's People

Contributors

pre-commit-ci[bot] avatar sco1 avatar

Stargazers

 avatar

Watchers

 avatar

skyportal's Issues

Refactor megascript into components

Splitting up the original code.py megascript into its components for easier reasoning about. 7aaf1d0 started the process by mostly attacking the low hanging fruit, though some bits are still a bit entangled.

  • Compartmentalize the display logic, likely into a base Skyportal class?
  • Wrap the networking logic for each API into discrete handlers, incorporating the the initialization logic & any recurring tasks that need to be done

Add additional aircraft icon types

OpenSky can provide the aircraft categories in its response, so we can theoretically have different sprite sheets for different kinds of aircraft (e.g. general aviation, helicopters, airliners).

i cant get a map to generate

when i tryed this project ive gotten everything to work but generating a map i changed the cordanates in the skyportal_config.py but im stuck with the default map

Set up release pipeline

Once a release is published, it would be helpful to bundle only the files that need to be transferred over into a single release artifact so a user can just copy it over.

Additionally, a step to compile the skyportal directory to MPY is not required but would fun to do anyway, probably as a separate artifact (I think these can then go into /lib?)

See: https://github.com/adafruit/circuitpython/tree/main/mpy-cross#micropython-cross-compiler and https://pypi.org/project/mpy-cross/

Support other flight APIs

Obviously beggars can't be choosers when using a free API but OpenSky's response time & uptime have been rough recently. It would probably be worthwhile to explore supporting other APIs to drop in as replacement options in the event that the current downtime continues.

From a quick search we have a few options:

Refactor Requests Interaction

Starting with v3.0 of the adafruit_requests library, a connection session is required to manage the on-device network sessions rather than being able to utilize the top-level get method of the module. The internals will been updated by #23, which vendors in v3.2.4 (I think) & updates the get calls appropriately.

There doesn't seem to be a good method for getting the PyPortal's internal session, so it's just yoinked from the internal PyPortal.network._wifi.requests attribute which I'm mostly comfortable with, but I'm not super happy with having to pass this on a fun winding journey through displaylib if we need to generate a map tile from the API & might be worth refactoring this flow.

Memory Error while taking screenshots

At some point recently I seemed to have broken the screenshotting capability:

Traceback (most recent call last):
  File "code.py", line 81, in <module>
  File "skyportal/displaylib.py", line 534, in process_touch
  File "skyportal/displaylib.py", line 171, in check_fire
  File "skyportal/displaylib.py", line 94, in take_screenshot
  File "adafruit_bitmapsaver.py", line 161, in save_pixels
  File "adafruit_bitmapsaver.py", line 159, in save_pixels
  File "adafruit_bitmapsaver.py", line 107, in _write_pixels
MemoryError: memory allocation failed, allocating 2048 bytes

Checking the memory stats before saving the bitmap seems to show there's plenty of memory left, even before manually GCing:

Free 23408 Alloc 192976
GC Free 25232 Alloc 191152

So I'm not sure where the issue lies.

Add onboard sprite rotation

Rather than needing to manually generate full sprite sheets for every icon at set rotation intervals, it would be nice if we could just have a base icon and have it either rotated on-device, or have a programmatic way to pre-build the sheets. I think I'm leaning towards the latter.

Investigate async functionality

Currently the main loop is just one task: checking OpenSky and then sleeping. I haven't checked yet but I'm assuming this sleep also blocks other functionality (e.g. touchscreen interaction), so will need to investigate how to accommodate this while keeping the refresh loop alive & on time.

Investigate touch functionality

Since we do have a touchscreen, what kinds of things could be added?

  • Show aircraft information (Priority)
  • Screenshot button
  • Visualize aircraft track

PyPortal Titano Compatibility

The PyPortal is available in a larger form factor, the PyPortal Titano, which has a 3.5" diagonal 320x480 screen vs. the original PyPortal's 3.2" 240x320 screen. I believe the relevant internals are otherwise unchanged but would have to adjust the generated map and check on the UI elements.

This is deferred until I end up buying one, so currently no planned completion date.

Name of mpy-cross executable for macos changing

In CircuitPython we plan to update the version of macos used to build mpy-cross, as macos 11 runners are deprecated and due for removal. At the same time, we renamed the binary, removing the macos version number specifier: adafruit/circuitpython#9329

This change will probably first roll out in circuitpython 9.0.6 and circuitpython 9.1.0-beta.3.

Based on code search, this change will likely affect this project.

Display local time on-screen

Right now we're just being lazy and taking the API response (UTC), but would be better to get the TZ offset from our specified grid and convert

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.