code: public static final Matrix matrixFromEuler(double heading, double attitude,
  			double bank) {
  		// Assuming the angles are in radians.
  		double ch = Math.cos(heading);
  		double sh = Math.sin(heading);
  		double ca = Math.cos(attitude);
  		double sa = Math.sin(attitude);
  		double cb = Math.cos(bank);
  		double sb = Math.sin(bank);
  
  		Matrix m = new Matrix(3,3);
  		m.set(0,0, ch * ca);
  		m.set(0,1, sh*sb - ch*sa*cb);
  		m.set(0,2, ch*sa*sb + sh*cb);
  		m.set(1,0, sa);
  		m.set(1,1, ca*cb);
  		m.set(1,2, -ca*sb);
  		m.set(2,0, -sh*ca);
  		m.set(2,1, sh*sa*cb + ch*sb);
  		m.set(2,2, -sh*sa*sb + ch*cb);
  
  		return m;
  	}
docs: This conversion uses NASA standard aeroplane conventions as described on
  page:
  http://www.euclideanspace.com/maths/geometry/rotations/euler/index.htm
  Coordinate System: right hand Positive angle: right hand Order of euler
  angles: heading first, then attitude, then bank. matrix row column
  ordering: [m00 m01 m02] [m10 m11 m12] [m20 m21 m22]
  
  @param heading
  in radians
  @param attitude
  in radians
  @param bank
  in radians
  @return the rotation matrix