Giter VIP home page Giter VIP logo

starlink-coverage's Introduction

Goals:

  1. % of day covered
  2. Average coverage - factoring the number of satellites covering a location which would be more useful for approximating average bandwith available for an area

Original Implementation

  1. TLE to simulate satellites
  2. Altitude,x,y to conical section on sphere
    1. Adjustable minimum elevation
    2. Swap out for more accurate model of earth (WGS-84 ellipsoid)
  3. Map conical section to equi-rectangular area
  4. Translate to pixel coords with resolution of about 100sq mi
  5. Normalize? Overlay

For the core there is this naive implementation:

for each time step:
    for each pixel:
        convert to lat/long
        for each sat:
            if visible
                increase counter for pixel

This seems like a pretty gross way to do it. We touch every pixel * numSats, when we could reduce to numSats * visible area. However, the math to calculate visible area for a satellite doesn't seem to be a part of any library I've found. This is even more relevant with VLEO satellites since they cover so much less area. I'm not sure how efficient it is to go from sphere to lat/long on an equi-rectangular projection.

Resolution

2 options for spatial resolution in my head originally:

  • 2048 x 1024 = 2,097,152
  • 4096 x 2048 = 8,388,608โ€ฌ

Instead of trying to use a 2d array to represent the footprints and dealing with the spherical nature of the Earth, I am instead going to try and use S2 level 9 cells to track coverage. According to the statistics page of the S2 library, this is about 1537000 cells, so I would need about 12MB of data to track the whole Earth. Each cell covers 324.29km^2 on average.

For temporal resolution: These satellites move across a location quite quickly, using a website like https://findstarlink.com we can find that a whole "train" of Starlink satellites crosses a locations view in about 4 or 5 minutes so our temporal resolution needs to be a minute if not faster if we want accurate results.

S2 based approach

The original implementation has lots of gross properties and requires dealing with many projections. So I tried using a new approach that used ~ equal area tesselated grids. The one I knew about was S2 so I tried that first.

for each time step:
    for each sat:
        calculate footprint
        get cells to cover footprint
        for each cell:
            increment counter

This means we only have to iterate over ~2000 (+/-600?) cells per satellite instead of ~2 million points each. However, this approach seems too slow. Comptuing all the covering cells of each satellite takes about 90s on a single core in Python. While this could be parallelized, I think maybe there are even smarter approaches to consider. Could we maybe just store S2Cap objects and test points against them to count the amount of coverage? What I really like from S2 is that it handles the issues of latitude and longitude meaning different distances at the equator vs the poles.

In the end for plotting, if we used the cell vertices as plotting locations we would cover the whole globe and not oversample at the poles or undersample at the equator.

S2, more like 2Slow... An H3 approach

So S2 was just being way to slow to return cells for a given covering. (90s to simulate one timestep) Now I have to make some guesses about projections for H3 and but it is ~4.5 times faster to simulate a timestep than S2 (now takes 20 seconds on my machine). I'm gonna proceed with the H3 approach for now.

Used constants

  • Earth Mean Equitorial Radius = 6,378.1km
  • Minimum angle for user terminals = 35deg

(It has recently come to my attention that there may be newer data from SpaceX that the minimum user terminal angle would be 25 degrees, so my data may be more conservative. The data I used is from the FCC document linked below.)

Starlink details

From the second reference below I found that Starlink is targeting user terminal minimum angles of 35deg This means that each satellite covers around 600,000km^2 at an altitude of about 340km. However, most of the starlink satellites already in space are elevating or are at 550 km

Stralink TLE's https://celestrak.com/NORAD/elements/starlink.txt

References

starlink-coverage's People

Contributors

sebsebmc avatar uber5001 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

starlink-coverage's Issues

This project "Cell" vs a Starlink "Cell"

This is more of inquiry and request for alignment depending upon the answer, but dishes are currently assigned by Starlink to a "Cell" in which they are scheduled to receive service. Does a "Cell" in this project equate to the same geological area ad Starlink maps them? and if not what data would be needed to deduce a proper alignment (aka how might one assist). Amazing project - Cheers!

Ignore non-operational satellites

Currently there are a number of satellites that are raising orbits or deorbiting. Those should not be used when calculating coverage. Someone recommended looking at the perigee and using a cutoff altitude to ignore satellites that are too low.

IDL (antimeridian) undercounting

At the IDL the polygon passed to H3's polyfill will return no results. This is a documented issue with H3 here: uber/h3#210

In order to fix this, when H3 returns 0 cells, its most likely because the polygon crosses the antimeridian and so the polygon needs to be split into 2 polygons with the antimeridian as the edge between the two.

Stars not showing

The stars representing that a area has 100% coverage only show when you set the a minimum angle to load the dataset to 25 degrees, when you set that to 35 degrees it doesn't show any stars where it should show them.

De first picture shows the 35 degrees option, and the second picture shows the 25 degrees option
sternietzien
sterwelzien

Thanks anyway for the awesome website!

Minimum Earth Station Elevation

As you note in README.md, the minimum elevation angle on the initial 1,584-satellite shell has been approved by the FCC at 25%, moving to 40% once the entire 4,409-satellite system is built out. See https://licensing.fcc.gov/myibfs/download.do?attachment_key=1877671. This modification (SAT-MOD-20190830-00087) was approved on December 19, 2019.

On April 17, 2020, SpaceX applied for a number of changes (SAT-MOD-20200417-00037), including asking for minimum elevation angles down to 25% on most of the constellation, but down to 5% on the high inclination portions. This application has not yet been approved by the FCC. See https://licensing.fcc.gov/myibfs/download.do?attachment_key=2274316.

As far as I know, the V-band constellation minimum elevation angle has not been changed.

The 30k-satellite additional constellation application (SAT-LOA-20200526-00055) also is asking for minimum elevation angles down to 25% on most of the constellation, but down to 5% on the high inclination portions . See https://licensing.fcc.gov/myibfs/download.do?attachment_key=2378671.

Thanks for this very nice visualization!

Coverage within range of ground station

Due to the initial phase of satellites not communicating between satellites, yet... In order to send and receive data from a user terminal, the satellite that your user terminal communicates with must also see a ground station at the same time. Therefore, what is the coverage pattern of the satellites, while being able to contact a ground station and the target grid section at the same time? A checkbox perhaps, enable ground station data coverage?

Indicate age of data

Hi - love the site, but unable to tell how up to date the data being shown is. Would be great if you could add something to indicate that. Thanks!

License?

Could you choose / add a license?
Thanks!

Ops and process improvements

Currently I manually set the date and by hand start 4 python instances of main.py to generate the partial coverage files. Then I manually run the merge and push the new coverage file to GitHub. The process should be turned into a bash script with configurable number of processes and at least do the merge automatically at the end.

For historical purposes I would like to keep the old coverage files, so the final coverage file names should contain the date they were generated for.

FIll in missing indices

When generating the full file for a day, the areas near the north and south pole never get any coverage so we need to insert those indexes into the file.

This should fill the missing parts of the visualization

Additional stats

There are a couple of statistics that should be relatively easy to develop into this kind of simulation. This issue will track ideas until they start to get broken out into their own issues.

  • Calculating average time between gaps. At higher resolutions this will become an average of averages which is unfortunate. This should give an idea of how spotty/intermittent service is.

Help: 'failures_url' seems outdated...

In the main.py the failures_url link seems not working. There are a few URL redirects and it seems the data is not downloaded. Here is the output when I run the main.py:

Loaded 2568 satellites
Traceback (most recent call last):
File "main.py", line 201, in
op_sats = filter_sats(sats)
File "main.py", line 61, in filter_sats
name = row{'NAME'].strip()
KeyError: 'NAME'

Could you let me know how to fix this problem?
Thanks a lot for sharing the code and thanks for your support.

Thanks!!

Formula issue

