diff --git a/.gitignore b/.gitignore index 12b4e1e..9a12769 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ 2024*.txt test/* -*.exe \ No newline at end of file +*.exe +doc/shopping_list.ods diff --git a/README.md b/README.md index 8b149e9..e1f19a4 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ - [CobraV2](#cobrav2) - [Table of contents](#table-of-contents) - [Installation and compilation](#installation-and-compilation) - - [Serial monitor tool](#serial-monitor-tool) + - [TTY listener](#tty-listener) - [Monitoring tool](#monitoring-tool) - [Sender and Reciever](#sender-and-reciever) - [Overview](#overview) @@ -30,12 +30,13 @@ ## Installation and compilation -### Serial monitor tool +### TTY listener ```shell git clone https://www.github.com/foglar/cobraV2.git cd cobraV2/serial_read +# run or build the code go run . go build . ``` @@ -50,6 +51,7 @@ go build . git clone https://www.github.com/foglar/cobraV2.git cd cobraV2/monitor +# run or build the code go run . go build . ``` @@ -59,6 +61,8 @@ go build . > Example command: `CC=x86_64-w64-mingw32-gcc GOOS=windows GOARCH=amd64 CGO_ENABLED=1 go build .` > For more information see: [Pixel2 Wiki | Cross Compiling](https://github.com/gopxl/pixel/wiki/%5BWIP%5D-Cross-Compiling) +![Preview of monitoring tool](doc/application_preview.png) + ### Sender and Reciever Upload sender and reciever code on the 2 arduinos @@ -92,23 +96,28 @@ Required library for antenna: [RF24](https://nrf24.github.io/RF24). Installation - sender sends data via antenna to reciever in this format **$[code of message];[value]\*** - in future will be added some other values, like gps and so on -| Identifier | Message Code | Value | Verificator | -| ---------- | ------------ | -------------------------------- | ------------| -| $ | **1**; | roll [°] | * | -| $ | **2**; | pitch [°] | * | -| $ | **3**; | yaw [°] | * | -| $ | **4**; | temperature [°C] | * | -| $ | **5**; | pressure [hPa] | * | -| $ | **6**; | altitude [m] | * | -| $ | **7**; | gyroscope x | * | -| $ | **8**; | gyroscope y | * | -| $ | **9**; | gyroscope z | * | -| $ | **10**; | accelerometer x | * | -| $ | **11**; | accelerometer y | * | -| $ | **12**; | accelerometer z | * | -| $ | **13**; | magnitude x | * | -| $ | **14**; | magnitude y | * | -| $ | **15**; | magnitude z | * | +| Identifier | Message Code | Value | Verificator | +| ---------- | ------------ | ---------------- | ----------- | +| $ | **1**; | roll [°] | * | +| $ | **2**; | pitch [°] | * | +| $ | **3**; | yaw [°] | * | +| $ | **4**; | temperature [°C] | * | +| $ | **5**; | pressure [hPa] | * | +| $ | **6**; | altitude [m] | * | +| $ | **7**; | gyroscope x | * | +| $ | **8**; | gyroscope y | * | +| $ | **9**; | gyroscope z | * | +| $ | **10**; | accelerometer x | * | +| $ | **11**; | accelerometer y | * | +| $ | **12**; | accelerometer z | * | +| $ | **13**; | magnitude x | * | +| $ | **14**; | magnitude y | * | +| $ | **15**; | magnitude z | * | + +> [!TIP] +> The acceleration output by the serial port of the sample program is the original value of the register (the value of the register). After this value is divided by 16384, it can be converted into a value in g (gravitational acceleration constant). +> The angular velocity output by the serial port of the sample program is the original value of the register (the value of the register). After this value is divided by 32.8, it can be converted into a value in dps (angle/second). +> The value of the magnetic sensor output by the serial port of the sample program is the original value of the register (that is, the value of the register). This value is multiplied by 0.15 to convert it into a value in μT (10-6 Tesla). ## Modules @@ -129,10 +138,10 @@ Required library for antenna: [RF24](https://nrf24.github.io/RF24). Installation $GPGAA,HHMMSS.SS,llll.ll,a,yyyyy.yy,a,x,xx,x.x,x.x,M,x.x,M,x.x,xxxx -| Sentence Identifier | Time | Latitude | Longtitude | Fix Quality | Number of Satellites | Horizontal Dilution of Precision | Altitude | Height of geoid above WGS84 ellipsoid | Time since last DGPS update | DGPS reference station id | Checksum | -| ------ | --------- | --------- | ---------- | - | -- | --- | ----- | ----- | --- | ---- | --- | -| $GPGAA | HHMMSS.SS | llll.ll a | yyyyy.yy a | x | xx | x.x | x.x M | x.x M | x.x | xxxx | *hh | -| $GPGAA | 170834 | 4124.8963, N | 08151.6838, W | 1 | 05 | 1.5 | 280.2, M | -34.0, M | blank | blank | *75 | +| Sentence Identifier | Time | Latitude | Longtitude | Fix Quality | Number of Satellites | Horizontal Dilution of Precision | Altitude | Height of geoid above WGS84 ellipsoid | Time since last DGPS update | DGPS reference station id | Checksum | +| ------------------- | --------- | ------------ | ------------- | ----------- | -------------------- | -------------------------------- | -------- | ------------------------------------- | --------------------------- | ------------------------- | -------- | +| $GPGAA | HHMMSS.SS | llll.ll a | yyyyy.yy a | x | xx | x.x | x.x M | x.x M | x.x | xxxx | *hh | +| $GPGAA | 170834 | 4124.8963, N | 08151.6838, W | 1 | 05 | 1.5 | 280.2, M | -34.0, M | blank | blank | *75 | > [!TIP] > Fix Quality: @@ -192,6 +201,7 @@ $GPGAA,HHMMSS.SS,llll.ll,a,yyyyy.yy,a,x,xx,x.x,x.x,M,x.x,M,x.x,xxxx - [ ] create a communication in both ways, `start`, `stop`, `system health check` commands - [ ] detection of apogeum and recovery system launch - [ ] add timestamps and save everything to sd card +- [ ] add gps ### Monitor app issues @@ -206,6 +216,8 @@ $GPGAA,HHMMSS.SS,llll.ll,a,yyyyy.yy,a,x,xx,x.x,x.x,M,x.x,M,x.x,xxxx - [ ] values change colour if they are not what they should be, or what are expected to be - [ ] if recieved data for the parameter don't correspond with our expectations, change colour of the value indicator - [ ] save all recieved data +- [ ] special characters +- [ ] don't hide the text on refresh ## Sources diff --git a/doc/application_preview_hyprland.png b/doc/application_preview_hyprland.png new file mode 100644 index 0000000..a9e4acb Binary files /dev/null and b/doc/application_preview_hyprland.png differ diff --git a/doc/application_preview_kde.png b/doc/application_preview_kde.png new file mode 100644 index 0000000..bbf2467 Binary files /dev/null and b/doc/application_preview_kde.png differ diff --git a/doc/prehled.md b/doc/prehled.md index 2b3e3bf..8acd6aa 100644 --- a/doc/prehled.md +++ b/doc/prehled.md @@ -45,7 +45,7 @@ - [x] Workshop 1 - 9.-10. března - Představení, Pravidla, Zkušenosti -- [ ] Workshop 2 - 16.-17. března +- [x] Workshop 2 - 16.-17. března - Práce v programu OpenRocket - [ ] Workshop 3 - 23.-24. března - Zážitky, úspěchy i překážky diff --git a/doc/shopping_list.csv b/doc/shopping_list.csv new file mode 100644 index 0000000..fa5c21a --- /dev/null +++ b/doc/shopping_list.csv @@ -0,0 +1,3 @@ +Waveshare 10 DOF IMU Sensor **(D)**, https://rpishop.cz/orientace-v-prostoru/2100-waveshare-10-dof-imu-sensor-d-gyroskop-akcelerometr-kompasmagnetometr.html, 1, 1199Kč +Arduino Uno Rev3 originál, https://rpishop.cz/arduino-uno/1356-arduino-uno-r3.html, 2, 709Kč +RF24L01+PA+LNA, https://rpishop.cz/wi-fi-anteny/1800-modul-bezdratoveho-vysilace-a-prijimace-rf24l01palna.html, 2, 128Kč diff --git a/monitor/main.go b/monitor/main.go index 167a390..e41c79a 100644 --- a/monitor/main.go +++ b/monitor/main.go @@ -114,9 +114,9 @@ func run() { temperature.WriteString("Temperature: " + temperature_gui) pressure.WriteString("Pressure: [hPa] " + pressure_gui) attitude.WriteString("Attitude: [m] " + attitude_gui) - roll.WriteString("Roll: " + roll_gui) - pitch.WriteString("Pitch: " + pitch_gui) - yaw.WriteString("Yaw: " + yaw_gui) + roll.WriteString("Roll: [°]" + roll_gui) + pitch.WriteString("Pitch: [°]" + pitch_gui) + yaw.WriteString("Yaw: [°]" + yaw_gui) // Draw information to screen logging_serial.Draw(win, pixel.IM) diff --git a/sender_module/sender_module.ino b/sender_module/sender_module.ino index a0cfaa0..7ed9a9e 100644 --- a/sender_module/sender_module.ino +++ b/sender_module/sender_module.ino @@ -59,6 +59,7 @@ void loop() { String str = String("$") + String(i + 1) + ";" + String(float_str) + "*"; str.toCharArray(msg, sizeof(msg)); radio.write(&msg, sizeof(msg)); + Serial.println(msg); } // Send other sensor data @@ -77,6 +78,7 @@ void loop() { String str = String("$") + String(index) + ";" + String(float_str) + "*"; str.toCharArray(msg, sizeof(msg)); radio.write(&msg, sizeof(msg)); + Serial.println(msg); index++; } }