Skip to content

Commit

Permalink
[nasa/nos3#339] Updates to attempt to use AIT-GUI directly;
Browse files Browse the repository at this point in the history
  • Loading branch information
jlucas9 committed Oct 8, 2024
1 parent e8a2763 commit ece9bea
Show file tree
Hide file tree
Showing 6 changed files with 228 additions and 34 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -161,5 +161,5 @@ cython_debug/
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

gswait/config/cmd.pkl
gswait/config/leapseconds.dat
*.pkl
*.pcap
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,8 @@ The following are the default ports for communication with various endpoints and
AIT does nor currently support some command data types (such as strings or bytearrays) and consequently some nos3 commands cannot be implemented yet using AIT. At the time of writing, approx 95% of telemetry and command packets are implemented.

Additionally, the API needs to be extended to provide full functionality. Currently many endpoints are stubbed, faked or not implemented. Further work needs to be done on creating cookies and secure session. Core realtime telemetry and commanding ARE implemented.

# Credit
We must credit all the contributors listed in this repository who enabled this work.
In particular, Spinx Defense Inc. and @cjjacks who revitalized the AIT inclusion into NOS3.
* https://github.com/sphinxdefense
37 changes: 5 additions & 32 deletions gswait/config/config.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
default:
database:
host: influxdb
port: 8086
un: root
pw: root

extensions:
ait.core.cmd.Cmd: gswait.cmd.NOS3Cmd

command:
history:
filename: ../../cmdhist.pcap
port: 3075

logging:
Expand All @@ -21,17 +17,10 @@ default:
tlmdict:
filename: tlm.yaml


missions:
- nos3:
equipment: "ADCS IMU MAG NOVATEL_OEM615 ARDUCAM FSS STAR_TRACKER RADIO EPS TORQUER REACTION_WHEEL CFS CFDP CSS SYN SAMPLE"
commands:
# DEBUG
- commandString: DEBUG
description: "Sends 'hello'"
commandId: 0x9999
mnemonicIds: []

# ADCS
- commandString: ADCS_NOOP_CC
description: This command sets the operational mode
Expand Down Expand Up @@ -1017,18 +1006,13 @@ default:
server:
plugins:
- plugin:
name: ait.core.server.plugins.DataArchive
inputs:
- telem_stream
datastore:
ait.core.db.InfluxDBBackend

- plugin:
name: gswait.plugins.AITWebsocket
name: ait.gui.AITGUIPlugin
inputs:
- telem_stream
outputs:
- command_stream
html:
directory: ../../gui
inbound-streams:
- stream:
name: telem_stream
Expand Down Expand Up @@ -1102,18 +1086,7 @@ default:
2200: "CFS_SCH_DIAGPACKET"
2199: "CFS_SCH_HKPACKET"
2218: "CFS_SC_HKTLM"

packet_secondary_header_length: 10
# - stream:
# name: telem_stream
# input:
# - "UDP"
# - "0.0.0.0"
# - 5013
# handlers:
# - name: gswait.handlers.DebugHandler


outbound-streams:
- stream:
name: command_stream
Expand Down
Binary file added gswait/config/leapseconds.dat
Binary file not shown.
132 changes: 132 additions & 0 deletions gui/css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
body
{
padding: 70px 0 300px 0;
}

td
{
padding: 1px 5px 1px 5px;
vertical-align: middle;
}

table.telem
{
width: 100%;
}

table.telem td
{
font-weight: bold;
}

table.telem.col2 td
{
width: 25%;
}

table.telem.col4 td
{
width: 12.5%;
}

.bottom-nav
{
padding: 5px;
}

.logging-table
{
font-family: Courier, monospace;
height: 75px;
max-height: 75px;
}

.logging-table table
{
background: transparent;
border: 0;
margin: 0;
vertical-align: baseline;
width: 100%;
}

.logging-table tr, .logging-table td
{
padding: 1px 8px 1px 8px;
}

.logs-tab
{
height: 100px;
margin: 10px;
}

.sim-btn
{
text-transform: capitalize;
}

.sim-btn .start
{
color: green;
}

.sim-btn .stop
{
color: red;
}

.status-on
{
color: green;
}

.status-off
{
color: #999;
}

.status-pending
{
color: yellow;
}

.telem-group-title
{
background-color: #f5f5f5;
border: 1px solid #e3e3e3;
border-radius: 3px;
padding: 3px;
text-align: center;
}

.telem-group-temp
{
background-color: powderblue;
border: 1px solid #e3e3e3;
border-radius: 1px;
padding: 0px;
text-align: center;
}

.telem-group-htr
{
background-color: Orange;
border: 1px solid #e3e3e3;
border-radius: 1px;
padding: 0px;
text-align: center;
}

.typeahead-heading
{
border-bottom: 1px solid #ccc;
margin: 0 20px 5px 20px;
padding: 3px 0;
text-align: center;
}

#cmd-input-group .tt-menu {
max-height: 150px;
overflow-y: auto;
}
84 changes: 84 additions & 0 deletions gui/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<!doctype html>
<head>
<link rel="stylesheet" href="ait/gui/static/build/ait.bundle.css">
<link rel="stylesheet" href="css/style.css">
<script src="ait/gui/static/build/ait.bundle.js"></script>
<style> tr:nth-child(even) {background-color: #f2f2f2;} </style>
</head>

<body>

<!-- Status Bar -->
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="#">AIT-NOS3</a><br>
</div> <!-- /.navbar-header -->

<ul class="nav navbar-nav navbar-right">
<li>
<p class="navbar-text">Telemetry Status:</p>
</li>
<li>
<p class="navbar-text ait-status-indicators">
<ait-led on = "ait:tlm:packet"
off = "ait:tlm:close"
pending = "ait:tlm:open"
error = "ait:tlm:stale"
default = "pending"></ait-led>
cFS
</p>
</li>
<li>
<ait-clock class="navbar-text" doy="true"></ait-clock>
</li>
</ul> <!-- /.navbar-right -->
</div> <!-- /.container-fluid -->
</div> <!-- /.navbar -->

<div class='site-container'>
<div class='telemcontainer'>
<ait-tabset class="nav-tabs">
<ait-tab title="CFS_CF_HKPACKET">
<table class="telem col1">
<tr><td>CMDCOUNTER:<td><ait-field packet="CFS_CF_HKPACKET" name="CMDCOUNTER"></ait-field></tr>
<tr><td>ERRCOUNTER:<td><ait-field packet="CFS_CF_HKPACKET" name="ERRCOUNTER"></ait-field></tr>
</table>
</ait-tab>
</ait-tabset>
</div>


<div class='ctrlcontainer'>
<ait-tabset class='nav-tabs'>
<ait-tab title='Commanding'>
<div class='cmd-tab-container'>
<div class="cmd-browser-container">
<ait-command-search>
</ait-command-search>
</div>
<div class="cmd-config-container">
<ait-command-configure>
</ait-command-configure>
</div>
<div class='cmd-search-container'>
<ait-command-input></ait-command-input>
<hr />
</div>
</div>
</ait-tab>
<ait-tab title='Command History'>
<div class="row">
<div class="col-lg-12">
<div style="height:200px;overflow:auto;">
<ait-command-history></ait-command-history>
</div>
</div>
</div>
</ait-tab>
</ait-tabset>
</div>
</div>


</body>

0 comments on commit ece9bea

Please sign in to comment.