Im trying to rotate one accelerometer vector from body frame to ned frame, but i cant found what im doing wrong. For now, im using an online dataset that provides me roll, pitch and heading information, where heading is 0 rad when alligned with east axis, not north axis, the dataset also provides accelereration in x, y, z. For making the rotation im using a direct cossine matrix, like this below:
The x axis of the imu is alligned with the movement of the car, the y axis with the lateral acceleration, and z axis with gravity. What im doing is first change the heading angle to get an orientation with respect of north, after this, multiply the DCM with the acceleration [Ax,-Ay,Az] in this order, Ay is negated because the dataset gives me acceleration positive in the left axis. Im expecting to have the NED acceleration. But the answer seems wrong. The IMU used in this dataset is one oxts rt3003.