openc3-cosmos-demo 5.14.2 → 5.15.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3a42456ecd87859607b18afc606f9551b5a7834d4fa09ecee462871adaf80036
4
- data.tar.gz: 30e5746feeef6358ae451bf8c7eb4730347821c618ca72c42ff315033a81e5e5
3
+ metadata.gz: da07845c2a468fd4a90837e5098c60e0daf48d4e4504de27d1a272fbd764b931
4
+ data.tar.gz: 80e1b0cda201edb402797a0f72a852db20103b795c96e776062b2b4ace8c9b54
5
5
  SHA512:
6
- metadata.gz: 2176ed000f9c3ace286aee6669d94db393b0e989ec14d09b80ae05f7ebcdb6b8c16d9d7188a532291242c2960e7d03c2af3c621b24daa56330fa92d7c810ce34
7
- data.tar.gz: f907a9603871dfe4867378b760759232169a0f38388e0e95fa3d39384996cc50a6af5c70c8235da01bc28d3da89110b69b9f9c7d42d958a776c7ec73d56cffa2
6
+ metadata.gz: 8093f1aa51a6c88a03d7aa54e42dedeffdd1f50e23d00022b15e1b4e04313e858b1240cb26bf897121a71f93867726e614df42886cd4f25a913602d93e683c5a
7
+ data.tar.gz: 052c322247edb795e5311f67db037ab2b688ec34b33c0d791adf1e43681d3b64c67b96a0ecaebe13dce561362d338fb4e8bb0007d823af69e56402598451bd19
@@ -85,3 +85,8 @@ COMMAND <%= target_name %> QUIET BIG_ENDIAN "Enable/disable no out of limits in
85
85
  COMMAND <%= target_name %> TIME_OFFSET BIG_ENDIAN "Subtract the packet time by the given seconds"
86
86
  <%= render "_ccsds_cmd.txt", locals: {id: 12} %>
87
87
  APPEND_PARAMETER SECONDS 32 UINT MIN MAX 0 "Seconds to subtract from packet time"
88
+
89
+ COMMAND <%= target_name %> HIDDEN BIG_ENDIAN "Hidden command to bump the hidden packet"
90
+ HIDDEN
91
+ <%= render "_ccsds_cmd.txt", locals: {id: 13} %>
92
+ APPEND_PARAMETER COUNT 32 UINT MIN MAX 0 "Count to set"
@@ -63,6 +63,14 @@ TELEMETRY <%= target_name %> HEALTH_STATUS BIG_ENDIAN "Health and status from th
63
63
  READ_CONVERSION processor_conversion.rb TEMP1STAT MEAN
64
64
  ITEM TEMP1STDDEV 0 0 DERIVED "Stddev of most recent 100 samples for TEMP1"
65
65
  READ_CONVERSION processor_conversion.rb TEMP1STAT STDDEV
66
+ ITEM TEMP1_MICRO 0 0 DERIVED
67
+ GENERIC_READ_CONVERSION_START FLOAT 32
68
+ packet.read('TEMP1') / 1_000_000
69
+ GENERIC_READ_CONVERSION_END
70
+ ITEM TEMP1_MEGA 0 0 DERIVED
71
+ GENERIC_READ_CONVERSION_START FLOAT 32
72
+ packet.read('TEMP1') * 1_000_000
73
+ GENERIC_READ_CONVERSION_END
66
74
  PROCESSOR TEMP1STAT statistics_processor.rb TEMP1 100
67
75
  PROCESSOR TEMP1WATER watermark_processor.rb TEMP1
68
76
 
@@ -147,3 +155,10 @@ TELEMETRY <%= target_name %> MECH BIG_ENDIAN "Mechanism status ©®"
147
155
  UNITS micro-Ampères µA
148
156
  ITEM PACKET_TIME 0 0 DERIVED "Ruby time based on TIMESEC and TIMEUS"
149
157
  READ_CONVERSION unix_time_conversion.rb TIMESEC TIMEUS
158
+
159
+ TELEMETRY <%= target_name %> HIDDEN BIG_ENDIAN "Hidden packet"
160
+ HIDDEN
161
+ <%= render "_ccsds_tlm.txt", locals: {apid: 6} %>
162
+ APPEND_ITEM COUNT 32 UINT "Count for hidden command"
163
+ ITEM PACKET_TIME 0 0 DERIVED "Ruby time based on TIMESEC and TIMEUS"
164
+ READ_CONVERSION unix_time_conversion.rb TIMESEC TIMEUS
@@ -116,6 +116,11 @@ module OpenC3
116
116
  packet.CcsdsSeqFlags = 'NOGROUP'
117
117
  packet.CcsdsLength = packet.buffer.length - 7
118
118
 
119
+ packet = @tlm_packets['HIDDEN']
120
+ packet.enable_method_missing
121
+ packet.CcsdsSeqFlags = 'NOGROUP'
122
+ packet.CcsdsLength = packet.buffer.length - 7
123
+
119
124
  @solar_panel_positions = SOLAR_PANEL_DFLTS.dup
120
125
  @solar_panel_thread = nil
121
126
  @solar_panel_thread_cancel = false
@@ -144,6 +149,7 @@ module OpenC3
144
149
  set_rate('PARAMS', 100)
145
150
  set_rate('IMAGE', 100)
