mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 08:53:38 +08:00
chore(tools): remove dead scripts and files with zero references
Remove files that have zero references in the codebase and haven't been meaningfully touched in years: - Tools/stack_usage/avstack.pl: AVR stack checker (2017), wrong arch, 0 refs - Tools/usb_serialload.py: USB serial load tester (2022), Python 2, 0 refs - Tools/dist/vehicle_configs.xml: old vehicle configs (2015), deprecated mixer format, 0 refs - Tools/models/sdp3x_pitot_model.py: SDP3x pitot model (2017), 0 refs - Tools/Matlab/motors.m: MATLAB motor script (2015), 0 refs - Tools/Matlab/plot_mag.m: MATLAB mag plotter (2015), 0 refs - src/modules/local_position_estimator/fault_table.py: fault table gen (2018), LPE disabled, 0 refs - integrationtests/python_src/px4_it/util/flight_path_assertion.py: old ROS1 util (2016), 0 refs - integrationtests/python_src/px4_it/util/TODO.md: stale TODO (2016), 0 refs - integrationtests/python_src/px4_it/dronekit/: DroneKit mission checker (2019), deprecated lib, 0 refs - platforms/posix/src/px4/common/lockstep_scheduler/build-and-test.sh: standalone build (2019), replaced by CMake, 0 refs Co-authored-by: dakejahl <37091262+dakejahl@users.noreply.github.com>
This commit is contained in:
@@ -1,58 +0,0 @@
|
||||
clear all;
|
||||
close all;
|
||||
|
||||
% Measurement data
|
||||
% 1045 propeller
|
||||
% Robbe Roxxy Motor (1100 kV, data collected in 2010)
|
||||
data = [ 45, 7.4;...
|
||||
38, 5.6;...
|
||||
33, 4.3;...
|
||||
26, 3.0;...
|
||||
18, 2.0;...
|
||||
10, 1.0 ];
|
||||
|
||||
% Normalize the data, as we're operating later
|
||||
% anyways in normalized units
|
||||
data(:,1) = data(:,1) ./ max(data(:,1));
|
||||
data(:,2) = data(:,2) ./ max(data(:,2));
|
||||
|
||||
% Fit a 2nd degree polygon to the data and
|
||||
% print the x2, x1, x0 coefficients
|
||||
p = polyfit(data(:,2), data(:,1),2)
|
||||
|
||||
% Override the first coffefficient for testing
|
||||
% purposes
|
||||
pf = 0.62;
|
||||
|
||||
% Generate plotting data
|
||||
px1 = linspace(0, max(data(:,2)));
|
||||
py1 = polyval(p, px1);
|
||||
|
||||
pyt = zeros(size(data, 1), 1);
|
||||
corr = zeros(size(data, 1), 1);
|
||||
|
||||
% Actual code test
|
||||
% the two lines below are the ones needed to be ported to C:
|
||||
% pf: Power factor parameter.
|
||||
% px1(i): The current normalized motor command (-1..1)
|
||||
% corr(i): The required correction. The motor speed is:
|
||||
% px1(i)
|
||||
for i=1:size(px1, 2)
|
||||
|
||||
% The actual output throttle
|
||||
pyt(i) = -pf * (px1(i) * px1(i)) + (1 + pf) * px1(i);
|
||||
|
||||
% Solve for input throttle
|
||||
% y = -p * x^2 + (1+p) * x;
|
||||
%
|
||||
end
|
||||
|
||||
plot(data(:,2), data(:,1), '*r');
|
||||
hold on;
|
||||
plot(px1, py1, '*b');
|
||||
hold on;
|
||||
plot([0 px1(end)], [0 py1(end)], '-k');
|
||||
hold on;
|
||||
plot(px1, pyt, '-b');
|
||||
hold on;
|
||||
plot(px1, corr, '-m');
|
||||
@@ -1,77 +0,0 @@
|
||||
%
|
||||
% Tool for plotting mag data
|
||||
%
|
||||
% Reference values:
|
||||
% telem> [cal] mag #0 off: x:0.15 y:0.07 z:0.14 Ga
|
||||
% MATLAB: x:0.1581 y: 0.0701 z: 0.1439 Ga
|
||||
% telem> [cal] mag #0 scale: x:1.10 y:0.97 z:1.02
|
||||
% MATLAB: 0.5499, 0.5190, 0.4907
|
||||
%
|
||||
% telem> [cal] mag #1 off: x:-0.18 y:0.11 z:-0.09 Ga
|
||||
% MATLAB: x:-0.1827 y:0.1147 z:-0.0848 Ga
|
||||
% telem> [cal] mag #1 scale: x:1.00 y:1.00 z:1.00
|
||||
% MATLAB: 0.5122, 0.5065, 0.4915
|
||||
%
|
||||
%
|
||||
% User-guided values:
|
||||
%
|
||||
% telem> [cal] mag #0 off: x:0.12 y:0.09 z:0.14 Ga
|
||||
% telem> [cal] mag #0 scale: x:0.88 y:0.99 z:0.95
|
||||
% telem> [cal] mag #1 off: x:-0.18 y:0.11 z:-0.09 Ga
|
||||
% telem> [cal] mag #1 scale: x:1.00 y:1.00 z:1.00
|
||||
|
||||
close all;
|
||||
clear all;
|
||||
|
||||
plot_scale = 0.8;
|
||||
|
||||
xmax = plot_scale;
|
||||
xmin = -xmax;
|
||||
ymax = plot_scale;
|
||||
ymin = -ymax;
|
||||
zmax = plot_scale;
|
||||
zmin = -zmax;
|
||||
|
||||
mag0_raw = load('../../mag0_raw3.csv');
|
||||
mag1_raw = load('../../mag1_raw3.csv');
|
||||
|
||||
mag0_cal = load('../../mag0_cal3.csv');
|
||||
mag1_cal = load('../../mag1_cal3.csv');
|
||||
|
||||
fm0r = figure();
|
||||
|
||||
mag0_x_scale = 0.88;
|
||||
mag0_y_scale = 0.99;
|
||||
mag0_z_scale = 0.95;
|
||||
|
||||
plot3(mag0_raw(:,1), mag0_raw(:,2), mag0_raw(:,3), '*r');
|
||||
[mag0_raw_center, mag0_raw_radii, evecs, pars ] = ellipsoid_fit( [mag0_raw(:,1) mag0_raw(:,2) mag0_raw(:,3)] );
|
||||
mag0_raw_center
|
||||
mag0_raw_radii
|
||||
axis([xmin xmax ymin ymax zmin zmax])
|
||||
viscircles([mag0_raw_center(1), mag0_raw_center(2)], [mag0_raw_radii(1)]);
|
||||
|
||||
fm1r = figure();
|
||||
plot3(mag1_raw(:,1), mag1_raw(:,2), mag1_raw(:,3), '*r');
|
||||
[center, radii, evecs, pars ] = ellipsoid_fit( [mag1_raw(:,1) mag1_raw(:,2) mag1_raw(:,3)] );
|
||||
center
|
||||
radii
|
||||
axis([xmin xmax ymin ymax zmin zmax])
|
||||
|
||||
fm0c = figure();
|
||||
plot3(mag0_cal(:,1) .* mag0_x_scale, mag0_cal(:,2) .* mag0_y_scale, mag0_cal(:,3) .* mag0_z_scale, '*b');
|
||||
[mag0_cal_center, mag0_cal_radii, evecs, pars ] = ellipsoid_fit( [mag1_raw(:,1) .* mag0_x_scale mag1_raw(:,2) .* mag0_y_scale mag1_raw(:,3) .* mag0_z_scale] );
|
||||
mag0_cal_center
|
||||
mag0_cal_radii
|
||||
axis([xmin xmax ymin ymax zmin zmax])
|
||||
viscircles([0, 0], [mag0_cal_radii(3)]);
|
||||
|
||||
fm1c = figure();
|
||||
plot3(mag1_cal(:,1), mag1_cal(:,2), mag1_cal(:,3), '*b');
|
||||
axis([xmin xmax ymin ymax zmin zmax])
|
||||
[center, radii, evecs, pars ] = ellipsoid_fit( [mag1_raw(:,1) mag1_raw(:,2) mag1_raw(:,3)] );
|
||||
viscircles([0, 0], [radii(3)]);
|
||||
|
||||
mag0_x_scale_matlab = 1 / (mag0_cal_radii(1) / mag0_raw_radii(1))
|
||||
mag0_y_scale_matlab = 1 / (mag0_cal_radii(2) / mag0_raw_radii(2))
|
||||
mag0_z_scale_matlab = 1 / (mag0_cal_radii(3) / mag0_raw_radii(3))
|
||||
Reference in New Issue
Block a user