diff --git a/.gitmodules b/.gitmodules index bba13436..c2767ffd 100644 --- a/.gitmodules +++ b/.gitmodules @@ -40,9 +40,6 @@ [submodule "sims/sim_terminal"] path = sims/sim_terminal url = https://github.com/nasa-itc/sim_terminal.git -[submodule "gsw/ait"] - path = gsw/ait - url = https://github.com/nasa-itc/gsw-ait.git [submodule "gsw/OrbitInviewPowerPrediction"] path = gsw/OrbitInviewPowerPrediction url = https://github.com/nasa-itc/OrbitInviewPowerPrediction.git @@ -131,6 +128,14 @@ path = components/syn url = https://github.com/nasa-itc/syn.git branch = main +[submodule "gsw/ait"] + path = gsw/ait + url = https://github.com/sphinxdefense/gsw-ait.git + branch = main +[submodule "gsw/ttc-command"] + path = gsw/ttc-command + url = https://github.com/sphinxdefense/ttc-command + branch = main [submodule "components/generic_thruster"] path = components/generic_thruster url = https://github.com/nasa-itc/generic_thruster.git diff --git a/cfg/nos3_defs/tables/sc_rts001.c b/cfg/nos3_defs/tables/sc_rts001.c index f3a5cba6..9276f816 100644 --- a/cfg/nos3_defs/tables/sc_rts001.c +++ b/cfg/nos3_defs/tables/sc_rts001.c @@ -62,7 +62,7 @@ SC_RtsTable001_t SC_Rts001 = { /* 2 - Enable Debug */ .hdr2.TimeTag = 1, .cmd2.CmdHeader = CFE_MSG_CMD_HDR_INIT(TO_LAB_CMD_MID, SC_MEMBER_SIZE(cmd2), TO_LAB_OUTPUT_ENABLE_CC, 0x00), - .cmd2.Payload.dest_IP = "cosmos", + .cmd2.Payload.dest_IP = "active-gs", /* 3 - Enable RTS 3-64 */ .hdr3.TimeTag = 1, diff --git a/components/sample b/components/sample index 7845664c..34260dd8 160000 --- a/components/sample +++ b/components/sample @@ -1 +1 @@ -Subproject commit 7845664c3ed42e4aa83d04fae1b507099ae21b55 +Subproject commit 34260dd8a8d929b6d36c8805f08754aa847d6e97 diff --git a/fsw/apps/ds b/fsw/apps/ds index d17e750b..3f273f6a 160000 --- a/fsw/apps/ds +++ b/fsw/apps/ds @@ -1 +1 @@ -Subproject commit d17e750bec8ec9a2cfbcd32f5633dafaf919bc40 +Subproject commit 3f273f6a552c1fb408b989ac0d78743452d3dbc3 diff --git a/fsw/apps/hwlib b/fsw/apps/hwlib index 9c4dc2a1..cf82b544 160000 --- a/fsw/apps/hwlib +++ b/fsw/apps/hwlib @@ -1 +1 @@ -Subproject commit 9c4dc2a169f220c515629e5e8cc1a60929605035 +Subproject commit cf82b54413a007e79f534234733f113359660eb3 diff --git a/fsw/apps/sc b/fsw/apps/sc index bb3e6945..37e919b7 160000 --- a/fsw/apps/sc +++ b/fsw/apps/sc @@ -1 +1 @@ -Subproject commit bb3e6945830b7e6cd7a3d25fa00969ac2c4f7be6 +Subproject commit 37e919b76b1a34fc93917d636dfc5f238de72945 diff --git a/fsw/osal b/fsw/osal index 9c9b9f6d..570ad091 160000 --- a/fsw/osal +++ b/fsw/osal @@ -1 +1 @@ -Subproject commit 9c9b9f6dd75b7b3adaf9021040db3d112ef709e5 +Subproject commit 570ad0913daf57ad2a62c92f6a0daef5a94f72ba diff --git a/fsw/psp b/fsw/psp index cd5546b9..6699a3df 160000 --- a/fsw/psp +++ b/fsw/psp @@ -1 +1 @@ -Subproject commit cd5546b9b873fb50a5a7154d4072356dc6ba042e +Subproject commit 6699a3df30985d825d0743f531eb710600f47bc8 diff --git a/gsw/ait b/gsw/ait new file mode 160000 index 00000000..478a6c8a --- /dev/null +++ b/gsw/ait @@ -0,0 +1 @@ +Subproject commit 478a6c8a0adb5066545732ce2b0f927f0be7420f diff --git a/gsw/cosmos b/gsw/cosmos index a8d96bc4..50c889a4 160000 --- a/gsw/cosmos +++ b/gsw/cosmos @@ -1 +1 @@ -Subproject commit a8d96bc426554cd09ee332e78ea4d5e3982f4623 +Subproject commit 50c889a4f6ad21bd0dbc6e32254252a435e57770 diff --git a/scripts/configure.py b/scripts/configure.py index 63c25ee9..016cc5d3 100755 --- a/scripts/configure.py +++ b/scripts/configure.py @@ -31,6 +31,11 @@ gsw_identified = 1 os.system('cp ./scripts/gsw_cosmos_build.sh ./cfg/build/gsw_build.sh') os.system('cp ./scripts/gsw_cosmos_launch.sh ./cfg/build/gsw_launch.sh') +if (gsw_cfg == 'ait'): + # Copy ait scripts into ./cfg/build + gsw_identified = 1 + os.system('cp ./scripts/gsw_ait_build.sh ./cfg/build/gsw_build.sh') + os.system('cp ./scripts/gsw_ait_launch.sh ./cfg/build/gsw_launch.sh') if (gsw_identified == 0): print('Invalid GSW in configuration file!') print('Exiting due to error...') diff --git a/scripts/docker_launch.sh b/scripts/docker_launch.sh index c095f9b7..ae11afd9 100755 --- a/scripts/docker_launch.sh +++ b/scripts/docker_launch.sh @@ -50,9 +50,10 @@ $DNETWORK create \ nos3_core echo "" -#echo "Launch GSW..." -$BASE_DIR/cfg/build/gsw_launch.sh -echo "" + +echo "Launch GSW..." +source $BASE_DIR/cfg/build/gsw_launch.sh + echo "Create NOS interfaces..." export GND_CFG_FILE="-f nos3-simulator.xml" @@ -81,8 +82,15 @@ do $DNETWORK create $SC_NETNAME 2> /dev/null echo "" - echo $SC_NUM " - Connect COSMOS to spacecraft network..." - $DNETWORK connect $SC_NETNAME cosmos_openc3-operator_1 --alias cosmos + alias="cosmos" + if [ "${GSW:-cosmos_openc3-operator_1}" == "ait" ]; then + alias="ait" + docker run --rm -d -h influxdb --name influxdb -p 8086:8086 -e INFLUXDB_DB=$INFLUXDB_DB -e INFLUXDB_ADMIN_USER=$INFLUXDB_ADMIN_USER -e INFLUXDB_ADMIN_PASSWORD=$INFLUXDB_ADMIN_PASSWORD --network=nos3_core influxdb:1.8 + docker run --rm -d --name ttc-command -p 80:80 --network=nos3_core ghcr.io/sphinxdefense/ttc-command:main + fi + + echo $SC_NUM " - Connect GSW " "${GSW:-cosmos_openc3-operator_1}" " to spacecraft network..." + $DNETWORK connect $SC_NETNAME "${GSW:-cosmos_openc3-operator_1}" --alias $alias --alias active-gs echo "" echo $SC_NUM " - 42..." @@ -94,6 +102,8 @@ do echo $SC_NUM " - Flight Software..." cd $FSW_DIR + + gnome-terminal --title=$SC_NUM" - NOS3 Flight Software" -- $DFLAGS -v $BASE_DIR:$BASE_DIR --name $SC_NUM"_nos_fsw" -h nos_fsw --network=$SC_NETNAME -w $FSW_DIR --sysctl fs.mqueue.msg_max=10000 --ulimit rtprio=99 --cap-add=sys_nice $DBOX $SCRIPT_DIR/fsw_respawn.sh & #gnome-terminal --window-with-profile=KeepOpen --title=$SC_NUM" - NOS3 Flight Software" -- $DFLAGS -v $BASE_DIR:$BASE_DIR --name $SC_NUM"_nos_fsw" -h nos_fsw --network=$SC_NETNAME -w $FSW_DIR --sysctl fs.mqueue.msg_max=10000 --ulimit rtprio=99 --cap-add=sys_nice $DBOX $FSW_DIR/core-cpu1 -R PO & echo "" diff --git a/scripts/docker_stop.sh b/scripts/docker_stop.sh index 15c4ebbb..bcb11dcd 100755 --- a/scripts/docker_stop.sh +++ b/scripts/docker_stop.sh @@ -18,6 +18,9 @@ rm -rf $BASE_DIR/fsw/build/exe/cpu1/scratch/* cd $SCRIPT_DIR; $DFLAG compose down > /dev/null 2>&1 $DCALL ps --filter=name="sc_*" -aq | xargs $DCALL stop > /dev/null 2>&1 & $DCALL ps --filter=name="nos_*" -aq | xargs $DCALL stop > /dev/null 2>&1 & +$DCALL ps --filter=name="ait*" -aq | xargs $DCALL stop > /dev/null 2>&1 & +$DCALL ps --filter=name="influxdb*" -aq | xargs $DCALL stop > /dev/null 2>&1 & +$DCALL ps --filter=name="ttc-command*" -aq | xargs $DCALL stop > /dev/null 2>&1 & $DCALL ps --filter ancestor="ballaerospace/cosmos:4.5.0" -aq | xargs $DCALL stop > /dev/null 2>&1 & # Intentionally wait to complete diff --git a/scripts/env.sh b/scripts/env.sh index 3030e8d1..c7e59e71 100755 --- a/scripts/env.sh +++ b/scripts/env.sh @@ -22,6 +22,10 @@ USER_NOS3_DIR=$(cd ~/ && pwd)/.nos3 OPENC3_DIR=$USER_NOS3_DIR/cosmos OPENC3_PATH=$OPENC3_DIR/openc3.sh +INFLUXDB_DB=ait +INFLUXDB_ADMIN_USER=ait +INFLUXDB_ADMIN_PASSWORD=admin_password + ### ### Notes: ### Podman and/or Docker on RHEL not yet supported diff --git a/scripts/gsw_ait_build.sh b/scripts/gsw_ait_build.sh new file mode 100755 index 00000000..acb0dc8f --- /dev/null +++ b/scripts/gsw_ait_build.sh @@ -0,0 +1,10 @@ +#!/bin/bash -i +# +# Convenience script for NOS3 development +# + +CFG_BUILD_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) +SCRIPT_DIR=$CFG_BUILD_DIR/../../scripts +source $SCRIPT_DIR/env.sh + +echo "AIT build..." diff --git a/scripts/gsw_ait_launch.sh b/scripts/gsw_ait_launch.sh new file mode 100755 index 00000000..7158d5d2 --- /dev/null +++ b/scripts/gsw_ait_launch.sh @@ -0,0 +1,12 @@ +#!/bin/bash -i +# +# Convenience script for NOS3 development +# + +CFG_BUILD_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) +SCRIPT_DIR=$CFG_BUILD_DIR/../../scripts +source $SCRIPT_DIR/env.sh +export GSW="ait" + +echo "AIT launch..." +gnome-terminal --tab --title="AIT" -- docker run --rm -it -v $BASE_DIR:$BASE_DIR -v /tmp/nos3:/tmp/nos3 --name ait -h ait -p 8001:8001 --network=nos3_core ghcr.io/sphinxdefense/gsw-ait:main "source ~/.bashrc && ait-server" diff --git a/scripts/gsw_cosmos_launch.sh b/scripts/gsw_cosmos_launch.sh index dcc159b6..9d41b671 100755 --- a/scripts/gsw_cosmos_launch.sh +++ b/scripts/gsw_cosmos_launch.sh @@ -6,6 +6,7 @@ CFG_BUILD_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) SCRIPT_DIR=$CFG_BUILD_DIR/../../scripts source $SCRIPT_DIR/env.sh +export GSW="cosmos_openc3-operator_1" # Debugging #echo "Script directory = " $SCRIPT_DIR diff --git a/scripts/gsw_openc3_launch.sh b/scripts/gsw_openc3_launch.sh index 6cd6fcf2..11d306a5 100755 --- a/scripts/gsw_openc3_launch.sh +++ b/scripts/gsw_openc3_launch.sh @@ -6,6 +6,7 @@ CFG_BUILD_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) SCRIPT_DIR=$CFG_BUILD_DIR/../../scripts source $SCRIPT_DIR/env.sh +export GSW="cosmos_openc3-operator_1" # Debugging #echo "Script directory = " $SCRIPT_DIR diff --git a/scripts/prepare.sh b/scripts/prepare.sh index 7c75b276..49b30ee3 100755 --- a/scripts/prepare.sh +++ b/scripts/prepare.sh @@ -26,6 +26,16 @@ $DCALL image pull ballaerospace/cosmos:4.5.0 echo "" echo "" +echo "Prepare ait docker container..." +$DCALL image pull ghcr.io/sphinxdefense/gsw-ait:main +echo "" +echo "" + +echo "Prepare ttc docker container..." +$DCALL image pull ghcr.io/sphinxdefense/ttc-command:main +echo "" +echo "" + echo "Prepare nos3 docker container..." $DCALL image pull $DBOX echo "" diff --git a/sims/nos_time_driver b/sims/nos_time_driver index 5c2787a3..da2d3b09 160000 --- a/sims/nos_time_driver +++ b/sims/nos_time_driver @@ -1 +1 @@ -Subproject commit 5c2787a35c904c1d4f49b01f23acabc3ac37a079 +Subproject commit da2d3b09c2b1868090b99fbf2507fd24f04043a7 diff --git a/sims/sim_common b/sims/sim_common index 8cb9ddcb..5c804f64 160000 --- a/sims/sim_common +++ b/sims/sim_common @@ -1 +1 @@ -Subproject commit 8cb9ddcb5915ee7e286aee0d5e3e0e458f8110a8 +Subproject commit 5c804f64834e41f02c0660275daca9778f065c24