@@ -29,6 +29,16 @@ technology for an open-source Mars rover.
29
29
30
30
## Components
31
31
32
+ ### CiC
33
+
34
+ [ ` README.md ` ] ( libraries/CiC )
35
+
36
+ The flight control system framework that powers both the Rover and Ground is a
37
+ bespoke C library providing capabilities that I deem necessary. Much of my focus
38
+ has been on telemetry and debuggability of an increasingly sophisticated
39
+ software stack. I mean, on Mars who is going plug into the Serial port and hit
40
+ the reset button for you?
41
+
32
42
### Rover
33
43
34
44
[ ` rover.ino ` ] ( rover/rover.ino )
@@ -51,23 +61,66 @@ The plan is to find the shortcomings from this simple setup and iterate.
51
61
52
62
### Ground
53
63
54
- [ ` ground.ino ` ] ( ground/ground.ino )
64
+ To communicate with the Rover, a ground station is needed. This is built around:
55
65
56
- The ground station is essentially a slimmed down version of the Rover, meant to
57
- be teathered to a computer via Serial port.
66
+ * Raspberry Pi 4
67
+ * RFM69 Transceiver (identical to the Rover's)
58
68
59
- * Arduino Duo
60
- * RFM69 Transceiver
69
+ The software stack is built around several sub-components organized as Unixy as
70
+ possible. These components ideally handle a single task and are easily
71
+ replacable as mission demands evolve.
61
72
62
- ### CiC
73
+ #### rfm69
63
74
64
- [ ` README.md ` ] ( libraries/CiC )
75
+ [ ` rfm69 ` ] ( rfm69/bin/rfm69 )
65
76
66
- The flight control system framework that powers both the Rover and Ground is a
67
- bespoke C library providing capabilities that I deem necessary. Much of my focus
68
- has been on telemetry and debuggability of an increasingly sophisticated
69
- software stack. I mean, on Mars who is going plug into the Serial port and hit
70
- the reset button for you?
77
+ This python script uses CircuitPython to interface with the rfm69 transceiver
78
+ hardware. It presents a unix domain socket on the system ` /var/stubborn/radio `
79
+ which other processes can use to send and receive data over the radio.
80
+
81
+ Bytes written to the socket are sent directly over the radio (and hopefully
82
+ received by the Rover).
83
+
84
+ Bytes recieved are sent to to the listening client.
85
+
86
+ Only a single client can connect at a time.
87
+
88
+ #### comsock
89
+
90
+ This C program is built on the same CiC stack as the rover and provides a
91
+ high-level communication interface to the Rover.
92
+
93
+ Client connect to comsock over a unix domain socket (` /var/stubborn/comsock ` )
94
+ and send commands to the rover such as:
95
+
96
+ FWD 255
97
+
98
+ The server will send this command to the Rover and display the result:
99
+
100
+ OK
101
+
102
+ Or in the event of an error:
103
+
104
+ ERR 3
105
+
106
+ The comsock service also receives telemetry data from the Rover. It's writen in
107
+ two formats.
108
+
109
+ ` /var/stubborn/to ` is a tab-delimited data file in the format:
110
+
111
+ NOW=2403777634 UP=167495 LOOP=0 COM=1 RSSI=229 ERR=2
112
+
113
+ ` /var/stubborn/to.json ` is JSON formatted:
114
+
115
+ {"NOW": 1632030343, "UP": 19252, "LOOP": 0, "RSSI": 229, "COM": 2}
116
+
117
+ #### Ground Data System (gds)
118
+
119
+ The Ground Data System is a user interface for the ground station that uses the
120
+ underlying components to receive commands from the user and display telemetry
121
+ about the Rover's operation.
122
+
123
+ It's written in Go in uses the ` tview ` library to present a fun terminal-based UI.
71
124
72
125
## Usage
73
126
@@ -81,5 +134,13 @@ Rather than rely on the Arduino IDE, scripts powered by `arduino-cli` are availa
81
134
82
135
* [ ` rover/script/build ` ] ( rover/script/build )
83
136
* [ ` rover/script/upload ` ] ( rover/script/upload )
84
- * [ ` ground/script/build ` ] ( ground/script/build )
85
- * [ ` ground/script/upload ` ] ( ground/script/upload )
137
+
138
+ ### Ground Infrastructure
139
+
140
+ Ground station services are managed using systemd. Unit files are for radio and comsock services.
141
+
142
+ gds can be run directly using ` go ` :
143
+
144
+ go run main.go
145
+
146
+ This may change as this component increases in complexity.
0 commit comments