double precision :: l3,l4 double precision :: Lat, Lon, ts, t, i; double precision :: x1,y1, x2,y2, x, y, m, b; double precision :: dx,br,aa,q ts = 0; t = 0.5; ! 30 minutes x1 = 9.5; y1 = 19.6875; ! Left, then Down (West) x2 = 40.875; y2 = 3.5625; ! Left, then Down (East) dx = x2 - x1; m = (y2-y1)/dx; b = (x2*y1 - x1*y2)/dx; x = x1; write(*,*) ' X Y Dx Gone Dx Rem Lat Lon'; do y = m * x + b; ! Up/Down, always positive q = ChartXYtoLL(0.0370d0, 0.0270d0, 80.43333333d0, 42.93333333d0, x, y, Lat, Lon ); write(*,"(F10.4,F10.4,F10.4,F10.4,F10.4,F10.4)") x,y,(dx-(x2-x)),(x2-x),Lat,-Lon; x = x + 5.; if (x > 40.) exit; end do stop ---- output generated ------ ~/fortran$ ./ChPlot1 X Y Dx Gone Dx Rem Lat Lon 9.5000 19.6875 0.0000 31.3750 42.4018 -80.0818 14.5000 17.1178 5.0000 26.3750 42.4712 -79.8968 19.5000 14.5481 10.0000 21.3750 42.5405 -79.7118 24.5000 11.9783 15.0000 16.3750 42.6099 -79.5268 29.5000 9.4086 20.0000 11.3750 42.6793 -79.3418 34.5000 6.8389 25.0000 6.3750 42.7487 -79.1568 39.5000 4.2692 30.0000 1.3750 42.8181 -78.9718