How to get HeadingPitchRoll from Quaternion?

        const hpr = new HeadingPitchRoll(0, 0, 0);
        const orientation4 = Transforms.headingPitchRollQuaternion(origin, hpr);
        let orientation = new ConstantProperty(orientation4);
        currentFacility.orientation = orientation;
        let neworientation = HeadingPitchRoll.fromQuaternion(currentFacility.orientation.getValue(JulianDate.now()));
        console.log("--------", neworientation) // neworientation result is : HeadingPitchRoll {heading: 2.6520400758742566, pitch: -5.551115123125783e-17, roll: 0.9287258149259335}

        Why the result is not "{heading:0,pitch:0,roll:0}" ? Besause I set is (0,0,0).
1 Like