3 ms·
I don't think visibility would be all that hard to compute for the purposes of this site; I did similar calculations for radio "visibility" once (four thirds ea
by btschaegg 4y ago
I don't think visibility would be all that hard to compute for the purposes of this site; I did similar calculations for radio "visibility" once (four thirds earth radius etc.):
- Choose a grid of square cells of appropriate size (can be quite large here)
- Put it on a plane tangential to an idealized flat earth ground at the center (easy in ECEF)
- Offset by the desired height
- Perform a "raycast" from the center cell to the center of each other cell
- Calculate elevation from interpolated SRTM data along the way and store the maximum elevation* along the path (idea: something similar to DDA traversal through the SRTM data? Wouldn't be exactly linear, though…)
- You can pretty much derive anything via linear algebra from there
* "Elevation" from the viewpoint of the chosen plane, obviously.
- jvanderbot 4y agoVisibility is not hard to compute. I said you could use "viewshed", which is the usual method of calculating line of sight to a given point from all points in an area. But it is a computationally intensive task to take a large enough area to accommodate any arbitrary asteroid impact. Orders of magnitude more than a web response, even accounting for down sampling and heuristics to restrict the size of the compute area. Almost any GIS software package can do it for you. https://en.m.wikipedia.org/wiki/Viewshed https://en.m.wikipedia.org/wiki/Viewshed What you're suggesting is that, except you didn't account for curvature of earth.
- btschaegg 4y ago> Orders of magnitude more than a web response That's likely where our different assesments come from, then. I was thinking more along the lines of "it's parallalelizable and easily offloaded to the client". An addendum for completeness' sake, though :) > What you're suggesting is that Not entirely. I'd build a LUT of "how high up must you be to be visible here" per "pixel", instead of "is the ground here visible", which I'd argue is more useful for modelling here. > except you didn't account for curvature of earth I didn't spell it out explicitly, but that's not the case if you do your projections right. (And you have to project, as SRTM data is always relative to the EGM96 geoid.)