From f7be084e916123cb1ba36ca6776350f7481b6a73 Mon Sep 17 00:00:00 2001 From: Douglas Gillespie <50671166+douggillespie@users.noreply.github.com> Date: Tue, 16 Jul 2024 10:57:39 +0100 Subject: [PATCH] Fix vector error Fix error in PamVector getMinimalHeadingPitchRoll function which referenced second element even if there was only one element. --- src/pamMaths/PamVector.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pamMaths/PamVector.java b/src/pamMaths/PamVector.java index cbea40c9..8029e0aa 100644 --- a/src/pamMaths/PamVector.java +++ b/src/pamMaths/PamVector.java @@ -905,7 +905,7 @@ public class PamVector implements Serializable, Cloneable, PamCoordinate, Manage } double[] angs = new double[3]; angs[0] = vectors[0].getHeading(); - angs[1] = vectors[1].getPitch(); + angs[1] = vectors[0].getPitch(); if (vectors.length >= 2) { angs[2] = vectors[1].getPitch(); }