From cb070b2d3f2b6e241e3be1b7e0eeb90fc755255f Mon Sep 17 00:00:00 2001 From: Martin Michalec Date: Thu, 12 Nov 2026 01:28:13 +0300 Subject: publish --- motion.gnuplot | 149 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 149 insertions(+) create mode 100644 motion.gnuplot (limited to 'motion.gnuplot') diff --git a/motion.gnuplot b/motion.gnuplot new file mode 100644 index 0000000..05b92c3 --- /dev/null +++ b/motion.gnuplot @@ -0,0 +1,149 @@ +# -*- Gnuplot -*- +set datafile separator comma +set key outside +set grid +set term pngcairo size 1400,900 enhanced font "Arial,12" + +csv = "motion.csv" + +# ------------------------------------------------------------ +# 1. Траектория XY +# ------------------------------------------------------------ + +set output "plot_xy.png" +set title "XY trajectory" +set xlabel "X, mm" +set ylabel "Y, mm" +set size ratio -1 + +plot csv using 3:4 with lines title "trajectory" + +# ------------------------------------------------------------ +# 2. Скорость вдоль траектории +# ------------------------------------------------------------ + +set output "plot_velocity.png" +set title "Path velocity" +set xlabel "t, s" +set ylabel "v, mm/s" +set autoscale +set size noratio + +plot csv using 1:5 with lines title "v" + +# ------------------------------------------------------------ +# 3. Тангенциальное ускорение +# ------------------------------------------------------------ + +set output "plot_tangential_acceleration.png" +set title "Tangential acceleration" +set xlabel "t, s" +set ylabel "a_t, mm/s^2" + +plot csv using 1:6 with lines title "a_t" + +# ------------------------------------------------------------ +# 4. Нормальное ускорение +# ------------------------------------------------------------ + +set output "plot_normal_acceleration.png" +set title "Normal acceleration" +set xlabel "t, s" +set ylabel "a_n, mm/s^2" + +plot csv using 1:9 with lines title "a_n" + +# ------------------------------------------------------------ +# 5. Полное ускорение +# ------------------------------------------------------------ + +set output "plot_acceleration_abs.png" +set title "Acceleration magnitude" +set xlabel "t, s" +set ylabel "|a|, mm/s^2" + +plot csv using 1:10 with lines title "|a|" + +# ------------------------------------------------------------ +# 6. Тангенциальный рывок +# ------------------------------------------------------------ + +set output "plot_tangential_jerk.png" +set title "Tangential jerk" +set xlabel "t, s" +set ylabel "j_t, mm/s^3" + +plot csv using 1:7 with lines title "j_t" + +# ------------------------------------------------------------ +# 7. Полный векторный рывок +# ------------------------------------------------------------ + +set output "plot_jerk_abs.png" +set title "Jerk magnitude" +set xlabel "t, s" +set ylabel "|j|, mm/s^3" + +plot csv using 1:11 with lines title "|j|" + +# ------------------------------------------------------------ +# 8. Осевые скорости +# ------------------------------------------------------------ + +set output "plot_axis_velocity.png" +set title "Axis velocities" +set xlabel "t, s" +set ylabel "velocity, mm/s" + +plot csv using 1:12 with lines title "v_x", \ + csv using 1:13 with lines title "v_y" + +# ------------------------------------------------------------ +# 9. Осевые ускорения +# ------------------------------------------------------------ + +set output "plot_axis_acceleration.png" +set title "Axis accelerations" +set xlabel "t, s" +set ylabel "acceleration, mm/s^2" + +plot csv using 1:14 with lines title "a_x", \ + csv using 1:15 with lines title "a_y" + +# ------------------------------------------------------------ +# 10. Осевые рывки +# ------------------------------------------------------------ + +set output "plot_axis_jerk.png" +set title "Axis jerks" +set xlabel "t, s" +set ylabel "jerk, mm/s^3" + +plot csv using 1:16 with lines title "j_x", \ + csv using 1:17 with lines title "j_y" + +# ------------------------------------------------------------ +# 11. Состояние лазера +# ------------------------------------------------------------ + +set output "plot_laser.png" +set title "Laser state" +set xlabel "t, s" +set ylabel "laser_on" + +set yrange [-0.2:1.2] + +plot csv using 1:22 with steps title "laser_on" + +# ------------------------------------------------------------ +# 12. Индекс блока +# ------------------------------------------------------------ + +set output "plot_block_index.png" +set title "Motion block index" +set xlabel "t, s" +set ylabel "block_index" + +set autoscale y + +plot csv using 1:23 with steps title "block_index" -- cgit v1.3.1