Skip to content
Snippets Groups Projects
Commit 8f10f3c9 authored by ucart's avatar ucart
Browse files

implemented script for testing groundstation side of real-time data analysis tool

parent 6d171c32
No related branches found
No related tags found
No related merge requests found
MicroCART @ 5600e197
Subproject commit 5600e197a414c92426b3535b6c0b69c73e8c6ee3
File added
/*
* This basic script will populate a .txt file (gui_testLogFile) with junk
* (but viable) data. This is for the purpose of testing the real time
* data logging feature on the groundstation side.
*
*/
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
static int NUM_OPERATIONS = 50;
int main(){
FILE * f = fopen("gui_testLogFile.txt", "a");
FILE * to_write = fopen("junk_data.txt", "r");
char buffer[1048];
int i = 0;
if (f == NULL){
perror("Error opening file");
}
if (to_write == NULL){
perror("Error opening junk file");
}
while(i < NUM_OPERATIONS){
FILE * f = fopen("gui_testLogFile.txt", "a");
fgets(buffer, 746, to_write);
fprintf(f, buffer);
fclose(f);
i++;
sleep(1);
}
fclose(to_write);
return 0;
}
# MicroCART On-board Quad Log
# Sample size: 1408
# IMU IIC failures: 0
# LiDAR IIC failures: 0
# Optical Flow IIC failures: 0
# Roll PID : Kp = 35.000000 Ki = 0.000000 Kd = 1.000000 Alpha = 0.880000
# Pitch PID : Kp = 35.000000 Ki = 0.000000 Kd = 1.000000 Alpha = 0.880000
# Yaw PID : Kp = 2.600000 Ki = 0.000000 Kd = 0.000000 Alpha = 0.000000
# Roll Rate PID : Kp = 0.030000 Ki = 0.000000 Kd = 0.005000 Alpha = 0.880000
# Pitch Rate PID : Kp = 0.030000 Ki = 0.000000 Kd = 0.005000 Alpha = 0.880000
# Yaw Rate PID : Kp = 0.297000 Ki = 0.000000 Kd = 0.000000 Alpha = 0.000000
# X pos PID : Kp = 0.550000 Ki = 0.007500 Kd = 0.000000 Alpha = 0.000000
# Y pos PID : Kp = 0.550000 Ki = 0.007500 Kd = 0.000000 Alpha = 0.000000
# Altitude PID : Kp = -0.098040 Ki = -0.008170 Kd = -0.073530 Alpha = 0.880000
# X Vel PID : Kp = -0.100000 Ki = 0.000000 Kd = -0.020000 Alpha = 0.000000
# Y Vel PID : Kp = 0.100000 Ki = 0.000000 Kd = 0.020000 Alpha = 0.000000
# X Vel : Kp = 0.000000 Ki = 0.000000 Kd = -1.000000 Alpha = 0.880000
# Y Vel : Kp = 0.000000 Ki = 0.000000 Kd = -1.000000 Alpha = 0.880000
%Time accel_x accel_y accel_z gyro_x gyro_y gyro_z mag_x mag_y mag_z Roll_Constant Yaw_Constant X Setpoint_Constant Y Setpoint_Constant Alt Setpoint_Constant Yaw Setpoint_Constant Lidar_Constant VRPN X_Constant VRPN Y_Constant VRPN Alt_Constant Flow Vel X_Constant Flow Vel Y_Constant Flow Quality_Constant Altitude PID_Correction X pos PID_Correction Y pos PID_Correction Pitch PID_Correction Roll PID_Correction Yaw PID_Correction Pitch Rate PID_Correction Roll Rate PID_Correction Yaw Rate PID_Correction Pitch trim add_Sum Signal Mixer_MOTOR 0 Signal Mixer_MOTOR 1 Signal Mixer_MOTOR 2 Signal Mixer_MOTOR 3 X Vel PID_Correction Y Vel PID_Correction X Vel_Correction Y Vel_Correction OF Offset Angle_Rotated X OF Offset Angle_Rotated Y OF Integrate X_Integrated OF Integrate Y_Integrated PSI Sum_Sum Mag Yaw_Constant
&s G G G rad/s rad/s rad/s uT uT uT 10ns_dutycycle rad rad rad/s rad/s rad/s 10ns_dutycycle 10ns_dutycycle 10ns_dutycycle rad 10ns_dutycycle 10ns_dutycycle 10ns_dutycycle 10ns_dutycycle rad rad m/s m/s m/s m/s m m rad rad rad rad m m m m m m m m m/s m/s none
453.017395 0.001541 0.004752 -0.944339 -0.005257 0.000335 0.007330 -38.648438 144.703125 -341.859375 -0.010841 0.000000 0.000000 0.000000 -0.880000 0.000000 -0.110840 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 -0.684479 0.460010 0.000000 -0.020490 0.014007 -0.036237 0.047361 0.123941 0.010486 0.079480 0.110974 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 -0.087602 0.098929 0.000000 0.000000
This diff is collapsed.
...@@ -130,8 +130,8 @@ ...@@ -130,8 +130,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>1142</width> <width>1144</width>
<height>749</height> <height>679</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_8"> <layout class="QVBoxLayout" name="verticalLayout_8">
...@@ -1108,7 +1108,7 @@ ...@@ -1108,7 +1108,7 @@
</rect> </rect>
</property> </property>
<property name="text"> <property name="text">
<string>Run Data Analysis</string> <string>Run Data Analysis (Will Open Separate Window)</string>
</property> </property>
</widget> </widget>
</widget> </widget>
...@@ -1122,7 +1122,7 @@ ...@@ -1122,7 +1122,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>1186</width> <width>1186</width>
<height>21</height> <height>28</height>
</rect> </rect>
</property> </property>
<widget class="QMenu" name="menuScripts"> <widget class="QMenu" name="menuScripts">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment