Hello,
Exactly, you have:
X=R(longitude - longitude of origin point)
Y=R(ln(tan(latitude/2+45)-ln(tan(latitude of origin point/2+45)) )
and X and Y are what is in your mesh file. Then the program just retrieves from Y the value of the latitude, and coordinates are locally multiplied by cos(latitude) to have real local distances. This procedure cannot give negative determinants if they are not in the original mesh, unless perhaps if the original Mercator projection does not correspond to the origin point given.
A good hint is that your origin point (thus coordinates 0,0) should be in your domain, as is done in the beta plane approximation, also to limit the size of coordinates and avoid truncation errors when computing e.g. an area with formulas such as x1*y2-x2*y1.
With best regards,
Jean-Michel Hervouet