I'm trying to compute the homology of $\mathbb{R}\mathbb{P}^2$ using the following Morse function. First, consider $f:S^2 \to \mathbb{R}$ taking $(x,y,z) \mapsto y^2 + 2z^2$. This can be shown to be Morse on $S^2$ with critical points $(\pm 1,0,0)$ of index $0$, $(0, \pm1, 0)$ of index $1$ and $(0,0,\pm 1)$ of index $2$.
This function descends to a function $g: \mathbb{R}\mathbb{P}^2 \to \mathbb{R}$ with three critical points $a=[1:0:0]$ (index $0$), $b=[0:1:0]$ (index $1$), $c=[0:0:1]$ (index $2$).
By considering dimensions, we immediately see that all pseudo-gradients will satisfy the Smale condition. Also, there are two trajectories from $c$ to $b$ and two from $b$ to $a$. Thus, with $\mathbb{Z}/2$ coefficients, the homology is: $H_0 = H_1 = H_2 = \mathbb{Z}/2$.
However, I'm having trouble with orientations and thus computing over $\mathbb{Z}$. How should we orient the stable and unstable manifolds and thus, determine an orientation on the moduli spaces of trajectories?
There is a question on this on math.SE but it uses a different function and unfortunately, I don't understand the given answer. I know the homology is independent of the chosen function but I'll like to understand computations starting from a concrete Morse function.