Generate East and North unit vectors tangent to a point on the celestial sphere, using vectors?
If $\mathbf{\hat{n}}$ points to the north celestial pole, then the eastward tangent vector is

$$\mathbf{\hat{u} = \frac{\hat{n} \times \hat{w}}{\|\hat{n} \times \hat{w}\|}}$$

and the northward tangent vector is

$$\mathbf{\hat{v} = \frac{\hat{w} \times \hat{u}}{\|\hat{w} \times \hat{u}\|}}$$

$\mathbf{\|\hat{w} \times \hat{u}\|}$ analytically should be 1 but can be slightly different numerically.