mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 21:43:34 +08:00
Fix duplicate newlines at the end of files
This commit is contained in:
@@ -45,7 +45,7 @@ function [ center, radii, evecs, v ] = ellipsoid_fit( X, flag, equals )
|
||||
% * center - ellispoid center coordinates [xc; yc; zc]
|
||||
% * ax - ellipsoid radii [a; b; c]
|
||||
% * evecs - ellipsoid radii directions as columns of the 3x3 matrix
|
||||
% * v - the 9 parameters describing the ellipsoid algebraically:
|
||||
% * v - the 9 parameters describing the ellipsoid algebraically:
|
||||
% Ax^2 + By^2 + Cz^2 + 2Dxy + 2Exz + 2Fyz + 2Gx + 2Hy + 2Iz = 1
|
||||
%
|
||||
% Author:
|
||||
@@ -59,7 +59,7 @@ end
|
||||
if flag == 2 && nargin == 2
|
||||
equals = 'xy';
|
||||
end
|
||||
|
||||
|
||||
if size( X, 2 ) ~= 3
|
||||
error( 'Input data must have three columns!' );
|
||||
else
|
||||
@@ -69,7 +69,7 @@ else
|
||||
end
|
||||
|
||||
% need nine or more data points
|
||||
if length( x ) < 9 && flag == 0
|
||||
if length( x ) < 9 && flag == 0
|
||||
error( 'Must have at least 9 points to fit a unique ellipsoid' );
|
||||
end
|
||||
if length( x ) < 6 && flag == 1
|
||||
@@ -91,7 +91,7 @@ if flag == 0
|
||||
2 * x .* z, ...
|
||||
2 * y .* z, ...
|
||||
2 * x, ...
|
||||
2 * y, ...
|
||||
2 * y, ...
|
||||
2 * z ]; % ndatapoints x 9 ellipsoid parameters
|
||||
elseif flag == 1
|
||||
% fit ellipsoid in the form Ax^2 + By^2 + Cz^2 + 2Gx + 2Hy + 2Iz = 1
|
||||
@@ -99,7 +99,7 @@ elseif flag == 1
|
||||
y .* y, ...
|
||||
z .* z, ...
|
||||
2 * x, ...
|
||||
2 * y, ...
|
||||
2 * y, ...
|
||||
2 * z ]; % ndatapoints x 6 ellipsoid parameters
|
||||
elseif flag == 2
|
||||
% fit ellipsoid in the form Ax^2 + By^2 + Cz^2 + 2Gx + 2Hy + 2Iz = 1,
|
||||
@@ -127,7 +127,7 @@ else
|
||||
% fit sphere in the form A(x^2 + y^2 + z^2) + 2Gx + 2Hy + 2Iz = 1
|
||||
D = [ x .* x + y .* y + z .* z, ...
|
||||
2 * x, ...
|
||||
2 * y, ...
|
||||
2 * y, ...
|
||||
2 * z ]; % ndatapoints x 4 sphere parameters
|
||||
end
|
||||
|
||||
@@ -170,5 +170,3 @@ else
|
||||
radii = ( sqrt( gam ./ v( 1:3 ) ) )';
|
||||
evecs = eye( 3 );
|
||||
end
|
||||
|
||||
|
||||
|
||||
@@ -170,4 +170,3 @@ if(__name__ == "__main__"):
|
||||
fs.write(f.read())
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
@@ -139,7 +139,3 @@ def find_checks_that_apply(
|
||||
innov_fail_checks.append('ofy')
|
||||
|
||||
return sensor_checks, innov_fail_checks
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -243,4 +243,3 @@ def main():
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
|
||||
@@ -282,4 +282,3 @@ def main():
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
|
||||
@@ -330,4 +330,3 @@ if serial_params_output_file is not None:
|
||||
fid.write(template.render(serial_devices=serial_devices,
|
||||
ethernet_configuration=ethernet_configuration,
|
||||
commands=commands, serial_ports=serial_ports))
|
||||
|
||||
|
||||
@@ -30,4 +30,3 @@ unset PRT
|
||||
unset PRT_F
|
||||
unset BAUD_PARAM
|
||||
unset MAV_ARGS
|
||||
|
||||
|
||||
@@ -70,4 +70,3 @@ PARAM_DEFINE_INT32({{ command.port_param_name }}, {{ command.default_port }});
|
||||
|
||||
{% endfor -%}
|
||||
{% endif %}
|
||||
|
||||
|
||||
@@ -125,4 +125,3 @@ def main():
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
|
||||
@@ -50,4 +50,3 @@ for json_file in json_files:
|
||||
except:
|
||||
print("JSON validation for {:} failed (schema: {:})".format(json_file, schema_file))
|
||||
raise
|
||||
|
||||
|
||||
@@ -65,4 +65,3 @@ for yaml_file in yaml_files:
|
||||
print(validator.errors)
|
||||
print("")
|
||||
raise Exception("Validation of {:} failed".format(yaml_file))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user