Currently I am trying to run your program to generate the data using the scripts you provided, gen_cov.sh, my first remark is that the encoding for end-of-line is not unix standard in your python sources, i.e. DOS instead of Unix. Second, I ran in an issue when running the forementioned script : sh gen_cov.py. Here's the outcome :

Sat 02 Jan 2021 05:58:48 PM CET
Loaded 897 satellites
Filtered to 659 operational satellites
2020-07-25T00:00:00Z
Traceback (most recent call last):
  File "/tmp/starlink-coverage/./main.py", line 246, in <module>
    angle = calcCapAngle(sat.elevation.km, MIN_TERMINAL_ANGLE_DEG)
  File "/tmp/starlink-coverage/./main.py", line 100, in calcCapAngle
    eta_FOV = math.asin((math.sin(epsilon + RIGHT_ANGLE)
ValueError: math domain error
Loaded 897 satellites
Filtered to 659 operational satellites
2020-07-25T18:00:00Z
Traceback (most recent call last):
  File "/tmp/starlink-coverage/./main.py", line 246, in <module>
    angle = calcCapAngle(sat.elevation.km, MIN_TERMINAL_ANGLE_DEG)
  File "/tmp/starlink-coverage/./main.py", line 100, in calcCapAngle
    eta_FOV = math.asin((math.sin(epsilon + RIGHT_ANGLE)
ValueError: math domain error
Loaded 897 satellites
Filtered to 659 operational satellites
2020-07-25T12:00:00Z
Traceback (most recent call last):
  File "/tmp/starlink-coverage/./main.py", line 246, in <module>
    angle = calcCapAngle(sat.elevation.km, MIN_TERMINAL_ANGLE_DEG)
  File "/tmp/starlink-coverage/./main.py", line 100, in calcCapAngle
    eta_FOV = math.asin((math.sin(epsilon + RIGHT_ANGLE)
ValueError: math domain error
Loaded 897 satellites
Filtered to 659 operational satellites
2020-07-25T06:00:00Z
Traceback (most recent call last):
  File "/tmp/starlink-coverage/./main.py", line 246, in <module>
    angle = calcCapAngle(sat.elevation.km, MIN_TERMINAL_ANGLE_DEG)
  File "/tmp/starlink-coverage/./main.py", line 100, in calcCapAngle
    eta_FOV = math.asin((math.sin(epsilon + RIGHT_ANGLE)
ValueError: math domain error
mv: cannot stat 'h3_4_cov_full.txt': No such file or directory
  File "/tmp/starlink-coverage/./merge_cover.py", line 36
    res4_cells = h3.h3_to_children(base_cell, 4)
IndentationError: unexpected indent

Could you help me troubleshoot the situation?

Identifying cell IDs within USA

Is there is a way for identifying cell IDs that are within US territory? I am trying to calculate the % coverage for the cells within the US territory.
Do you think the global performance (% coverage) is similar to the performance of the cells in the US territory?

Thanks!!

Highlight 100% uptime cells

If a cell gets ~100% uptime the cell outline could be changed to gold or some other color with good contrast to blue, yellow, and red. Because currently we only show resolution 2 cells and those use averages we don't expect to have any res 2 cells with 100% coverage. Maybe a 99.9% uptime would be enough to highlight?

Optimize coverage file

There are a lot of ways to compress the file to make it smaller and also to reduce the memory usage of the coverage data when loaded.

Zoom levels and higher resolution cells

Currently the data is simulated at resolution 4, and loaded at resolution 4 but for the sake of getting something out the door I render at resolution 2 right now. I want to add a slider or calculate based on the render distance (because Cesium doesn't have a concept of zoom levels) when to switch between rendered resolutions.

Hover info on viz

It would be beneficial to show some stats of a cell when mousing over it. This would improve things like readability of the coverage percentage, especially when over land vs water where they appear very differently due to the opacity and contrast.

perigee > 540

Hi,
Thank you for your this.

Just wanted to ask, what is the reason why you exclude satellites with perigee less than 540?

Regards,
Bryan

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.