C=======================================================================C C C SUBROUTINE LLTOIJ( LAT, LNG, CM, LTMX, RES, NS, NV, I, J ) C C C=======================================================================C C C C This subroutine determine the I,J location in a sinusoidal C C projection having a Central Meridian CM, maximum latitude LTMX, C C RES deg/pixel, NS samples, and was subsampled by a factor of NV C C at LAT, LNG. C C C C=======================================================================C C C C Version 1.0 T. Duxbury 20 July 2001 C C C C=======================================================================C IMPLICIT NONE C Double precision variables DOUBLE PRECISION * CM, ! Central meridian of sinusoidal projection, deg * LAT, LNG, ! Mars-fixed latitude and longitude, deg * LTMX, ! Maximum latitude of projection, deg * RES ! Projection resolution, deg/pixel C Ingeger variables INTEGER * I, J, ! Projection location of LAT/LNG * NS, ! # Sample in projection * NV ! Factor projection was sub-sampled (normally=1) C Compute the I,J location associated with Lat / LNG I = (LNG-CM)*DCOSD(LAT)/(DFLOAT(NV)*RES) * + DFLOAT(NS/2) + 1.1D0 ! samples J = ( LTMX-LAT ) / (DFLOAT(NV)*RES) + 1.1D0 ! lines C All Done - Return RETURN END