openc3-cosmos-geosim 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md ADDED
@@ -0,0 +1,15 @@
1
+ # COSMOS Configuration
2
+
3
+ See the [OpenC3 COSMOS](https://openc3.com) documentation for all things COSMOS.
4
+
5
+ ## Building the plugin
6
+
7
+ 1. <Path to COSMOS installation>\openc3.bat cli rake build VERSION=X.Y.Z
8
+ - VERSION is required
9
+ - gem file will be built locally
10
+
11
+ ## Upload plugin
12
+
13
+ 1. Go to localhost:2900/tools/admin
14
+ 1. Click the paperclip icon and choose your plugin.gem file
15
+ 1. Click Install on the variables dialog
data/Rakefile ADDED
@@ -0,0 +1,21 @@
1
+ PLUGIN_NAME = Dir['*.gemspec'][0].split('.')[0..-2].join('.')
2
+
3
+ task :require_version do
4
+ if ENV['VERSION']
5
+ if ENV['VERSION'] =~ /-/
6
+ # Add Timestamp to prerelease versions
7
+ ENV['VERSION'] = ENV['VERSION'] + "." + Time.now.utc.strftime("%Y%m%d%H%M%S")
8
+ end
9
+ else
10
+ puts "VERSION is required: rake <task> VERSION=X.X.X"
11
+ exit 1
12
+ end
13
+ end
14
+
15
+ task :build => [:require_version] do
16
+ _, platform, *_ = RUBY_PLATFORM.split("-")
17
+ if platform == 'mswin32' or platform == 'mingw32'
18
+ puts "Warning: Building gem on Windows will lose file permissions"
19
+ end
20
+ system("gem build #{PLUGIN_NAME}")
21
+ end
@@ -0,0 +1,140 @@
1
+ # encoding: ascii-8bit
2
+
3
+ # Copyright 2023 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'
20
+ require 'openc3/interfaces'
21
+ require 'openc3/tools/cmd_tlm_server/interface_thread'
22
+ require_relative 'targets/GEOSAT/lib/sim_sat'
23
+
24
+ module OpenC3
25
+ class GeosatTarget
26
+ class GeosatServerInterface < TcpipServerInterface
27
+ def initialize(port)
28
+ super(port.to_i, port.to_i, 5.0, nil, 'LENGTH', 64, 16, 11, 1, 'BIG_ENDIAN', 4, "0x1ACDFC1D", nil, true)
29
+ end
30
+ end
31
+
32
+ class GeosatInterfaceThread < InterfaceThread
33
+ def initialize(interface, sim_sat)
34
+ super(interface)
35
+ @sim_sat = sim_sat
36
+ end
37
+
38
+ protected
39
+ def handle_packet(packet)
40
+ identified_packet = System.commands.identify(packet.buffer, ['GEOSAT'])
41
+ if identified_packet
42
+ @sim_sat.write(identified_packet)
43
+ else
44
+ # Ignoring unknown packet
45
+ end
46
+ end
47
+ end
48
+
49
+ class GeosatTelemetryThread
50
+ attr_reader :thread
51
+
52
+ def initialize(interface, sim_sat)
53
+ @sim_sat = sim_sat
54
+ @interface = interface
55
+ @sleeper = Sleeper.new
56
+ @count_100hz = 0
57
+ @next_tick_time = Time.now.sys + @sim_sat.tick_period_seconds
58
+ end
59
+
60
+ def start
61
+ @thread = Thread.new do
62
+ @stop_thread = false
63
+ begin
64
+ while true
65
+ break if @stop_thread
66
+ # Calculate time to sleep to make ticks the right distance apart
67
+ now = Time.now.sys
68
+ delta = @next_tick_time - now
69
+ if delta > 0.0
70
+ @sleeper.sleep(delta) # Sleep between packets
71
+ break if @stop_thread
72
+ elsif delta < -1.0
73
+ # Fell way behind - jump next tick time
74
+ @next_tick_time = Time.now.sys
75
+ end
76
+
77
+ pending_packets = @sim_sat.read(@count_100hz, @next_tick_time)
78
+ @next_tick_time += @sim_sat.tick_period_seconds
79
+ @count_100hz += @sim_sat.tick_increment
80
+ pending_packets.each do |packet|
81
+ @interface.write(packet)
82
+ end
83
+ end
84
+ rescue Exception => err
85
+ Logger.error "GeosatTelemetryThread unexpectedly died\n#{err.formatted}"
86
+ raise err
87
+ end
88
+ end
89
+ end
90
+
91
+ def stop
92
+ @stop_thread = true
93
+ OpenC3.kill_thread(self, @thread)
94
+ end
95
+
96
+ def graceful_kill
97
+ @sleeper.cancel
98
+ end
99
+ end
100
+
101
+ def initialize(port)
102
+ System.instance(["GEOSAT"], File.join(__dir__, "targets"))
103
+ @sim_sat = SimSat.new('GEOSAT')
104
+ @sim_sat.set_rates
105
+ @interface = GeosatServerInterface.new(port)
106
+ @interface_thread = nil
107
+ @telemetry_thread = nil
108
+ end
109
+
110
+ def start
111
+ @interface_thread = GeosatInterfaceThread.new(@interface, @sim_sat)
112
+ @interface.target_names = ['GEOSAT']
113
+ @interface.cmd_target_names = ['GEOSAT']
114
+ @interface.tlm_target_names = ['GEOSAT']
115
+ @interface_thread.start
116
+ @telemetry_thread = GeosatTelemetryThread.new(@interface, @sim_sat)
117
+ @telemetry_thread.start
118
+ end
119
+
120
+ def stop
121
+ @telemetry_thread.stop if @telemetry_thread
122
+ @interface_thread.stop if @interface_thread
123
+ end
124
+
125
+ def self.run(port)
126
+ Logger.level = Logger::INFO
127
+ target = self.new(port)
128
+ begin
129
+ target.start
130
+ while true
131
+ sleep 1
132
+ end
133
+ rescue SystemExit, SignalException
134
+ target.stop
135
+ end
136
+ end
137
+ end
138
+ end
139
+
140
+ OpenC3::GeosatTarget.run(ARGV[0]) if __FILE__ == $0
@@ -0,0 +1,165 @@
1
+ COMMAND GEOSAT COLLECT BIG_ENDIAN "Starts a collect on the GEOSAT target"
2
+ PARAMETER CCSDSVER 0 3 UINT 0 0 0 "CCSDS primary header version number"
3
+ PARAMETER CCSDSTYPE 3 1 UINT 1 1 1 "CCSDS primary header packet type"
4
+ PARAMETER CCSDSSHF 4 1 UINT 0 0 0 "CCSDS primary header secondary header flag"
5
+ ID_PARAMETER CCSDSAPID 5 11 UINT 0 2047 999 "CCSDS primary header application id"
6
+ PARAMETER CCSDSSEQFLAGS 16 2 UINT 3 3 3 "CCSDS primary header sequence flags"
7
+ PARAMETER CCSDSSEQCNT 18 14 UINT 0 16383 0 "CCSDS primary header sequence count"
8
+ OVERFLOW TRUNCATE
9
+ PARAMETER CCSDSLENGTH 32 16 UINT MIN MAX 12 "CCSDS primary header packet length"
10
+ ID_PARAMETER PKTID 48 16 UINT MIN MAX 1 "Packet id"
11
+ PARAMETER TYPE 64 16 UINT MIN MAX 0 "Collect type"
12
+ REQUIRED
13
+ STATE NORMAL 0
14
+ STATE SPECIAL 1 HAZARDOUS
15
+ PARAMETER DURATION 80 32 FLOAT 0.0 10.0 1.0 "Collect duration"
16
+ PARAMETER OPCODE 112 8 UINT 0x0 0xFF 0xAB "Collect opcode"
17
+ FORMAT_STRING "0x%0X"
18
+ PARAMETER TEMP 120 32 FLOAT 0.0 25.0 0.0 "Collect temperature"
19
+ UNITS Celsius C
20
+
21
+ COMMAND GEOSAT ABORT BIG_ENDIAN "Aborts a collect on the GEOSAT instrument"
22
+ PARAMETER CCSDSVER 0 3 UINT 0 0 0 "CCSDS primary header version number"
23
+ PARAMETER CCSDSTYPE 3 1 UINT 1 1 1 "CCSDS primary header packet type"
24
+ PARAMETER CCSDSSHF 4 1 UINT 0 0 0 "CCSDS primary header secondary header flag"
25
+ ID_PARAMETER CCSDSAPID 5 11 UINT 0 2047 999 "CCSDS primary header application id"
26
+ PARAMETER CCSDSSEQFLAGS 16 2 UINT 3 3 3 "CCSDS primary header sequence flags"
27
+ PARAMETER CCSDSSEQCNT 18 14 UINT 0 16383 0 "CCSDS primary header sequence count"
28
+ OVERFLOW TRUNCATE
29
+ PARAMETER CCSDSLENGTH 32 16 UINT MIN MAX 12 "CCSDS primary header packet length"
30
+ ID_PARAMETER PKTID 48 16 UINT MIN MAX 2 "Packet id"
31
+
32
+ COMMAND GEOSAT CLEAR BIG_ENDIAN "Clears counters on the GEOSAT instrument"
33
+ HAZARDOUS "Clearing counters may lose valuable information."
34
+ PARAMETER CCSDSVER 0 3 UINT 0 0 0 "CCSDS primary header version number"
35
+ PARAMETER CCSDSTYPE 3 1 UINT 1 1 1 "CCSDS primary header packet type"
36
+ PARAMETER CCSDSSHF 4 1 UINT 0 0 0 "CCSDS primary header secondary header flag"
37
+ ID_PARAMETER CCSDSAPID 5 11 UINT 0 2047 999 "CCSDS primary header application id"
38
+ PARAMETER CCSDSSEQFLAGS 16 2 UINT 3 3 3 "CCSDS primary header sequence flags"
39
+ PARAMETER CCSDSSEQCNT 18 14 UINT 0 16383 0 "CCSDS primary header sequence count"
40
+ OVERFLOW TRUNCATE
41
+ PARAMETER CCSDSLENGTH 32 16 UINT MIN MAX 12 "CCSDS primary header packet length"
42
+ ID_PARAMETER PKTID 48 16 UINT MIN MAX 3 "Packet id"
43
+
44
+ COMMAND GEOSAT SET_MODE BIG_ENDIAN "Change spacecraft mode"
45
+ PARAMETER CCSDSVER 0 3 UINT 0 0 0 "CCSDS primary header version number"
46
+ PARAMETER CCSDSTYPE 3 1 UINT 1 1 1 "CCSDS primary header packet type"
47
+ PARAMETER CCSDSSHF 4 1 UINT 0 0 0 "CCSDS primary header secondary header flag"
48
+ ID_PARAMETER CCSDSAPID 5 11 UINT 0 2047 999 "CCSDS primary header application id"
49
+ PARAMETER CCSDSSEQFLAGS 16 2 UINT 3 3 3 "CCSDS primary header sequence flags"
50
+ PARAMETER CCSDSSEQCNT 18 14 UINT 0 16383 0 "CCSDS primary header sequence count"
51
+ OVERFLOW TRUNCATE
52
+ PARAMETER CCSDSLENGTH 32 16 UINT MIN MAX 12 "CCSDS primary header packet length"
53
+ ID_PARAMETER PKTID 48 16 UINT MIN MAX 4 "Packet id"
54
+ APPEND_PARAMETER MODE 8 UINT 0 2 0 "Desired Mode"
55
+ REQUIRED
56
+ STATE SAFE 0
57
+ STATE CHECKOUT 1
58
+ STATE OPERATE 2
59
+
60
+ COMMAND GEOSAT SLRPNLDEPLOY BIG_ENDIAN "Deploy solar array panel"
61
+ PARAMETER CCSDSVER 0 3 UINT 0 0 0 "CCSDS primary header version number"
62
+ PARAMETER CCSDSTYPE 3 1 UINT 1 1 1 "CCSDS primary header packet type"
63
+ PARAMETER CCSDSSHF 4 1 UINT 0 0 0 "CCSDS primary header secondary header flag"
64
+ ID_PARAMETER CCSDSAPID 5 11 UINT 0 2047 999 "CCSDS primary header application id"
65
+ PARAMETER CCSDSSEQFLAGS 16 2 UINT 3 3 3 "CCSDS primary header sequence flags"
66
+ PARAMETER CCSDSSEQCNT 18 14 UINT 0 16383 0 "CCSDS primary header sequence count"
67
+ OVERFLOW TRUNCATE
68
+ PARAMETER CCSDSLENGTH 32 16 UINT MIN MAX 12 "CCSDS primary header packet length"
69
+ ID_PARAMETER PKTID 48 16 UINT MIN MAX 5 "Packet id"
70
+ APPEND_PARAMETER NUM 8 UINT 1 2 1 "Solar Array Number"
71
+
72
+ COMMAND GEOSAT SLRPNLSTOW BIG_ENDIAN "Stow solar array panel"
73
+ PARAMETER CCSDSVER 0 3 UINT 0 0 0 "CCSDS primary header version number"
74
+ PARAMETER CCSDSTYPE 3 1 UINT 1 1 1 "CCSDS primary header packet type"
75
+ PARAMETER CCSDSSHF 4 1 UINT 0 0 0 "CCSDS primary header secondary header flag"
76
+ ID_PARAMETER CCSDSAPID 5 11 UINT 0 2047 999 "CCSDS primary header application id"
77
+ PARAMETER CCSDSSEQFLAGS 16 2 UINT 3 3 3 "CCSDS primary header sequence flags"
78
+ PARAMETER CCSDSSEQCNT 18 14 UINT 0 16383 0 "CCSDS primary header sequence count"
79
+ OVERFLOW TRUNCATE
80
+ PARAMETER CCSDSLENGTH 32 16 UINT MIN MAX 12 "CCSDS primary header packet length"
81
+ ID_PARAMETER PKTID 48 16 UINT MIN MAX 6 "Packet id"
82
+ APPEND_PARAMETER NUM 8 UINT 1 2 1 "Solar Array Number"
83
+
84
+ COMMAND GEOSAT SLRPNLANG BIG_ENDIAN "Set Solar Array Panel Angle"
85
+ PARAMETER CCSDSVER 0 3 UINT 0 0 0 "CCSDS primary header version number"
86
+ PARAMETER CCSDSTYPE 3 1 UINT 1 1 1 "CCSDS primary header packet type"
87
+ PARAMETER CCSDSSHF 4 1 UINT 0 0 0 "CCSDS primary header secondary header flag"
88
+ ID_PARAMETER CCSDSAPID 5 11 UINT 0 2047 999 "CCSDS primary header application id"
89
+ PARAMETER CCSDSSEQFLAGS 16 2 UINT 3 3 3 "CCSDS primary header sequence flags"
90
+ PARAMETER CCSDSSEQCNT 18 14 UINT 0 16383 0 "CCSDS primary header sequence count"
91
+ OVERFLOW TRUNCATE
92
+ PARAMETER CCSDSLENGTH 32 16 UINT MIN MAX 12 "CCSDS primary header packet length"
93
+ ID_PARAMETER PKTID 48 16 UINT MIN MAX 7 "Packet id"
94
+ APPEND_PARAMETER NUM 8 UINT 1 2 1 "Solar Array Number"
95
+ APPEND_PARAMETER ANG 32 FLOAT 0 360 0 "Solar Array Angle"
96
+ UNITS DEGREES DEG
97
+
98
+ COMMAND GEOSAT TABLE_LOAD BIG_ENDIAN "Load table"
99
+ PARAMETER CCSDSVER 0 3 UINT 0 0 0 "CCSDS primary header version number"
100
+ PARAMETER CCSDSTYPE 3 1 UINT 1 1 1 "CCSDS primary header packet type"
101
+ PARAMETER CCSDSSHF 4 1 UINT 0 0 0 "CCSDS primary header secondary header flag"
102
+ ID_PARAMETER CCSDSAPID 5 11 UINT 0 2047 999 "CCSDS primary header application id"
103
+ PARAMETER CCSDSSEQFLAGS 16 2 UINT 3 3 3 "CCSDS primary header sequence flags"
104
+ PARAMETER CCSDSSEQCNT 18 14 UINT 0 16383 0 "CCSDS primary header sequence count"
105
+ OVERFLOW TRUNCATE
106
+ PARAMETER CCSDSLENGTH 32 16 UINT MIN MAX 12 "CCSDS primary header packet length"
107
+ ID_PARAMETER PKTID 48 16 UINT MIN MAX 8 "Packet id"
108
+ APPEND_PARAMETER DATA 80 BLOCK "" "Table data"
109
+
110
+ COMMAND GEOSAT HTR_CTRL BIG_ENDIAN "Heater Control ON/OFF"
111
+ PARAMETER CCSDSVER 0 3 UINT 0 0 0 "CCSDS primary header version number"
112
+ PARAMETER CCSDSTYPE 3 1 UINT 1 1 1 "CCSDS primary header packet type"
113
+ PARAMETER CCSDSSHF 4 1 UINT 0 0 0 "CCSDS primary header secondary header flag"
114
+ ID_PARAMETER CCSDSAPID 5 11 UINT 0 2047 999 "CCSDS primary header application id"
115
+ PARAMETER CCSDSSEQFLAGS 16 2 UINT 3 3 3 "CCSDS primary header sequence flags"
116
+ PARAMETER CCSDSSEQCNT 18 14 UINT 0 16383 0 "CCSDS primary header sequence count"
117
+ OVERFLOW TRUNCATE
118
+ PARAMETER CCSDSLENGTH 32 16 UINT MIN MAX 12 "CCSDS primary header packet length"
119
+ ID_PARAMETER PKTID 48 16 UINT MIN MAX 9 "Packet id"
120
+ APPEND_PARAMETER NUM 8 UINT 1 2 1 "Heater Number"
121
+ APPEND_PARAMETER STATE 8 UINT 0 1 0 "Desired State"
122
+ STATE OFF 0 HAZARDOUS
123
+ STATE ON 1
124
+
125
+ COMMAND GEOSAT HTR_STATE BIG_ENDIAN "Heater State ON/OFF"
126
+ PARAMETER CCSDSVER 0 3 UINT 0 0 0 "CCSDS primary header version number"
127
+ PARAMETER CCSDSTYPE 3 1 UINT 1 1 1 "CCSDS primary header packet type"
128
+ PARAMETER CCSDSSHF 4 1 UINT 0 0 0 "CCSDS primary header secondary header flag"
129
+ ID_PARAMETER CCSDSAPID 5 11 UINT 0 2047 999 "CCSDS primary header application id"
130
+ PARAMETER CCSDSSEQFLAGS 16 2 UINT 3 3 3 "CCSDS primary header sequence flags"
131
+ PARAMETER CCSDSSEQCNT 18 14 UINT 0 16383 0 "CCSDS primary header sequence count"
132
+ OVERFLOW TRUNCATE
133
+ PARAMETER CCSDSLENGTH 32 16 UINT MIN MAX 12 "CCSDS primary header packet length"
134
+ ID_PARAMETER PKTID 48 16 UINT MIN MAX 10 "Packet id"
135
+ APPEND_PARAMETER NUM 8 UINT 1 2 1 "Heater Number"
136
+ APPEND_PARAMETER STATE 8 UINT 0 1 0 "Desired State"
137
+ STATE OFF 0
138
+ STATE ON 1
139
+
140
+ COMMAND GEOSAT HTR_SETPT BIG_ENDIAN "Heater Setpoint"
141
+ PARAMETER CCSDSVER 0 3 UINT 0 0 0 "CCSDS primary header version number"
142
+ PARAMETER CCSDSTYPE 3 1 UINT 1 1 1 "CCSDS primary header packet type"
143
+ PARAMETER CCSDSSHF 4 1 UINT 0 0 0 "CCSDS primary header secondary header flag"
144
+ ID_PARAMETER CCSDSAPID 5 11 UINT 0 2047 999 "CCSDS primary header application id"
145
+ PARAMETER CCSDSSEQFLAGS 16 2 UINT 3 3 3 "CCSDS primary header sequence flags"
146
+ PARAMETER CCSDSSEQCNT 18 14 UINT 0 16383 0 "CCSDS primary header sequence count"
147
+ OVERFLOW TRUNCATE
148
+ PARAMETER CCSDSLENGTH 32 16 UINT MIN MAX 12 "CCSDS primary header packet length"
149
+ ID_PARAMETER PKTID 48 16 UINT MIN MAX 11 "Packet id"
150
+ APPEND_PARAMETER NUM 8 UINT 1 2 1 "Heater Number"
151
+ APPEND_PARAMETER SETPT 32 FLOAT -100 100 0 "Setpoint"
152
+
153
+ COMMAND GEOSAT ADCS_CTRL BIG_ENDIAN "ADCS Control of Solar Panel Angle ON/OFF"
154
+ PARAMETER CCSDSVER 0 3 UINT 0 0 0 "CCSDS primary header version number"
155
+ PARAMETER CCSDSTYPE 3 1 UINT 1 1 1 "CCSDS primary header packet type"
156
+ PARAMETER CCSDSSHF 4 1 UINT 0 0 0 "CCSDS primary header secondary header flag"
157
+ ID_PARAMETER CCSDSAPID 5 11 UINT 0 2047 999 "CCSDS primary header application id"
158
+ PARAMETER CCSDSSEQFLAGS 16 2 UINT 3 3 3 "CCSDS primary header sequence flags"
159
+ PARAMETER CCSDSSEQCNT 18 14 UINT 0 16383 0 "CCSDS primary header sequence count"
160
+ OVERFLOW TRUNCATE
161
+ PARAMETER CCSDSLENGTH 32 16 UINT MIN MAX 12 "CCSDS primary header packet length"
162
+ ID_PARAMETER PKTID 48 16 UINT MIN MAX 12 "Packet id"
163
+ APPEND_PARAMETER STATE 8 UINT 0 1 0 "Desired State"
164
+ STATE OFF 0 HAZARDOUS
165
+ STATE ON 1
@@ -0,0 +1,273 @@
1
+ TELEMETRY GEOSAT HEALTH_STATUS BIG_ENDIAN "Health and status from the GEOSAT target"
2
+ APPEND_ITEM CCSDSVER 3 UINT "CCSDS packet version number (See CCSDS 133.0-B-1)"
3
+ APPEND_ITEM CCSDSTYPE 1 UINT "CCSDS packet type (command or telemetry)"
4
+ STATE TLM 0
5
+ STATE CMD 1
6
+ APPEND_ITEM CCSDSSHF 1 UINT "CCSDS secondary header flag"
7
+ STATE FALSE 0
8
+ STATE TRUE 1
9
+ APPEND_ID_ITEM CCSDSAPID 11 UINT 1 "CCSDS application process id"
10
+ APPEND_ITEM CCSDSSEQFLAGS 2 UINT "CCSDS sequence flags"
11
+ STATE FIRST 1
12
+ STATE CONT 0
13
+ STATE LAST 2
14
+ STATE NOGROUP 3
15
+ APPEND_ITEM CCSDSSEQCNT 14 UINT "CCSDS packet sequence count"
16
+ OVERFLOW TRUNCATE
17
+ APPEND_ITEM CCSDSLENGTH 16 UINT "CCSDS packet data length"
18
+ APPEND_ITEM TIMESEC 32 UINT "Seconds since epoch (January 1st, 1970, midnight)"
19
+ APPEND_ITEM TIMEUS 32 UINT "Microseconds of second"
20
+ APPEND_ID_ITEM PKTID 16 UINT 1 "Packet id (The combination of CCSDS_APID and PACKET_ID identify the packet)"
21
+ APPEND_ITEM CMD_ACPT_CNT 32 UINT "Command accept counter"
22
+ APPEND_ITEM CMD_RJCT_CNT 32 UINT "Command reject counter"
23
+ APPEND_ITEM MODE 8 UINT "Spacecraft mode"
24
+ STATE SAFE 0 RED
25
+ STATE CHECKOUT 1 YELLOW
26
+ STATE OPERATE 2 GREEN
27
+ APPEND_ITEM CPU_PWR 32 FLOAT "CPU Power"
28
+ UNITS WATTS W
29
+ APPEND_ITEM TABLE_DATA 80 BLOCK "Table Data"
30
+ ITEM PACKET_TIME 0 0 DERIVED "Ruby time based on TIMESEC and TIMEUS"
31
+ READ_CONVERSION unix_time_conversion.rb TIMESEC TIMEUS
32
+
33
+ TELEMETRY GEOSAT THERMAL BIG_ENDIAN "Thermal data"
34
+ APPEND_ITEM CCSDSVER 3 UINT "CCSDS packet version number (See CCSDS 133.0-B-1)"
35
+ APPEND_ITEM CCSDSTYPE 1 UINT "CCSDS packet type (command or telemetry)"
36
+ STATE TLM 0
37
+ STATE CMD 1
38
+ APPEND_ITEM CCSDSSHF 1 UINT "CCSDS secondary header flag"
39
+ STATE FALSE 0
40
+ STATE TRUE 1
41
+ APPEND_ID_ITEM CCSDSAPID 11 UINT 2 "CCSDS application process id"
42
+ APPEND_ITEM CCSDSSEQFLAGS 2 UINT "CCSDS sequence flags"
43
+ STATE FIRST 1
44
+ STATE CONT 0
45
+ STATE LAST 2
46
+ STATE NOGROUP 3
47
+ APPEND_ITEM CCSDSSEQCNT 14 UINT "CCSDS packet sequence count"
48
+ OVERFLOW TRUNCATE
49
+ APPEND_ITEM CCSDSLENGTH 16 UINT "CCSDS packet data length"
50
+ APPEND_ITEM TIMESEC 32 UINT "Seconds since epoch (January 1st, 1970, midnight)"
51
+ APPEND_ITEM TIMEUS 32 UINT "Microseconds of second"
52
+ APPEND_ID_ITEM PKTID 16 UINT 1 "Packet id (The combination of CCSDS_APID and PACKET_ID identify the packet)"
53
+ APPEND_ITEM TEMP1 32 FLOAT "Temperature #1"
54
+ UNITS CELSIUS C
55
+ FORMAT_STRING "%0.2f"
56
+ LIMITS DEFAULT 1 ENABLED -10.0 -0.0 40.0 50.0 25.0 35.0
57
+ APPEND_ITEM TEMP2 32 FLOAT "Temperature #2"
58
+ UNITS CELSIUS C
59
+ FORMAT_STRING "%0.2f"
60
+ LIMITS DEFAULT 1 ENABLED -10.0 -0.0 40.0 50.0 25.0 35.0
61
+ APPEND_ITEM HEATER1_CTRL 8 UINT "Heater 1 Control ON/OFF"
62
+ STATE OFF 0
63
+ STATE ON 1
64
+ APPEND_ITEM HEATER1_STATE 8 UINT "Heater 1 State ON/OFF"
65
+ STATE OFF 0
66
+ STATE ON 1
67
+ APPEND_ITEM HEATER1_SETPT 32 FLOAT "Heater 1 Setpoint"
68
+ UNITS CELCIUS C
69
+ APPEND_ITEM HEATER1_PWR 32 FLOAT "Heater 1 Power"
70
+ UNITS WATTS W
71
+ APPEND_ITEM HEATER2_CTRL 8 UINT "Heater 2 Control ON/OFF"
72
+ STATE OFF 0
73
+ STATE ON 1
74
+ APPEND_ITEM HEATER2_STATE 8 UINT "Heater 2 State ON/OFF"
75
+ STATE OFF 0
76
+ STATE ON 1
77
+ APPEND_ITEM HEATER2_SETPT 32 FLOAT "Heater 2 Setpoint"
78
+ UNITS CELCIUS C
79
+ APPEND_ITEM HEATER2_PWR 32 FLOAT "Heater 2 Power"
80
+ UNITS WATTS W
81
+ ITEM PACKET_TIME 0 0 DERIVED "Ruby time based on TIMESEC and TIMEUS"
82
+ READ_CONVERSION unix_time_conversion.rb TIMESEC TIMEUS
83
+
84
+ TELEMETRY GEOSAT ADCS BIG_ENDIAN "Position and attitude data"
85
+ APPEND_ITEM CCSDSVER 3 UINT "CCSDS packet version number (See CCSDS 133.0-B-1)"
86
+ APPEND_ITEM CCSDSTYPE 1 UINT "CCSDS packet type (command or telemetry)"
87
+ STATE TLM 0
88
+ STATE CMD 1
89
+ APPEND_ITEM CCSDSSHF 1 UINT "CCSDS secondary header flag"
90
+ STATE FALSE 0
91
+ STATE TRUE 1
92
+ APPEND_ID_ITEM CCSDSAPID 11 UINT 3 "CCSDS application process id"
93
+ APPEND_ITEM CCSDSSEQFLAGS 2 UINT "CCSDS sequence flags"
94
+ STATE FIRST 1
95
+ STATE CONT 0
96
+ STATE LAST 2
97
+ STATE NOGROUP 3
98
+ APPEND_ITEM CCSDSSEQCNT 14 UINT "CCSDS packet sequence count"
99
+ OVERFLOW TRUNCATE
100
+ APPEND_ITEM CCSDSLENGTH 16 UINT "CCSDS packet data length"
101
+ APPEND_ITEM TIMESEC 32 UINT "Seconds since epoch (January 1st, 1970, midnight)"
102
+ APPEND_ITEM TIMEUS 32 UINT "Microseconds of second"
103
+ APPEND_ID_ITEM PKTID 16 UINT 1 "Packet id (The combination of CCSDS_APID and PACKET_ID identify the packet)"
104
+ ITEM POSX 128 32 FLOAT "Position X"
105
+ UNITS METERS M
106
+ ITEM POSY 160 32 FLOAT "Position Y"
107
+ UNITS METERS M
108
+ ITEM POSZ 192 32 FLOAT "Position Z"
109
+ UNITS METERS M
110
+ ITEM VELX 224 32 FLOAT "Velocity X"
111
+ UNITS METERS_PER_SECOND MPS
112
+ ITEM VELY 256 32 FLOAT "Velocity Y"
113
+ UNITS METERS_PER_SECOND MPS
114
+ ITEM VELZ 288 32 FLOAT "Velocity Z"
115
+ UNITS METERS_PER_SECOND MPS
116
+ ITEM Q1 320 32 FLOAT "Quaternion param 1"
117
+ FORMAT_STRING "%0.6f"
118
+ ITEM Q2 352 32 FLOAT "Quaternion param 2"
119
+ FORMAT_STRING "%0.6f"
120
+ ITEM Q3 384 32 FLOAT "Quaternion param 3"
121
+ FORMAT_STRING "%0.6f"
122
+ ITEM Q4 416 32 FLOAT "Quaternion param 4"
123
+ FORMAT_STRING "%0.6f"
124
+ ITEM BIASX 448 32 FLOAT "Body X rate bias"
125
+ FORMAT_STRING "%0.6f"
126
+ ITEM BIASY 480 32 FLOAT "Body Y rate bias"
127
+ FORMAT_STRING "%0.6f"
128
+ ITEM BIASZ 512 32 FLOAT "Body Z rate bias"
129
+ FORMAT_STRING "%0.6f"
130
+ APPEND_ITEM STAR1ID 16 UINT "Star 1 id"
131
+ APPEND_ITEM STAR2ID 16 UINT "Star 2 id"
132
+ APPEND_ITEM STAR3ID 16 UINT "Star 3 id"
133
+ APPEND_ITEM STAR4ID 16 UINT "Star 4 id"
134
+ APPEND_ITEM STAR5ID 16 UINT "Star 5 id"
135
+ ITEM POSPROGRESS 624 32 FLOAT "Position file progress"
136
+ FORMAT_STRING "%0.2f"
137
+ ITEM ATTPROGRESS 656 32 FLOAT "Attitude file progress"
138
+ FORMAT_STRING "%0.2f"
139
+ APPEND_ITEM SR_ANG_TO_SUN 32 FLOAT "Ideal Solar Array Angle to Point at Sun"
140
+ FORMAT_STRING "%0.2f"
141
+ APPEND_ITEM ADCS_CTRL 8 UINT "ADCS Control ON/OFF"
142
+ STATE OFF 0 YELLOW
143
+ STATE ON 1 GREEN
144
+ ITEM PACKET_TIME 0 0 DERIVED "Ruby time based on TIMESEC and TIMEUS"
145
+ READ_CONVERSION unix_time_conversion.rb TIMESEC TIMEUS
146
+
147
+ TELEMETRY GEOSAT EVENT BIG_ENDIAN "Event packet"
148
+ APPEND_ITEM CCSDSVER 3 UINT "CCSDS packet version number (See CCSDS 133.0-B-1)"
149
+ APPEND_ITEM CCSDSTYPE 1 UINT "CCSDS packet type (command or telemetry)"
150
+ STATE TLM 0
151
+ STATE CMD 1
152
+ APPEND_ITEM CCSDSSHF 1 UINT "CCSDS secondary header flag"
153
+ STATE FALSE 0
154
+ STATE TRUE 1
155
+ APPEND_ID_ITEM CCSDSAPID 11 UINT 4 "CCSDS application process id"
156
+ APPEND_ITEM CCSDSSEQFLAGS 2 UINT "CCSDS sequence flags"
157
+ STATE FIRST 1
158
+ STATE CONT 0
159
+ STATE LAST 2
160
+ STATE NOGROUP 3
161
+ APPEND_ITEM CCSDSSEQCNT 14 UINT "CCSDS packet sequence count"
162
+ OVERFLOW TRUNCATE
163
+ APPEND_ITEM CCSDSLENGTH 16 UINT "CCSDS packet data length"
164
+ APPEND_ITEM TIMESEC 32 UINT "Seconds since epoch (January 1st, 1970, midnight)"
165
+ APPEND_ITEM TIMEUS 32 UINT "Microseconds of second"
166
+ APPEND_ID_ITEM PKTID 16 UINT 1 "Packet id (The combination of CCSDS_APID and PACKET_ID identify the packet)"
167
+ APPEND_ITEM MESSAGE 0 STRING "Event Message"
168
+ ITEM PACKET_TIME 0 0 DERIVED "Ruby time based on TIMESEC and TIMEUS"
169
+ READ_CONVERSION unix_time_conversion.rb TIMESEC TIMEUS
170
+
171
+ TELEMETRY GEOSAT IMAGE BIG_ENDIAN "Packet with image data"
172
+ APPEND_ITEM CCSDSVER 3 UINT "CCSDS packet version number (See CCSDS 133.0-B-1)"
173
+ APPEND_ITEM CCSDSTYPE 1 UINT "CCSDS packet type (command or telemetry)"
174
+ STATE TLM 0
175
+ STATE CMD 1
176
+ APPEND_ITEM CCSDSSHF 1 UINT "CCSDS secondary header flag"
177
+ STATE FALSE 0
178
+ STATE TRUE 1
179
+ APPEND_ID_ITEM CCSDSAPID 11 UINT 5 "CCSDS application process id"
180
+ APPEND_ITEM CCSDSSEQFLAGS 2 UINT "CCSDS sequence flags"
181
+ STATE FIRST 1
182
+ STATE CONT 0
183
+ STATE LAST 2
184
+ STATE NOGROUP 3
185
+ APPEND_ITEM CCSDSSEQCNT 14 UINT "CCSDS packet sequence count"
186
+ OVERFLOW TRUNCATE
187
+ APPEND_ITEM CCSDSLENGTH 16 UINT "CCSDS packet data length"
188
+ APPEND_ITEM TIMESEC 32 UINT "Seconds since epoch (January 1st, 1970, midnight)"
189
+ APPEND_ITEM TIMEUS 32 UINT "Microseconds of second"
190
+ APPEND_ID_ITEM PKTID 16 UINT 1 "Packet id (The combination of CCSDS_APID and PACKET_ID identify the packet)"
191
+ ITEM BYTES 128 32 UINT "First bytes"
192
+ FORMAT_STRING '0x%08x'
193
+ ITEM IMAGE 128 0 BLOCK "Image Data"
194
+ OVERLAP # Notify OpenC3 that this is intentionally overlapping the BYTES field
195
+ ITEM PACKET_TIME 0 0 DERIVED "Ruby time based on TIMESEC and TIMEUS"
196
+ READ_CONVERSION unix_time_conversion.rb TIMESEC TIMEUS
197
+
198
+ TELEMETRY GEOSAT MECH BIG_ENDIAN "Mechanism status"
199
+ APPEND_ITEM CCSDSVER 3 UINT "CCSDS packet version number (See CCSDS 133.0-B-1)"
200
+ APPEND_ITEM CCSDSTYPE 1 UINT "CCSDS packet type (command or telemetry)"
201
+ STATE TLM 0
202
+ STATE CMD 1
203
+ APPEND_ITEM CCSDSSHF 1 UINT "CCSDS secondary header flag"
204
+ STATE FALSE 0
205
+ STATE TRUE 1
206
+ APPEND_ID_ITEM CCSDSAPID 11 UINT 6 "CCSDS application process id"
207
+ APPEND_ITEM CCSDSSEQFLAGS 2 UINT "CCSDS sequence flags"
208
+ STATE FIRST 1
209
+ STATE CONT 0
210
+ STATE LAST 2
211
+ STATE NOGROUP 3
212
+ APPEND_ITEM CCSDSSEQCNT 14 UINT "CCSDS packet sequence count"
213
+ OVERFLOW TRUNCATE
214
+ APPEND_ITEM CCSDSLENGTH 16 UINT "CCSDS packet data length"
215
+ APPEND_ITEM TIMESEC 32 UINT "Seconds since epoch (January 1st, 1970, midnight)"
216
+ APPEND_ITEM TIMEUS 32 UINT "Microseconds of second"
217
+ APPEND_ID_ITEM PKTID 16 UINT 1 "Packet id (The combination of CCSDS_APID and PACKET_ID identify the packet)"
218
+ APPEND_ITEM SLRPNL1_ANG 32 FLOAT "Solar panel 1 angle"
219
+ UNITS DEGREES DEG
220
+ APPEND_ITEM SLRPNL2_ANG 32 FLOAT "Solar panel 2 angle"
221
+ UNITS DEGREES DEG
222
+ APPEND_ITEM SLRPNL1_STATE 8 UINT "Solar panel 1 state DEPLOYED/STOWED"
223
+ STATE STOWED 0 YELLOW
224
+ STATE DEPLOYED 1 GREEN
225
+ APPEND_ITEM SLRPNL2_STATE 8 UINT "Solar panel 2 state DEPLOYED/STOWED"
226
+ STATE STOWED 0 YELLOW
227
+ STATE DEPLOYED 1 GREEN
228
+ APPEND_ITEM SLRPNL1_PWR 32 FLOAT "Solar panel 1 power"
229
+ LIMITS DEFAULT 1 ENABLED 50 100 505 510
230
+ UNITS WATTS W
231
+ APPEND_ITEM SLRPNL2_PWR 32 FLOAT "Solar panel 2 power"
232
+ LIMITS DEFAULT 1 ENABLED 50 100 505 510
233
+ UNITS WATTS W
234
+ APPEND_ITEM BATTERY 32 FLOAT "Battery Percentage"
235
+ UNITS PERCENT %
236
+ LIMITS DEFAULT 1 ENABLED 10 50 105 110
237
+ FORMAT_STRING "%0.2f"
238
+ ITEM PACKET_TIME 0 0 DERIVED "Ruby time based on TIMESEC and TIMEUS"
239
+ READ_CONVERSION unix_time_conversion.rb TIMESEC TIMEUS
240
+
241
+ TELEMETRY GEOSAT IMAGER BIG_ENDIAN "Imager Status"
242
+ APPEND_ITEM CCSDSVER 3 UINT "CCSDS packet version number (See CCSDS 133.0-B-1)"
243
+ APPEND_ITEM CCSDSTYPE 1 UINT "CCSDS packet type (command or telemetry)"
244
+ STATE TLM 0
245
+ STATE CMD 1
246
+ APPEND_ITEM CCSDSSHF 1 UINT "CCSDS secondary header flag"
247
+ STATE FALSE 0
248
+ STATE TRUE 1
249
+ APPEND_ID_ITEM CCSDSAPID 11 UINT 7 "CCSDS application process id"
250
+ APPEND_ITEM CCSDSSEQFLAGS 2 UINT "CCSDS sequence flags"
251
+ STATE FIRST 1
252
+ STATE CONT 0
253
+ STATE LAST 2
254
+ STATE NOGROUP 3
255
+ APPEND_ITEM CCSDSSEQCNT 14 UINT "CCSDS packet sequence count"
256
+ OVERFLOW TRUNCATE
257
+ APPEND_ITEM CCSDSLENGTH 16 UINT "CCSDS packet data length"
258
+ APPEND_ITEM TIMESEC 32 UINT "Seconds since epoch (January 1st, 1970, midnight)"
259
+ APPEND_ITEM TIMEUS 32 UINT "Microseconds of second"
260
+ APPEND_ID_ITEM PKTID 16 UINT 1 "Packet id (The combination of CCSDS_APID and PACKET_ID identify the packet)"
261
+ APPEND_ITEM COLLECTS 16 UINT "Number of collects"
262
+ APPEND_ITEM DURATION 32 FLOAT "Most recent collect duration"
263
+ APPEND_ITEM COLLECT_TYPE 16 UINT "Most recent collect type"
264
+ STATE NORMAL 0
265
+ STATE SPECIAL 1
266
+ STATE ERROR ANY
267
+ APPEND_ITEM IMAGER_STATE 8 UINT "Imager State ON/OFF"
268
+ STATE OFF 0
269
+ STATE ON 1
270
+ APPEND_ITEM IMAGER_PWR 32 FLOAT "Image Power"
271
+ UNITS WATTS W
272
+ ITEM PACKET_TIME 0 0 DERIVED "Ruby time based on TIMESEC and TIMEUS"
273
+ READ_CONVERSION unix_time_conversion.rb TIMESEC TIMEUS