Coordinate Transform of Lat,Lon into X,Y uses center of (x=0, y=0) = (lat=46N, lon=-130E) with y rotated 26.65 degrees East of N.

This perl script implements the transformation:

$theta=-26.65;
$YP=($LAT-46)*111.22;
$XP=($LON+130)*(-1.3900*$LAT+141.4433);
$X=$XP*cos($theta*3.1415/180) + $YP*sin($theta*3.1415/180);
$Y=-1*$XP*sin($theta*3.1415/180) + $YP*cos($theta*3.1415/180);

Note: the transformation, above, is for maps on this website. For the raytrace3d model, add a final:

$X=-1*$X


5 minute by 5 minute lat/lon grid superimposed on the cartesian x-y grid. The circle marks (46N, -130E) = (x=0, y=0)