146
151
  set_rate('MECH', 10)
152
+ set_rate('HIDDEN', 500)
147
153
  end
148
154
 
149
155
  def tick_period_seconds
@@ -211,6 +217,8 @@ module OpenC3
211
217
  when 'SLRPNLRESET'
212
218
  OpenC3.kill_thread(self, @solar_panel_thread)
213
219
  @solar_panel_positions = SOLAR_PANEL_DFLTS.dup
220
+ when 'HIDDEN'
221
+ @tlm_packets['HIDDEN'].count = packet.read('count')
214
222
  end
215
223
  end
216
224
 
@@ -368,6 +376,11 @@ module OpenC3
368
376
  packet.slrpnl4 = @solar_panel_positions[3]
369
377
  packet.slrpnl5 = @solar_panel_positions[4]
370
378
  packet.current = 0.5
379
+
380
+ when 'HIDDEN'
381
+ packet.timesec = time.tv_sec - @time_offset
382
+ packet.timeus = time.tv_usec
383
+ packet.ccsdsseqcnt += 1
371
384
  end
372
385
  end
373
386
 
@@ -1,9 +1,7 @@
1
1
  put_target_file("INST/test.txt", "this is a string test")
2
- download_file("INST/test.txt") # download via path
2
+ download_file("INST/test.txt")
3
3
  file = get_target_file("INST/test.txt")
4
4
  puts file.read
5
- file.rewind # rewind so download_file can read
6
- download_file(file) # download using file
7
5
  file.delete
8
6
  delete_target_file("INST/test.txt")
9
7
 
@@ -18,6 +16,7 @@ file.delete
18
16
  delete_target_file("INST/test.txt")
19
17
 
20
18
  put_target_file("INST/test.bin", "\x00\x01\x02\x03\xFF\xEE\xDD\xCC")
19
+ download_file("INST/test.bin")
21
20
  file = get_target_file("INST/test.bin")
22
21
  puts file.read.formatted
23
22
  file.delete
@@ -2,11 +2,9 @@ from openc3.utilities.string import formatted
2
2
  import tempfile
3
3
 
4
4
  put_target_file("INST/test.txt", "this is a string test")
5
- download_file("INST/test.txt") # download via path
5
+ download_file("INST/test.txt")
6
6
  file = get_target_file("INST/test.txt")
7
7
  print(file.read())
8
- file.seek(0) # rewind so download_file can read
9
- download_file(file) # download using file
10
8
  file.close() # closing deletes tempfile
11
9
  delete_target_file("INST/test.txt")
12
10
 
@@ -20,9 +18,9 @@ print(file.read())
20
18
  file.close()
21
19
  delete_target_file("INST/test.txt")
22
20
 
23
- # TODO: Binary not yet supported
24
- # put_target_file("INST/test.bin", b"\x00\x01\x02\x03\xFF\xEE\xDD\xCC")
25
- # file = get_target_file("INST/test.bin")
26
- # print(formatted(file.read()))
27
- # file.close()
28
- # delete_target_file("INST/test.bin")
21
+ put_target_file("INST/test.bin", b"\x00\x01\x02\x03\xFF\xEE\xDD\xCC")
22
+ download_file("INST/test.bin")
23
+ file = get_target_file("INST/test.bin")
24
+ print(formatted(file.read()))
25
+ file.close()
26
+ delete_target_file("INST/test.bin")
@@ -1,7 +1,7 @@
1
1
  import os
2
2
 
3
3
  # TBL_FILENAME is set to the name of the table file to overwrite
4
- print(f"file:{os.environ['TBL_FILENAME']}")
4
+ print(f"file:{os.getenv('TBL_FILENAME')}")
5
5
  # Download the file
6
6
  # Implement custom commanding logic to download the table
7
7
  # You probably want to do something like:
@@ -9,10 +9,9 @@ buffer = ""
9
9
  # i = 1
10
10
  # num_segments = 5 # calculate based on TBL_FILENAME
11
11
  # table_id = 1 # calculate based on TBL_FILENAME
12
- # while i < num_segments
12
+ # while i < num_segments:
13
13
  # # Request a part of the table buffer
14
- # cmd("TGT DUMP with TABLE_ID #{table_id}, SEGMENT #{i}")
14
+ # cmd(f"TGT DUMP with TABLE_ID {table_id}, SEGMENT {i}")
15
15
  # buffer += tlm("TGT DUMP_PKT DATA")
16
16
  # i += 1
17
- # end
18
- put_target_file(os.environ["TBL_FILENAME"], buffer)
17
+ put_target_file(os.getenv("TBL_FILENAME"), buffer)
@@ -2,9 +2,9 @@ import os
2
2
  from openc3.utilities.string import formatted
3
3
 
4
4
  # TBL_FILENAME is set to the name of the table file
5
- print(f"file:{os.environ['TBL_FILENAME']}")
5
+ print(f"file:{os.getenv('TBL_FILENAME')}")
6
6
  # Open the file
7
- file = get_target_file(os.environ["TBL_FILENAME"])
7
+ file = get_target_file(os.getenv("TBL_FILENAME"))
8
8
  buffer = file.read()
9
9
  # Implement custom commanding logic to upload the table
10
10
  # Note that buffer is a Ruby string of bytes