How to get HeadingPitchRoll from a point to point

let p1 = new Cesium.Cartesian3(-3503620.9449041914, 4003755.960376182, -5111896.32869888);
let p2 = new Cesium.Cartesian3(-5228142.41573135, 1037148.1018296357, -5101740.515949155);
let vector2 = Cesium.Cartesian3.subtract(p2, p1, new Cesium.Cartesian3());
let rotation = Cesium.Transforms.rotationMatrixFromPositionVelocity(p1, vector2);
let testQ = Cesium.Quaternion.fromRotationMatrix(rotation);
let testHPR = Cesium.HeadingPitchRoll.fromQuaternion(testQ);

I got two points and i wanna get the headingpitchrool from p1 to p2 fromè¿™ rotationMatrixFromPositionVelocity method, and the result i calculate is not right.
please tell me how to get a headingpitchroll from a point to another point. thank you very much.

Looks like this was answered here: How to get heading, pitch and roll from the two points