Fix vector error

Fix error in PamVector getMinimalHeadingPitchRoll function which referenced second element even if there was only one element.
This commit is contained in:
Douglas Gillespie 2024-07-16 10:57:39 +01:00
parent 3f23474ef5
commit f7be084e91

View File

@ -905,7 +905,7 @@ public class PamVector implements Serializable, Cloneable, PamCoordinate, Manage
} }
double[] angs = new double[3]; double[] angs = new double[3];
angs[0] = vectors[0].getHeading(); angs[0] = vectors[0].getHeading();
angs[1] = vectors[1].getPitch(); angs[1] = vectors[0].getPitch();
if (vectors.length >= 2) { if (vectors.length >= 2) {
angs[2] = vectors[1].getPitch(); angs[2] = vectors[1].getPitch();
} }