Commit 3762dfa0 authored by Luc Maisonobe's avatar Luc Maisonobe

Allow Euler angles to be missing if Euler rates are given.

parent 46034f11
......@@ -73,9 +73,13 @@ class EulerWriter extends AbstractWriter {
euler.rateFrameIsA() ? :,
generator.writeEntry(seq.charAt(0) + ANGLE, Unit.DEGREE.fromSI(angles[0]), true);
generator.writeEntry(seq.charAt(1) + ANGLE, Unit.DEGREE.fromSI(angles[1]), true);
generator.writeEntry(seq.charAt(2) + ANGLE, Unit.DEGREE.fromSI(angles[2]), true);
// if we don't have rates, at least we need angles
// (we may have only rates, as orientation is already given by mandatory quaternion)
final boolean needsAngles = !euler.hasRates();
generator.writeEntry(seq.charAt(0) + ANGLE, Unit.DEGREE.fromSI(angles[0]), needsAngles);
generator.writeEntry(seq.charAt(1) + ANGLE, Unit.DEGREE.fromSI(angles[1]), needsAngles);
generator.writeEntry(seq.charAt(2) + ANGLE, Unit.DEGREE.fromSI(angles[2]), needsAngles);
// rates
if (euler.hasRates()) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment