-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cesium visualization #40
base: master
Are you sure you want to change the base?
Conversation
On a related note, I think the CZML exporter is slightly wrong. I would assume that AOS and LOS points be equidistant to the ground station, but the example of observation 1276 shows otherwise. |
@fivitti, compared to the old code we used long time ago, Cesium made substantial steps forward. There are official typescript bindings. I've split some of the code into small utility files that are easy to reuse or remove. |
README.md
Outdated
@@ -1,6 +1,6 @@ | |||
[![Build Status](https://travis-ci.com/gut-space/aquarius.svg?branch=master)](https://travis-ci.com/gut-space/aquarius) | |||
|
|||
<img align="right" width="128" height="128" src="https://github.com/gut-space/satnogs/blob/master/doc/logo.png"> | |||
<img align="right" width="128" height="128" src="https://github.com/gut-space/aquarius/blob/master/doc/logo.png"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably should be "Svarog". :)
cesium/index.html
Outdated
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<!-- Make the application on mobile take up the full browser screen and disable user scaling. --> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"> | ||
<title>Aquarius</title> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Old name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed.
<style> | ||
html, | ||
body, | ||
#cesiumContainer { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mishmash in naming style. CSS class name should lower case with dashes.
|
||
import * as Cesium from "cesium"; | ||
|
||
const CZML_URL = 'http://localhost:8080/czml/obs/'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be a local absolute adress? Probably it should be relative or read from configuration.
doc/cesium.md
Outdated
```shell | ||
cd server | ||
source venv/bin/activate | ||
./aquarius-web.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Old name.
# have several packets. First setting the timeframe, second will be the sat, third | ||
# will be the ground track. There may be more. Anyway, this code is basic, but seems | ||
# to be working well. | ||
txt = "[\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use '[\n' + ',\n'.join(str(p) for p in extractor.packets) + ']\n'
|
||
RE = orb.attractor.R | ||
|
||
descr = "<p>NORAD ID = <b>%d</b></p>\n" % norad_id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid generating HTML in Python.
server/app/routes.py
Outdated
@@ -14,4 +15,14 @@ def favicon(): | |||
|
|||
@app.route('/data/<path:path>') | |||
def send_js(path): | |||
return send_from_directory('data', path) | |||
return send_from_directory('/home/thomson/devel/aquarius/server/data', path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Old name
|
||
# This is required for handling debug deployment, where Cesium is running on localhost:9000, | ||
# and the Flask is on localhost:8080. | ||
headers = {'Access-Control-Allow-Origin': '*'} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This header should be added only to the development environment.
Postgresql: testing.postgresql.PostgresqlFactory | ||
|
||
def setUpModule(): | ||
global Postgresql |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Variable names should start with lower case.
Okay, this needs to be redone. |
The goal of this PR is to address the last open item in #9 - to use Cesium to visualize passes on 3D globe.
Two screenshots how this code looks like:
The code is now ready for review. Here's a couple comments:
/czml/obs/1234
URL and will return CZML file.?obs_id=1234
. This is useful for redirecting from other pages. Second, you can type the observation number and click load. This is useful if you are already on the page, but want to look at different observation.For the time being it's not possible to show multiple observations at the same time. It may be in the future, but the CZML exporter will have to be tweaked slightly. The problem right now is it's always having the document packet, which determines the start and end of the simulation period.