openc3-cosmos-demo 5.17.1 → 5.19.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/plugin.txt +6 -2
- data/targets/INST/cmd_tlm/_ccsds_cmd.txt +1 -1
- data/targets/INST/cmd_tlm/inst_cmds.txt +13 -0
- data/targets/INST/cmd_tlm/inst_tlm.txt +2 -0
- data/targets/INST/lib/example_limits_response.rb +3 -3
- data/targets/INST/lib/inst_cmd_validator.rb +47 -0
- data/targets/INST/lib/sim_inst.rb +53 -31
- data/targets/INST/procedures/calendar.rb +2 -2
- data/targets/INST/procedures/checks.rb +4 -0
- data/targets/INST/procedures/metadata.rb +1 -3
- data/targets/INST/public/ganymede.jpg +0 -0
- data/targets/INST/public/spiral.jpg +0 -0
- data/targets/INST/public/sun.jpg +0 -0
- data/targets/INST/screens/array.txt +8 -0
- data/targets/INST/screens/commanding.txt +2 -2
- data/targets/INST/screens/ground.txt +1 -1
- data/targets/INST/screens/image.txt +3 -1
- data/targets/INST/screens/latest.txt +10 -12
- data/targets/INST/screens/launcher.txt +4 -4
- data/targets/INST/screens/limits.txt +33 -27
- data/targets/INST/screens/other.txt +3 -3
- data/targets/INST/screens/rollup.txt +20 -13
- data/targets/INST/screens/simple.txt +1 -1
- data/targets/INST/tables/config/TLMMonitoringTable_def.txt +3 -3
- data/targets/INST2/cmd_tlm/_ccsds_cmd.txt +1 -1
- data/targets/INST2/cmd_tlm/inst_cmds.txt +18 -0
- data/targets/INST2/cmd_tlm/inst_tlm.txt +14 -5
- data/targets/INST2/lib/example_limits_response.py +8 -5
- data/targets/INST2/lib/inst2_cmd_validator.py +44 -0
- data/targets/INST2/lib/sim_inst.py +40 -13
- data/targets/INST2/procedures/calendar.py +1 -1
- data/targets/INST2/procedures/checks.py +4 -0
- data/targets/INST2/procedures/collect.py +1 -1
- data/targets/INST2/procedures/file_dialog.py +10 -9
- data/targets/INST2/procedures/metadata.py +2 -4
- data/targets/INST2/procedures/screens.py +12 -12
- data/targets/INST2/procedures/target_file.py +11 -11
- data/targets/INST2/public/ganymede.jpg +0 -0
- data/targets/INST2/public/spiral.jpg +0 -0
- data/targets/INST2/public/sun.jpg +0 -0
- data/targets/INST2/screens/array.txt +8 -0
- data/targets/INST2/screens/commanding.txt +5 -5
- data/targets/INST2/screens/ground.txt +1 -1
- data/targets/INST2/screens/image.txt +3 -1
- data/targets/INST2/screens/latest.txt +10 -12
- data/targets/INST2/screens/launcher.txt +4 -4
- data/targets/INST2/screens/limits.txt +33 -27
- data/targets/INST2/screens/other.txt +3 -3
- data/targets/INST2/screens/rollup.txt +29 -0
- data/targets/INST2/screens/simple.txt +1 -1
- data/targets/INST2/tables/config/TLMMonitoringTable_def.txt +3 -3
- data/tools/widgets/BigWidget/BigWidget.umd.min.js +1 -1
- data/tools/widgets/BigWidget/BigWidget.umd.min.js.map +1 -1
- data/tools/widgets/DataviewerquaternionWidget/DataviewerquaternionWidget.umd.min.js +2 -2
- data/tools/widgets/DataviewerquaternionWidget/DataviewerquaternionWidget.umd.min.js.map +1 -1
- data/tools/widgets/DataviewertimeWidget/DataviewertimeWidget.umd.min.js +1 -1
- data/tools/widgets/DataviewertimeWidget/DataviewertimeWidget.umd.min.js.map +1 -1
- data/tools/widgets/HelloworldWidget/HelloworldWidget.umd.min.js +1 -1
- data/tools/widgets/HelloworldWidget/HelloworldWidget.umd.min.js.map +1 -1
- metadata +9 -3
- data/targets/EXAMPLE/lib/my_reject_protocol.rb +0 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b81293bb997165f1b8c35dbd8cc4ec5a4de4b5810a6c746047662a89149e3950
|
4
|
+
data.tar.gz: 70e36acc62a6be36a5c02dc6261a66da19069cc18cae3c1dfa9ff460587a8f4e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 611c47f8a6ca07d7b7cb6064681d3a1732b08016136dc37d8ae4dea36bae37c451974b1048d4c1fc29336bfd8e794f7f11c28d134822ff76e4153b59418e8bae
|
7
|
+
data.tar.gz: 9e078e3e96fb62130dcbcd4daf4fc0c53f903ed82fb8161be8279e361812a851e18d603bf60efa66be29bd336a9bc832386bddb053d7279d5e380f3c39cb66c9
|
data/plugin.txt
CHANGED
@@ -36,9 +36,14 @@ VARIABLE reduced_log_retain_time 2592000
|
|
36
36
|
|
37
37
|
<% if include_inst %>
|
38
38
|
TARGET INST <%= inst_target_name %>
|
39
|
+
# If we're in the CI pipeline shorten the log file creation time
|
40
|
+
<% if ENV["CI"] %>
|
41
|
+
TLM_LOG_CYCLE_TIME 60
|
42
|
+
<% else %>
|
43
|
+
TLM_LOG_CYCLE_TIME 300
|
44
|
+
<% end %>
|
39
45
|
LOG_RETAIN_TIME <%= log_retain_time %>
|
40
46
|
REDUCED_LOG_RETAIN_TIME <%= reduced_log_retain_time %>
|
41
|
-
TLM_LOG_CYCLE_TIME 300
|
42
47
|
# Allow the reducer microservice to take 50% of the cpu (default 30%)
|
43
48
|
REDUCER_MAX_CPU_UTILIZATION 50
|
44
49
|
<% end %>
|
@@ -86,7 +91,6 @@ VARIABLE reduced_log_retain_time 2592000
|
|
86
91
|
# This expression builds the correct hostname for Open Source or Enterprise Edition in Kubernetes
|
87
92
|
<% example_host = ENV['KUBERNETES_SERVICE_HOST'] ? "#{scope}-user-#{example_microservice_name.downcase.gsub('__', '-').gsub('_', '-')}-service" : "openc3-operator" %>
|
88
93
|
INTERFACE <%= example_int_name %> example_interface.rb <%= example_host %> <%= example_port %>
|
89
|
-
PROTOCOL WRITE MyRejectProtocol
|
90
94
|
MAP_TARGET <%= example_target_name %>
|
91
95
|
DONT_CONNECT
|
92
96
|
# Override the default log time of 600
|
@@ -1,7 +1,7 @@
|
|
1
1
|
PARAMETER CCSDSVER 0 3 UINT 0 0 0 "CCSDS primary header version number"
|
2
2
|
PARAMETER CCSDSTYPE 3 1 UINT 1 1 1 "CCSDS primary header packet type"
|
3
3
|
PARAMETER CCSDSSHF 4 1 UINT 0 0 0 "CCSDS primary header secondary header flag"
|
4
|
-
ID_PARAMETER CCSDSAPID 5 11 UINT 0 2047
|
4
|
+
ID_PARAMETER CCSDSAPID 5 11 UINT 0 2047 <%= id %> "CCSDS primary header application id"
|
5
5
|
PARAMETER CCSDSSEQFLAGS 16 2 UINT 3 3 3 "CCSDS primary header sequence flags"
|
6
6
|
PARAMETER CCSDSSEQCNT 18 14 UINT 0 16383 0 "CCSDS primary header sequence count"
|
7
7
|
OVERFLOW TRUNCATE
|
@@ -1,4 +1,5 @@
|
|
1
1
|
COMMAND <%= target_name %> COLLECT BIG_ENDIAN "Starts a collect on the <%= target_name %> target"
|
2
|
+
VALIDATOR inst_cmd_validator.rb
|
2
3
|
<%= render "_ccsds_cmd.txt", locals: {id: 1} %>
|
3
4
|
PARAMETER TYPE 64 16 UINT MIN MAX 0 "Collect type which can be normal or special. Note the special collects are hazarous and require user confirmation."
|
4
5
|
REQUIRED
|
@@ -14,14 +15,17 @@ COMMAND <%= target_name %> COLLECT BIG_ENDIAN "Starts a collect on the <%= targe
|
|
14
15
|
RELATED_ITEM <%= target_name %> HEALTH_STATUS COLLECT_TYPE
|
15
16
|
|
16
17
|
COMMAND <%= target_name %> ABORT BIG_ENDIAN "Aborts a collect on the <%= target_name %> instrument"
|
18
|
+
VALIDATOR inst_cmd_validator.rb
|
17
19
|
<%= render "_ccsds_cmd.txt", locals: {id: 2} %>
|
18
20
|
|
19
21
|
COMMAND <%= target_name %> CLEAR BIG_ENDIAN "Clears counters on the <%= target_name %> instrument"
|
22
|
+
VALIDATOR inst_cmd_validator.rb
|
20
23
|
HAZARDOUS "Clearing counters may lose valuable information."
|
21
24
|
<%= render "_ccsds_cmd.txt", locals: {id: 3} %>
|
22
25
|
RELATED_ITEM <%= target_name %> HEALTH_STATUS COLLECTS
|
23
26
|
|
24
27
|
COMMAND <%= target_name %> SETPARAMS BIG_ENDIAN "Sets numbered parameters"
|
28
|
+
VALIDATOR inst_cmd_validator.rb
|
25
29
|
<%= render "_ccsds_cmd.txt", locals: {id: 4} %>
|
26
30
|
# ERB syntax:
|
27
31
|
<% (1..5).each do |i| %>
|
@@ -35,6 +39,7 @@ COMMAND <%= target_name %> SETPARAMS BIG_ENDIAN "Sets numbered parameters"
|
|
35
39
|
POLY_WRITE_CONVERSION 0 2
|
36
40
|
|
37
41
|
COMMAND <%= target_name %> ASCIICMD BIG_ENDIAN "Enumerated ASCII command"
|
42
|
+
VALIDATOR inst_cmd_validator.rb
|
38
43
|
<%= render "_ccsds_cmd.txt", locals: {id: 5} %>
|
39
44
|
APPEND_PARAMETER STRING 2048 STRING "NOOP" "Enumerated string parameter"
|
40
45
|
STATE "ARM LASER" "ARM LASER" HAZARDOUS "Arming the laser poses an eye safety hazard."
|
@@ -45,16 +50,19 @@ COMMAND <%= target_name %> ASCIICMD BIG_ENDIAN "Enumerated ASCII command"
|
|
45
50
|
RELATED_ITEM <%= target_name %> HEALTH_STATUS ASCIICMD
|
46
51
|
|
47
52
|
COMMAND <%= target_name %> FLTCMD BIG_ENDIAN "Command with float parameters"
|
53
|
+
VALIDATOR inst_cmd_validator.rb
|
48
54
|
<%= render "_ccsds_cmd.txt", locals: {id: 6} %>
|
49
55
|
PARAMETER FLOAT32 64 32 FLOAT MIN MAX 0.0 "Float32 parameter"
|
50
56
|
PARAMETER FLOAT64 96 64 FLOAT MIN MAX 0.0 "Float64 parameter"
|
51
57
|
|
52
58
|
COMMAND <%= target_name %> ARYCMD BIG_ENDIAN "Command with array parameter"
|
59
|
+
VALIDATOR inst_cmd_validator.rb
|
53
60
|
<%= render "_ccsds_cmd.txt", locals: {id: 7} %>
|
54
61
|
ARRAY_PARAMETER ARRAY 64 32 UINT -8 "Array parameter"
|
55
62
|
PARAMETER CRC -8 8 UINT MIN MAX 0 "CRC"
|
56
63
|
|
57
64
|
COMMAND <%= target_name %> SLRPNLDEPLOY BIG_ENDIAN "Deploy solar array panels"
|
65
|
+
VALIDATOR inst_cmd_validator.rb
|
58
66
|
<%= render "_ccsds_cmd.txt", locals: {id: 8} %>
|
59
67
|
RELATED_ITEM <%= target_name %> MECH SLRPNL1
|
60
68
|
RELATED_ITEM <%= target_name %> MECH SLRPNL2
|
@@ -63,6 +71,7 @@ COMMAND <%= target_name %> SLRPNLDEPLOY BIG_ENDIAN "Deploy solar array panels"
|
|
63
71
|
RELATED_ITEM <%= target_name %> MECH SLRPNL5
|
64
72
|
|
65
73
|
COMMAND <%= target_name %> SLRPNLRESET BIG_ENDIAN "Reset solar array panels"
|
74
|
+
VALIDATOR inst_cmd_validator.rb
|
66
75
|
<%= render "_ccsds_cmd.txt", locals: {id: 9} %>
|
67
76
|
RELATED_ITEM <%= target_name %> MECH SLRPNL1
|
68
77
|
RELATED_ITEM <%= target_name %> MECH SLRPNL2
|
@@ -71,22 +80,26 @@ COMMAND <%= target_name %> SLRPNLRESET BIG_ENDIAN "Reset solar array panels"
|
|
71
80
|
RELATED_ITEM <%= target_name %> MECH SLRPNL5
|
72
81
|
|
73
82
|
COMMAND <%= target_name %> MEMLOAD BIG_ENDIAN "Load memory"
|
83
|
+
VALIDATOR inst_cmd_validator.rb
|
74
84
|
DISABLE_MESSAGES # Disable messages on a command that could be sent many many times
|
75
85
|
<%= render "_ccsds_cmd.txt", locals: {id: 10} %>
|
76
86
|
APPEND_PARAMETER DATA 80 BLOCK "" "Block of data"
|
77
87
|
RELATED_ITEM <%= target_name %> HEALTH_STATUS BLOCKTEST
|
78
88
|
|
79
89
|
COMMAND <%= target_name %> QUIET BIG_ENDIAN "Enable/disable no out of limits in the demo"
|
90
|
+
VALIDATOR inst_cmd_validator.rb
|
80
91
|
<%= render "_ccsds_cmd.txt", locals: {id: 11} %>
|
81
92
|
APPEND_PARAMETER STATE 8 UINT 0 1 1
|
82
93
|
STATE FALSE 0
|
83
94
|
STATE TRUE 1
|
84
95
|
|
85
96
|
COMMAND <%= target_name %> TIME_OFFSET BIG_ENDIAN "Subtract the packet time by the given seconds"
|
97
|
+
VALIDATOR inst_cmd_validator.rb
|
86
98
|
<%= render "_ccsds_cmd.txt", locals: {id: 12} %>
|
87
99
|
APPEND_PARAMETER SECONDS 32 UINT MIN MAX 0 "Seconds to subtract from packet time"
|
88
100
|
|
89
101
|
COMMAND <%= target_name %> HIDDEN BIG_ENDIAN "Hidden command to bump the hidden packet"
|
102
|
+
VALIDATOR inst_cmd_validator.rb
|
90
103
|
HIDDEN
|
91
104
|
<%= render "_ccsds_cmd.txt", locals: {id: 13} %>
|
92
105
|
APPEND_PARAMETER COUNT 32 UINT MIN MAX 0 "Count to set"
|
@@ -1,5 +1,6 @@
|
|
1
1
|
TELEMETRY <%= target_name %> HEALTH_STATUS BIG_ENDIAN "Health and status from the <%= target_name %> target"
|
2
2
|
<%= render "_ccsds_tlm.txt", locals: {apid: 1} %>
|
3
|
+
APPEND_ITEM CMD_ACPT_CNT 32 UINT "Command accept count"
|
3
4
|
APPEND_ITEM COLLECTS 16 UINT "Number of collects"
|
4
5
|
APPEND_ITEM TEMP1 16 UINT "Temperature #1"
|
5
6
|
POLY_READ_CONVERSION -100.0 0.00305
|
@@ -49,6 +50,7 @@ TELEMETRY <%= target_name %> HEALTH_STATUS BIG_ENDIAN "Health and status from th
|
|
49
50
|
STATE CONNECTED 1 GREEN
|
50
51
|
STATE UNAVAILABLE 0 YELLOW
|
51
52
|
APPEND_ITEM BLOCKTEST 80 BLOCK "Block data"
|
53
|
+
APPEND_ITEM BRACKET[0] 8 UINT "Regular item with brackets in the name"
|
52
54
|
ITEM PACKET_TIME 0 0 DERIVED "Ruby time based on TIMESEC and TIMEUS"
|
53
55
|
READ_CONVERSION unix_time_conversion.rb TIMESEC TIMEUS
|
54
56
|
ITEM TEMP1HIGH 0 0 DERIVED "High-water mark for TEMP1"
|
@@ -14,7 +14,7 @@
|
|
14
14
|
# GNU Affero General Public License for more details.
|
15
15
|
|
16
16
|
# Modified by OpenC3, Inc.
|
17
|
-
# All changes Copyright
|
17
|
+
# All changes Copyright 2024, OpenC3, Inc.
|
18
18
|
# All Rights Reserved
|
19
19
|
#
|
20
20
|
# This file may also be used under the terms of a commercial license
|
@@ -28,9 +28,9 @@ class ExampleLimitsResponse < OpenC3::LimitsResponse
|
|
28
28
|
def call(packet, item, old_limits_state)
|
29
29
|
case item.limits.state
|
30
30
|
when :RED_HIGH
|
31
|
-
cmd('<%= target_name %>
|
31
|
+
cmd('<%= target_name %> COLLECT with TYPE NORMAL, DURATION 7', validate: false)
|
32
32
|
when :RED_LOW
|
33
|
-
|
33
|
+
cmd('<%= target_name %> ABORT', validate: false)
|
34
34
|
end
|
35
35
|
end
|
36
36
|
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# encoding: ascii-8bit
|
2
|
+
|
3
|
+
# Copyright 2024 OpenC3, Inc.
|
4
|
+
# All Rights Reserved.
|
5
|
+
#
|
6
|
+
# This program is free software; you can modify and/or redistribute it
|
7
|
+
# under the terms of the GNU Affero General Public License
|
8
|
+
# as published by the Free Software Foundation; version 3 with
|
9
|
+
# attribution addendums as found in the LICENSE.txt
|
10
|
+
#
|
11
|
+
# This program is distributed in the hope that it will be useful,
|
12
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
|
+
# GNU Affero General Public License for more details.
|
15
|
+
|
16
|
+
# This file may also be used under the terms of a commercial license
|
17
|
+
# if purchased from OpenC3, Inc.
|
18
|
+
|
19
|
+
require 'openc3/packets/command_validator'
|
20
|
+
|
21
|
+
class InstCmdValidator < OpenC3::CommandValidator
|
22
|
+
def pre_check(command)
|
23
|
+
# Record the current value of CMD_ACPT_CNT for comparison in post_check
|
24
|
+
@cmd_acpt_cnt = tlm("<%= target_name %> HEALTH_STATUS CMD_ACPT_CNT")
|
25
|
+
return [true, nil]
|
26
|
+
end
|
27
|
+
|
28
|
+
def post_check(command)
|
29
|
+
if command.packet_name == 'TIME_OFFSET'
|
30
|
+
# Return Failure with a message
|
31
|
+
return [false, 'TIME_OFFSET failure description']
|
32
|
+
end
|
33
|
+
if command.packet_name == 'MEMLOAD'
|
34
|
+
# Return Unknown with a message
|
35
|
+
return [nil, 'MEMLOAD validation unknown']
|
36
|
+
end
|
37
|
+
if command.packet_name == 'CLEAR'
|
38
|
+
wait_check("<%= target_name %> HEALTH_STATUS CMD_ACPT_CNT == 0", 10)
|
39
|
+
# Return Success with a message
|
40
|
+
return [true, "CMD_ACPT_CNT cleared"]
|
41
|
+
else
|
42
|
+
wait_check("<%= target_name %> HEALTH_STATUS CMD_ACPT_CNT > #{@cmd_acpt_cnt}", 10)
|
43
|
+
# Return Success without a message
|
44
|
+
return [true, nil]
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -14,7 +14,7 @@
|
|
14
14
|
# GNU Affero General Public License for more details.
|
15
15
|
|
16
16
|
# Modified by OpenC3, Inc.
|
17
|
-
# All changes Copyright
|
17
|
+
# All changes Copyright 2024, OpenC3, Inc.
|
18
18
|
# All Rights Reserved
|
19
19
|
#
|
20
20
|
# This file may also be used under the terms of a commercial license
|
@@ -47,8 +47,14 @@ module OpenC3
|
|
47
47
|
@position_file_bytes_read = 0
|
48
48
|
@attitude_file_bytes_read = 0
|
49
49
|
|
50
|
+
@images = []
|
50
51
|
data = File.read(File.join(@target.dir, 'public', 'spiral.jpg'), mode: "rb")
|
51
|
-
@
|
52
|
+
@images << Base64.encode64(data)
|
53
|
+
data = File.read(File.join(@target.dir, 'public', 'sun.jpg'), mode: "rb")
|
54
|
+
@images << Base64.encode64(data)
|
55
|
+
data = File.read(File.join(@target.dir, 'public', 'ganymede.jpg'), mode: "rb")
|
56
|
+
@images << Base64.encode64(data)
|
57
|
+
@cur_image = 0
|
52
58
|
|
53
59
|
@pos_packet = Structure.new(:BIG_ENDIAN)
|
54
60
|
@pos_packet.append_item('DAY', 16, :UINT)
|
@@ -125,17 +131,17 @@ module OpenC3
|
|
125
131
|
@solar_panel_thread = nil
|
126
132
|
@solar_panel_thread_cancel = false
|
127
133
|
|
128
|
-
@
|
129
|
-
@
|
130
|
-
@
|
131
|
-
@
|
132
|
-
@
|
133
|
-
@
|
134
|
-
@
|
135
|
-
@
|
136
|
-
@
|
137
|
-
@
|
138
|
-
@
|
134
|
+
@track_stars = Array.new
|
135
|
+
@track_stars[0] = 1237
|
136
|
+
@track_stars[1] = 1329
|
137
|
+
@track_stars[2] = 1333
|
138
|
+
@track_stars[3] = 1139
|
139
|
+
@track_stars[4] = 1161
|
140
|
+
@track_stars[5] = 682
|
141
|
+
@track_stars[6] = 717
|
142
|
+
@track_stars[7] = 814
|
143
|
+
@track_stars[8] = 583
|
144
|
+
@track_stars[9] = 622
|
139
145
|
|
140
146
|
@bad_temp2 = false
|
141
147
|
@last_temp2 = 0
|
@@ -168,31 +174,27 @@ module OpenC3
|
|
168
174
|
|
169
175
|
case name
|
170
176
|
when 'COLLECT'
|
177
|
+
hs_packet.cmd_acpt_cnt += 1
|
171
178
|
hs_packet.collects += 1
|
172
179
|
hs_packet.duration = packet.read('duration')
|
173
180
|
hs_packet.collect_type = packet.read("type")
|
181
|
+
when 'ABORT', 'FLTCMD', 'ARYCMD'
|
182
|
+
hs_packet.cmd_acpt_cnt += 1
|
174
183
|
when 'CLEAR'
|
184
|
+
hs_packet.cmd_acpt_cnt = 0
|
175
185
|
hs_packet.collects = 0
|
176
|
-
when 'MEMLOAD'
|
177
|
-
hs_packet.blocktest = packet.read('data')
|
178
|
-
when 'QUIET'
|
179
|
-
if packet.read('state') == 'TRUE'
|
180
|
-
@quiet = true
|
181
|
-
else
|
182
|
-
@quiet = false
|
183
|
-
end
|
184
|
-
when 'TIME_OFFSET'
|
185
|
-
@time_offset = packet.read('seconds')
|
186
186
|
when 'SETPARAMS'
|
187
|
-
|
187
|
+
hs_packet.cmd_acpt_cnt += 1
|
188
188
|
params_packet.value1 = packet.read('value1')
|
189
189
|
params_packet.value2 = packet.read('value2')
|
190
190
|
params_packet.value3 = packet.read('value3')
|
191
191
|
params_packet.value4 = packet.read('value4')
|
192
192
|
params_packet.value5 = packet.read('value5')
|
193
193
|
when 'ASCIICMD'
|
194
|
+
hs_packet.cmd_acpt_cnt += 1
|
194
195
|
hs_packet.asciicmd = packet.read('string')
|
195
196
|
when 'SLRPNLDEPLOY'
|
197
|
+
hs_packet.cmd_acpt_cnt += 1
|
196
198
|
return if @solar_panel_thread and @solar_panel_thread.alive?
|
197
199
|
@solar_panel_thread = Thread.new do
|
198
200
|
@solar_panel_thread_cancel = false
|
@@ -215,9 +217,24 @@ module OpenC3
|
|
215
217
|
end
|
216
218
|
end
|
217
219
|
when 'SLRPNLRESET'
|
220
|
+
hs_packet.cmd_acpt_cnt += 1
|
218
221
|
OpenC3.kill_thread(self, @solar_panel_thread)
|
219
222
|
@solar_panel_positions = SOLAR_PANEL_DFLTS.dup
|
223
|
+
when 'MEMLOAD'
|
224
|
+
hs_packet.cmd_acpt_cnt += 1
|
225
|
+
hs_packet.blocktest = packet.read('data')
|
226
|
+
when 'QUIET'
|
227
|
+
hs_packet.cmd_acpt_cnt += 1
|
228
|
+
if packet.read('state') == 'TRUE'
|
229
|
+
@quiet = true
|
230
|
+
else
|
231
|
+
@quiet = false
|
232
|
+
end
|
233
|
+
when 'TIME_OFFSET'
|
234
|
+
hs_packet.cmd_acpt_cnt += 1
|
235
|
+
@time_offset = packet.read('seconds')
|
220
236
|
when 'HIDDEN'
|
237
|
+
# Deliberately do not increment cmd_acpt_cnt
|
221
238
|
@tlm_packets['HIDDEN'].count = packet.read('count')
|
222
239
|
end
|
223
240
|
end
|
@@ -280,11 +297,11 @@ module OpenC3
|
|
280
297
|
packet.biasy = @att_packet.biasy
|
281
298
|
packet.biasy = @att_packet.biasz
|
282
299
|
|
283
|
-
packet.star1id = @
|
284
|
-
packet.star2id = @
|
285
|
-
packet.star3id = @
|
286
|
-
packet.star4id = @
|
287
|
-
packet.star5id = @
|
300
|
+
packet.star1id = @track_stars[((count_100hz / 100) + 0) % 10]
|
301
|
+
packet.star2id = @track_stars[((count_100hz / 100) + 1) % 10]
|
302
|
+
packet.star3id = @track_stars[((count_100hz / 100) + 2) % 10]
|
303
|
+
packet.star4id = @track_stars[((count_100hz / 100) + 3) % 10]
|
304
|
+
packet.star5id = @track_stars[((count_100hz / 100) + 4) % 10]
|
288
305
|
|
289
306
|
packet.posprogress = (@position_file_bytes_read.to_f / @position_file_size.to_f) * 100.0
|
290
307
|
packet.attprogress = (@attitude_file_bytes_read.to_f / @attitude_file_size.to_f) * 100.0
|
@@ -319,6 +336,7 @@ module OpenC3
|
|
319
336
|
cycle_tlm_item(packet, 'temp3', -30.0, 80.0, 2.0)
|
320
337
|
end
|
321
338
|
cycle_tlm_item(packet, 'temp4', 0.0, 20.0, -0.1)
|
339
|
+
cycle_tlm_item(packet, 'bracket[0]', 0, 255, 10)
|
322
340
|
|
323
341
|
packet.timesec = time.tv_sec - @time_offset
|
324
342
|
packet.timeus = time.tv_usec
|
@@ -359,12 +377,16 @@ module OpenC3
|
|
359
377
|
when 'IMAGE'
|
360
378
|
packet.timesec = time.tv_sec - @time_offset
|
361
379
|
packet.timeus = time.tv_usec
|
362
|
-
packet.
|
380
|
+
packet.ccsdsseqcnt += 1
|
381
|
+
if packet.ccsdsseqcnt % 20 == 0
|
382
|
+
@cur_image += 1
|
383
|
+
@cur_image = 0 if @cur_image == @images.length
|
384
|
+
end
|
385
|
+
packet.image = @images[@cur_image]
|
363
386
|
# Create an Array and then initialize
|
364
387
|
# using a sample of all possible hex values (0..15)
|
365
388
|
# finally pack it into binary using the Character 'C' specifier
|
366
389
|
packet.block = Array.new(1000) { Array(0..15).sample }.pack("C*")
|
367
|
-
packet.ccsdsseqcnt += 1
|
368
390
|
|
369
391
|
when 'MECH'
|
370
392
|
packet.timesec = time.tv_sec - @time_offset
|
@@ -11,7 +11,7 @@ set_timeline_color("Mine", "#4287f5")
|
|
11
11
|
puts get_timeline("Mine") #=> {"name"=>"Mine", "color"=>"#4287f5", "scope"=>"DEFAULT", "updated_at"=>1698763720728596964}
|
12
12
|
|
13
13
|
now = Time.now()
|
14
|
-
start =
|
14
|
+
start = now + 3600
|
15
15
|
stop = start + 3600 # Stop plus 1hr
|
16
16
|
act = create_timeline_activity("Mine", kind: "reserve", start: start, stop: stop)
|
17
17
|
puts act #=>
|
@@ -31,7 +31,7 @@ stop = start + 300
|
|
31
31
|
act = create_timeline_activity("Mine", kind: "reserve", start: start, stop: stop)
|
32
32
|
tlas = get_timeline_activities("Mine")
|
33
33
|
check_expression("#{tlas.length} == 2")
|
34
|
-
delete_timeline_activity("Mine", act['start'])
|
34
|
+
delete_timeline_activity("Mine", act['start'], act['uuid'])
|
35
35
|
tlas = get_timeline_activities("Mine")
|
36
36
|
check_expression("#{tlas.length} == 1")
|
37
37
|
|
@@ -3,6 +3,10 @@ puts ENV.inspect
|
|
3
3
|
# Print the TYPE env var which is set in the INST COMMANDING screen
|
4
4
|
puts "ENV['TYPE']:#{ENV['TYPE']}"
|
5
5
|
|
6
|
+
# Test some of the various keyword arguments
|
7
|
+
cmd("<%= target_name %> ABORT", timeout: 30)
|
8
|
+
cmd("<%= target_name %> ABORT", log_message: false)
|
9
|
+
cmd("<%= target_name %> ABORT", validate: false)
|
6
10
|
collect_cnt = tlm("<%= target_name %> HEALTH_STATUS COLLECTS")
|
7
11
|
cmd("<%= target_name %> COLLECT with DURATION 11, TYPE NORMAL")
|
8
12
|
cmd_no_range_check("<%= target_name %> COLLECT with DURATION 11, TYPE NORMAL")
|
@@ -17,6 +17,4 @@ check_expression("#{metadata_all().length} >= 2")
|
|
17
17
|
wait 2 # Allow time to advance or it's an error
|
18
18
|
metadata_set({ 'new' => 5 }) # Another new entry
|
19
19
|
check_expression("#{metadata_all().length} >= 3")
|
20
|
-
|
21
|
-
puts metadata_all
|
22
|
-
check_expression("#{metadata_all()[0]['metadata']} == {\"new\"=>5}")
|
20
|
+
puts metadata_all()
|
Binary file
|
Binary file
|
Binary file
|
@@ -5,6 +5,14 @@ VERTICAL
|
|
5
5
|
ARRAY <%= target_name %> HEALTH_STATUS ARY
|
6
6
|
LABELVALUE <%= target_name %> HEALTH_STATUS ARY[0] RAW
|
7
7
|
LABELVALUE <%= target_name %> HEALTH_STATUS ARY[1] WITH_UNITS
|
8
|
+
# This item is actually called BRACKET[0] as the name
|
9
|
+
# thus we have to escape the value here to avoid it
|
10
|
+
# being treated like an array item
|
11
|
+
LABELVALUE <%= target_name %> HEALTH_STATUS BRACKET[[0]]
|
12
|
+
LABELSPARKLINE <%= target_name %> HEALTH_STATUS ARY[1]
|
13
|
+
SETTING HISTORY 60s
|
14
|
+
LABELSPARKLINE <%= target_name %> HEALTH_STATUS BRACKET[[0]]
|
15
|
+
SETTING HISTORY 60s
|
8
16
|
ARRAY <%= target_name %> HEALTH_STATUS ARY 300 65 nil 8 FORMATTED
|
9
17
|
ARRAY <%= target_name %> HEALTH_STATUS ARY2 300 65 nil 5 WITH_UNITS
|
10
18
|
TEXTBOX <%= target_name %> HEALTH_STATUS ARY 200 65
|
@@ -18,7 +18,7 @@ VERTICAL
|
|
18
18
|
LABEL " Duration: "
|
19
19
|
NAMED_WIDGET DURATION TEXTFIELD 12 "10.0"
|
20
20
|
END
|
21
|
-
# This is an example of using a
|
21
|
+
# This is an example of using a variable named 'type'. You can operate on variables with Javascript code.
|
22
22
|
# All OpenC3 commands (api.cmd) must be separated by double semicolons ';;'. All code separated by semicolons is evaluated together.
|
23
23
|
# Note: you can also request and use telemetry in screens using Javascript Promises, e.g.
|
24
24
|
# api.tlm('INST PARAMS VALUE3', 'RAW').then(dur => api.cmd('INST COLLECT with TYPE '+type+', DURATION '+dur))"
|
@@ -52,6 +52,6 @@ VERTICAL
|
|
52
52
|
# Set some environment variables to be used by the script as ENV['TYPE']
|
53
53
|
# See INST/procedures/checks.rb for an example of usage
|
54
54
|
"var env = {}; env['TYPE'] = ctype;" \
|
55
|
-
"runScript('
|
55
|
+
"runScript('<%= target_name %>/procedures/'+script, !screen.getNamedWidget('BG').checked(), env)"
|
56
56
|
END
|
57
57
|
END
|
@@ -20,7 +20,7 @@ VERTICAL
|
|
20
20
|
CANVASIMAGE "satellite.png" 90 130 200 200
|
21
21
|
# If the image is clicked the "<%= target_name %> ADCS" screen will popup
|
22
22
|
SETTING SCREEN <%= target_name %> ADCS
|
23
|
-
# We're using the converted value and
|
23
|
+
# We're using the converted value and specifying a default of "ground_error.png"
|
24
24
|
# if none of the IMAGE settings match the value
|
25
25
|
CANVASIMAGEVALUE <%= target_name %> HEALTH_STATUS GROUND1STATUS CONVERTED "ground_error.png" 400 100 180 180
|
26
26
|
SETTING IMAGE CONNECTED "ground_on.png" 400 100
|
@@ -1,20 +1,18 @@
|
|
1
1
|
SCREEN AUTO AUTO 1.0
|
2
2
|
|
3
3
|
VERTICAL
|
4
|
-
|
5
4
|
TITLE "<%= target_name %> Instrument Latest Header"
|
6
5
|
|
7
6
|
VERTICALBOX "Header"
|
8
|
-
LABELVALUE
|
9
|
-
LABELVALUE
|
10
|
-
LABELVALUE
|
11
|
-
LABELVALUE
|
12
|
-
LABELVALUE
|
13
|
-
LABELVALUE
|
14
|
-
LABELVALUE
|
15
|
-
LABELVALUE
|
16
|
-
LABELVALUE
|
17
|
-
LABELVALUE
|
7
|
+
LABELVALUE <%= target_name %> LATEST CCSDSVER
|
8
|
+
LABELVALUE <%= target_name %> LATEST CCSDSTYPE
|
9
|
+
LABELVALUE <%= target_name %> LATEST CCSDSSHF
|
10
|
+
LABELVALUE <%= target_name %> LATEST CCSDSAPID
|
11
|
+
LABELVALUE <%= target_name %> LATEST CCSDSSEQFLAGS
|
12
|
+
LABELVALUE <%= target_name %> LATEST CCSDSSEQCNT
|
13
|
+
LABELVALUE <%= target_name %> LATEST CCSDSLENGTH
|
14
|
+
LABELVALUE <%= target_name %> LATEST TIMESEC
|
15
|
+
LABELVALUE <%= target_name %> LATEST TIMEUS
|
16
|
+
LABELVALUE <%= target_name %> LATEST PKTID
|
18
17
|
END
|
19
|
-
|
20
18
|
END
|
@@ -2,9 +2,9 @@ SCREEN AUTO AUTO 1
|
|
2
2
|
|
3
3
|
TITLE 'Screen Launcher'
|
4
4
|
HORIZONTAL
|
5
|
-
BUTTON 'HS' "screen.open('
|
6
|
-
BUTTON 'CMD' "screen.open('
|
7
|
-
BUTTON 'GROUND' "screen.open('
|
5
|
+
BUTTON 'HS' "screen.open('<%= target_name %>', 'HS')"
|
6
|
+
BUTTON 'CMD' "screen.open('<%= target_name %>', 'COMMANDING')"
|
7
|
+
BUTTON 'GROUND' "screen.open('<%= target_name %>', 'GROUND')"
|
8
8
|
END
|
9
|
-
BUTTON 'Close HS & CMD' "screen.close('
|
9
|
+
BUTTON 'Close HS & CMD' "screen.close('<%= target_name %>', 'HS');; screen.close('<%= target_name %>', 'COMMANDING')"
|
10
10
|
BUTTON 'Close All' "screen.closeAll()" # including this screen!
|
@@ -6,28 +6,33 @@ HORIZONTAL
|
|
6
6
|
VERTICALBOX "Limits Bars"
|
7
7
|
LIMITSBAR <%= target_name %> HEALTH_STATUS TEMP1
|
8
8
|
VALUELIMITSBAR <%= target_name %> HEALTH_STATUS TEMP1
|
9
|
+
SUBSETTING 0 WIDTH 130
|
9
10
|
LABELVALUELIMITSBAR <%= target_name %> HEALTH_STATUS TEMP1
|
10
11
|
# The TEMP1 limits are defined as follow:
|
11
12
|
# LIMITS DEFAULT 1 ENABLED -80.0 -70.0 60.0 80.0 -20.0 20.0
|
12
13
|
# Thus the following are examples of limiting the limitsbar
|
13
14
|
LABELVALUELIMITSBAR <%= target_name %> HEALTH_STATUS TEMP1
|
14
|
-
SUBSETTING 1
|
15
|
-
SUBSETTING
|
15
|
+
SUBSETTING 1 WIDTH 130
|
16
|
+
SUBSETTING 2 MIN_VALUE -80
|
17
|
+
SUBSETTING 2 MAX_VALUE 80
|
16
18
|
LABELVALUELIMITSBAR <%= target_name %> HEALTH_STATUS TEMP1
|
17
|
-
SUBSETTING 1
|
18
|
-
SUBSETTING
|
19
|
+
SUBSETTING 1 WIDTH 130
|
20
|
+
SUBSETTING 2 MIN_VALUE -75
|
21
|
+
SUBSETTING 2 MAX_VALUE 70
|
19
22
|
LABELVALUELIMITSBAR <%= target_name %> HEALTH_STATUS TEMP1
|
20
|
-
SUBSETTING 1
|
21
|
-
SUBSETTING
|
23
|
+
SUBSETTING 1 WIDTH 130
|
24
|
+
SUBSETTING 2 MIN_VALUE -70
|
25
|
+
SUBSETTING 2 MAX_VALUE 60
|
22
26
|
LABELVALUELIMITSBAR <%= target_name %> HEALTH_STATUS TEMP1
|
23
|
-
SUBSETTING 1
|
24
|
-
SUBSETTING
|
27
|
+
SUBSETTING 1 WIDTH 130
|
28
|
+
SUBSETTING 2 MIN_VALUE -50
|
29
|
+
SUBSETTING 2 MAX_VALUE 50
|
25
30
|
LABELVALUELIMITSBAR <%= target_name %> HEALTH_STATUS TEMP1
|
26
|
-
SUBSETTING
|
27
|
-
SUBSETTING 1
|
28
|
-
|
29
|
-
SUBSETTING
|
30
|
-
SUBSETTING
|
31
|
+
SUBSETTING 0 TEXTCOLOR grey
|
32
|
+
SUBSETTING 1 WIDTH 130
|
33
|
+
SUBSETTING 1 BORDERCOLOR grey
|
34
|
+
SUBSETTING 2 MIN_VALUE -20
|
35
|
+
SUBSETTING 2 MAX_VALUE 20
|
31
36
|
END
|
32
37
|
VERTICAL
|
33
38
|
VERTICALBOX "Range Bars 0-100"
|
@@ -46,21 +51,22 @@ END
|
|
46
51
|
HORIZONTAL
|
47
52
|
VERTICALBOX "Limits Columns"
|
48
53
|
HORIZONTAL
|
49
|
-
LIMITSCOLUMN <%= target_name %> HEALTH_STATUS
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
+
LIMITSCOLUMN <%= target_name %> HEALTH_STATUS TEMP3
|
55
|
+
SETTING HEIGHT 200
|
56
|
+
VALUELIMITSCOLUMN <%= target_name %> HEALTH_STATUS TEMP3
|
57
|
+
SUBSETTING 0 WIDTH 130
|
58
|
+
LABELVALUELIMITSCOLUMN <%= target_name %> HEALTH_STATUS TEMP3
|
59
|
+
SUBSETTING 1 WIDTH 130
|
60
|
+
# The TEMP3 limits are defined as follow: RL/-25 YL/-10 YH/50 RH/55
|
54
61
|
# Thus the following are examples of limiting the limitscolumn
|
55
|
-
LABELVALUELIMITSCOLUMN <%= target_name %> HEALTH_STATUS
|
56
|
-
SUBSETTING 1
|
57
|
-
SUBSETTING
|
58
|
-
|
59
|
-
|
60
|
-
SUBSETTING 1
|
61
|
-
|
62
|
-
SUBSETTING
|
63
|
-
SUBSETTING 1 MAX_VALUE 10
|
62
|
+
LABELVALUELIMITSCOLUMN <%= target_name %> HEALTH_STATUS TEMP3
|
63
|
+
SUBSETTING 1 WIDTH 130
|
64
|
+
SUBSETTING 2 MIN_VALUE -25
|
65
|
+
SUBSETTING 2 MAX_VALUE 55
|
66
|
+
LABELVALUELIMITSCOLUMN <%= target_name %> HEALTH_STATUS TEMP3
|
67
|
+
SUBSETTING 1 WIDTH 130
|
68
|
+
SUBSETTING 2 MIN_VALUE -10
|
69
|
+
SUBSETTING 2 MAX_VALUE 50
|
64
70
|
END
|
65
71
|
END
|
66
72
|
|
@@ -16,7 +16,7 @@ SCROLLWINDOW 200
|
|
16
16
|
LABEL "TestText" Courier 14 # 14pt courier
|
17
17
|
END
|
18
18
|
|
19
|
-
LABELVALUEDESC
|
20
|
-
LABELVALUEDESC
|
21
|
-
TEXTBOX
|
19
|
+
LABELVALUEDESC <%= target_name %> HEALTH_STATUS TEMP1
|
20
|
+
LABELVALUEDESC <%= target_name %> HEALTH_STATUS TEMP1 "Description"
|
21
|
+
TEXTBOX <%= target_name %> ADCS PACKET_TIMEFORMATTED 400 100
|
22
22
|
END
|