Let P1, P2, and P3 be three points in the plane with coordinates
(x1, y1), (x2, y2), and (x3, y3) respectively. The signed area of
the triangle P1-P2-P3 is given by the formula:
[x1*(y2 - y3) + x2*(y3 - y1) + x3*(y1 - y2)]/2.
The sign of this quantity is positive if P1-P2-P3 is a counterclockwise turn.
The sign of this quantity is negative if P1-P2-P3 is a clockwise turn.
You may use this formula to implement the right hand rule in GPSR.