Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
# ascom-ui
# ascom-ui

cd into /ascom-ui
then use the command: docker compose -f docker-compose.yml up --build

then command: docker build -t davidruddell/ascom-streamlit:latest .

now we run the streamlit app
use command: docker run --rm -e PYTHONUNBUFFERED=1 -p 8501:8501 davidruddell/ascom-streamlit:latest

to accesss streamlit app, on google go to localhost:8501
42 changes: 42 additions & 0 deletions pages/1_🌎_TLE_file.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import streamlit as st
import time
import numpy as np

st.set_page_config(page_title="Telescope App", page_icon="🔭", layout="wide")

st.title("TLE File / Settings")
st.sidebar.header("TLE File / Settings")

uploaded_file = st.file_uploader("Select TLE file", type=["tle"], accept_multiple_files=False)
if uploaded_file is not None:
for i in range(len(uploaded_file)):
head, sep, tail = str(uploaded_file[i].name).partition(".")
st.write("file name:"+str(head))
st.write("file type:"+str(tail))
st.write(uploaded_file)

c1, c2, c3 = st.columns(3)

with c1:
num_images = st.number_input('Number of images', min_value = 1, max_value=None, value=1, key = 1)

expose_time = st.number_input('Expose time', min_value = 0.0, max_value=None, value=1.0, key = 2)

max_visits_per_field = st.number_input('Max visits per field', min_value = 1, max_value=None, value=5, key = 3)

st.write('')
st.write('Shutdown time')

col1, col2, col3, col4, col5, col6, col7 = st.columns(7)
with col1:
hour = st.number_input('Hour (0-23)', min_value = 0, max_value=23, value=19, key = 4)

with col2:
minute = st.number_input('Minute (0-59)', min_value = 0, max_value=59, value=35, key = 5)


st.write('Current number of images:', num_images)
st.write('Current expose time:', expose_time, 'seconds')
st.write('Current max visits per field:', max_visits_per_field)
st.write('Current hour:', hour)
st.write('Current minute:', minute)
28 changes: 24 additions & 4 deletions 🏠_Home.py → 🔭_Home.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,30 @@
import streamlit as st

st.title("Telescope App")

import time
import numpy as np
from alpaca.telescope import * # Multiple Classes including Enumerations
from alpaca.exceptions import * # Or just the exceptions you want to catch
import streamlit as st

st.set_page_config(page_title="Telescope App", page_icon="🔭")

st.title("🔭 Telescope App")

st.sidebar.header("TXT File / Launch")


uploaded_file = st.file_uploader("Select txt file", type=["txt"], accept_multiple_files=False)
if uploaded_file is not None:
for i in range(len(uploaded_file)):
head, sep, tail = str(uploaded_file[i].name).partition(".")
st.write("file name:"+str(head))
st.write("file type:"+str(tail))
st.write(uploaded_file)

col1, col2, col3, col4, col5, col6, col7 = st.columns(7)
with col1:
if st.button('Launch'):
st.write('Launching!')


T = Telescope('host.docker.internal:80', 0) # Local Omni Simulator

Expand All @@ -28,4 +48,4 @@
print(f'Slew failed: {str(e)}')
finally: # Assure that you disconnect
print("Disconnecting...")
T.Connected = False
T.Connected = False