Sitrec is Open Source on GitHub - How You Can Contribute

Mick West

Administrator
Staff member
2024-01-18_22-25-07.jpg

I've made Sitrec (Metabunk's situation recreation tool) open source.

https://github.com/MickWest/sitrec

This means anyone can look at the source code to see how it works. You can also make you own version of the code, install it on your own server, make changes to the code, and request your changed be merged in with Metabunk's version.

The link above goes to the home page for Sitrec on Github. It will show you the top level view of the code, and a variety of menus and links.

"Readme" (or just scrolling down a bit) will give you instructions on how to build the code and install it on your own server.

"Activity" will show the most recent published changes to the code:
https://github.com/MickWest/sitrec/activity
2024-01-18_22-26-57.jpg

"Issues" will take you to the issue tracking database. Here you can report bugs, make suggestions, or request new features
https://github.com/MickWest/sitrec/issues
2024-01-18_22-29-39.jpg
 
Last edited:
Mick, how do you ingest all of the satellite / astronomical data? Is there a way to provide the data sources?
 
Mick, how do you ingest all of the satellite / astronomical data? Is there a way to provide the data sources?

Current starlink data comes from
https://celestrak.org/NORAD/elements/supplemental/sup-gp.php?FILE=starlink&FORMAT=tle
(historically TLE data is manually added)

Satellite position calculation is from satellite.js
https://github.com/shashwatak/satellite-js

Stars from the Yale Bright Star Catalog and the IAU Catalog of Star Names (IAU-CSN)
https://github.com/MickWest/sitrec/tree/main/data/nightsky

Astronomy position calculations (including planets) comes from Astronomy Engine
https://github.com/cosinekitty/astronomy
 
Great work on the Readme!

As a new joiner (literally just registered) and software engineer, this is door in which I can possibly start to contribute - not only to the repo, but also to the cause.
 
Great work on the Readme!

As a new joiner (literally just registered) and software engineer, this is door in which I can possibly start to contribute - not only to the repo, but also to the cause.
Welcome! It does need quite a bit more documentation, but right now I'm doing a restructuring to make Sitches data driven. So things are somewhat in flux. I hope over the next week or so to get in-app editing, saving and loading of arbitrary sitches that cover 90% of what I've been doing so far with editing code.
 
I know Github is the appropriate place for a bug report, but there is something amiss with my account there. I apologize for posting this here. I also wasn't sure if it would warrant a new thread. Please remove if its not appropriate.


In a thread on /r/ufos/ Flarkey provided a link to Sitrec for a recent pilot sighting. That link does not render for me and an error is present in the browser console. (However Sitrec does render fine after removing all of the URL parameters.)

I am running Ubuntu Linux 20.04 and the provided link does not render on either:
  • Firefox 121.0.1 (uBlock Origin and Privacy Badger are installed but neither report blocking anything)
  • Chromium Version 120.0.6099.224 (Official Build) snap (64-bit) with no plugins or extensions

The provided, shortened Sitrec link:
later expanded to:

Both Chromium and Firefox render a toolbar on the right of the window but the rest is blank white. Both browsers have an error in the console, but the error is different in each.

The error I get in Firefox's console is:
Uncaught (in promise) TypeError: r.u4.up is undefined
parseURLDataAfterSetup https://www.metabunk.org/sitrec/index.f69fb993dafb9ff56bbf.bundle.js:1
8138 https://www.metabunk.org/sitrec/index.f69fb993dafb9ff56bbf.bundle.js:1
index.f69fb993dafb9ff56bbf.bundle.js:1:1274139
sitrec_error_Firefox_2024-01-23 16-32-20.png


The error I get in Chromium's console is:
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'copy')
at CSituation.parseURLDataAfterSetup (index.f69fb993dafb9ff56bbf.bundle.js:1:1274147)
at index.f69fb993dafb9ff56bbf.bundle.js:1:406000
parseURLDataAfterSetup @ index.f69fb993dafb9ff56bbf.bundle.js:1
(anonymous) @ index.f69fb993dafb9ff56bbf.bundle.js:1
sitrec_error_chromium_2024-01-23 16-34-22.png


Both errors seem to indicate a problem parsing the URL data

Happy to provide any other details
 
Last edited:
I know Github is the appropriate place for a bug report, but there is something amiss with my account there. I apologize for posting this here. I also wasn't sure if it would warrant a new thread. Please remove if its not appropriate.
I experienced the same issue on that URL, I've opened a PR on the repo with a change that fixes the issue for me when running locally. If you want to view the sitch in the meantime, you could check out my branch from the PR and run it locally using the instructions on the GitHub readme.

I'm going to put together a docker image shortly to make it a bit easier to run your own Sitrec server locally, I'll update this post with a link when that's available.
 
I experienced the same issue on that URL, I've opened a PR on the repo with a change that fixes the issue for me when running locally. If you want to view the sitch in the meantime, you could check out my branch from the PR and run it locally using the instructions on the GitHub readme.
Thanks!
Merged your PR, and redeployed Sitrec v1.0.3a: 24-01-23 17:04 PT
 
Thanks!
Merged your PR, and redeployed Sitrec v1.0.3a: 24-01-23 17:04 PT
The issue there was I was defining a camera in the Sit object using an object called "mainCamera", but some crufty code relied on this.mainCamera (where this = Sit), and then there was a global value called "mainCamera"

I've removed all references to variables called "mainCamera", and the main camera is now accessed via the node manager. All of this is part of A) standardizing setup across all sitches and B) moving towards a purely data-driven setup flow.
 
Cool! I did not expect it to be built using mainly JS! Thanks for making this open sourced!
 
Are all the adjustable options in Sitrec documented somewhere? Like what exactly "SL flare angle" does?
Not really. There's some discussion in threads, but there really needs to be more formal documentation.

SL Flare angle is the range of angles at which a satellite is considered to be reflecting the sun. Bigger angle, more satellites will reflect. The default of 5° is derived from observing actual starlink in videos.
 
Back
Top