-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from IQTLabs/notebook-server
Notebook server
- Loading branch information
Showing
3 changed files
with
205 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,187 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# SkyScan Config\n", | ||
"Make temporary changes to a running SkyScan instance. It will revert back to the values in the environment file when restart." | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"broker=\"mqtt\" # update with the IP for the Raspberry PI" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"import paho.mqtt.client as mqtt\n", | ||
"import json" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"client = mqtt.Client(\"notebook-config\")" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Camera Zoom\n", | ||
"This is how much the camera is zoomed in. It is an Int number between 0-9999 (max)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"client.connect(broker)\n", | ||
"data = {}\n", | ||
"data['cameraZoom'] = 9999 # Update this Value\n", | ||
"json_data = json.dumps(data)\n", | ||
"client.publish(\"skyscan/config/json\",json_data)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Camera Delay\n", | ||
"Float value for the number of seconds to wait after sending the camera move API command, before sending the take picture API command." | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"client.connect(broker)\n", | ||
"data = {}\n", | ||
"data['cameraDelay'] = 0.25 # Update this Value\n", | ||
"json_data = json.dumps(data)\n", | ||
"client.publish(\"skyscan/config/json\",json_data)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Camera Move Speed\n", | ||
"This is how fast the camea will move. It is an Int number between 0-99 (max)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"client.connect(broker)\n", | ||
"data = {}\n", | ||
"data['cameraMoveSpeed'] = 99 # Update this Value\n", | ||
"json_data = json.dumps(data)\n", | ||
"client.publish(\"skyscan/config/json\",json_data)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Camera Lead\n", | ||
"This is how far the tracker should move the center point in front of the currently tracked plane. It is a float, and is measured in seconds, example: 0.25 . It is based on the planes current heading and how fast it is going. " | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"client.connect(broker)\n", | ||
"data = {}\n", | ||
"data['cameraLead'] = 0.45 # Update this Value\n", | ||
"json_data = json.dumps(data)\n", | ||
"client.publish(\"skyscan/config/json\",json_data)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Camera Bearing\n", | ||
"This is a float to correct the cameras heading to help it better align with True North. It can be from -180 to 180. " | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"client.connect(broker)\n", | ||
"data = {}\n", | ||
"data['cameraBearing'] = -2 # Update this Value\n", | ||
"json_data = json.dumps(data)\n", | ||
"client.publish(\"skyscan/config/json\",json_data)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Minimum Elevation\n", | ||
"The minimum elevation above the horizon which the Tracker will follow an airplane. Int value between 0-90 degrees." | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"client.connect(broker)\n", | ||
"data = {}\n", | ||
"data['minElevation'] = 20 # Update this Value\n", | ||
"json_data = json.dumps(data)\n", | ||
"client.publish(\"skyscan/config/json\",json_data)" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.7.3" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 4 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM python:3 | ||
|
||
RUN apt-get update | ||
RUN pip3 install --upgrade pip | ||
RUN pip3 install jupyter paho-mqtt | ||
RUN mkdir /opt/notebooks | ||
COPY ./Config.ipynb /opt/notebooks | ||
|
||
ENTRYPOINT jupyter notebook --notebook-dir=/opt/notebooks --ip='*' --port=8888 --no-browser --allow-root --NotebookApp.token='' --NotebookApp.password='' |