-
Notifications
You must be signed in to change notification settings - Fork 36
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/mono
Mono
- Loading branch information
Showing
7 changed files
with
581 additions
and
71 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,284 @@ | ||
{ | ||
"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": 38, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"broker=\"192.168.1.47\" # update with the IP for the Raspberry PI" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 1, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"Requirement already satisfied: paho-mqtt in /Users/lberndt/opt/anaconda3/lib/python3.8/site-packages (1.5.0)\r\n" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"!pip install paho-mqtt" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 42, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"import paho.mqtt.client as mqtt\n", | ||
"import json" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 17, | ||
"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": 69, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/plain": [ | ||
"<paho.mqtt.client.MQTTMessageInfo at 0x7f8d01045a90>" | ||
] | ||
}, | ||
"execution_count": 69, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"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": 58, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/plain": [ | ||
"<paho.mqtt.client.MQTTMessageInfo at 0x7f8d0104a270>" | ||
] | ||
}, | ||
"execution_count": 58, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"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": 56, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/plain": [ | ||
"<paho.mqtt.client.MQTTMessageInfo at 0x7f8d0104a220>" | ||
] | ||
}, | ||
"execution_count": 56, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"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": 70, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/plain": [ | ||
"<paho.mqtt.client.MQTTMessageInfo at 0x7f8d01054680>" | ||
] | ||
}, | ||
"execution_count": 70, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"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": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [] | ||
}, | ||
{ | ||
"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": 65, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/plain": [ | ||
"<paho.mqtt.client.MQTTMessageInfo at 0x7f8d01048a90>" | ||
] | ||
}, | ||
"execution_count": 65, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"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": 62, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/plain": [ | ||
"<paho.mqtt.client.MQTTMessageInfo at 0x7f8d01052ef0>" | ||
] | ||
}, | ||
"execution_count": 62, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"client.connect(broker)\n", | ||
"data = {}\n", | ||
"data['minElevation'] = 45 # Update this Value\n", | ||
"json_data = json.dumps(data)\n", | ||
"client.publish(\"skyscan/config/json\",json_data)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [] | ||
} | ||
], | ||
"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.8.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
Oops, something went wrong.