also I searched for rotation matrix
https://it.wikipedia.org/wiki/Rotazione_(matematica)
and found the way for create x,y and z axis matrix, but by multiplying them I do not get the correct result (I suppose there is also a scale matrix)... for ships it's not a great problem but for stations it is.
Anyway, in my mod rotation is always multiples of 90 degrees, so there are 64 possibility (0, 90, 180, 270 for each axis). I'll create a matrix with the correct string for each possibility, once implemented as a variable the problem is solved, even if not very elegantly