distance calculations in s.surf.idw

(1) G_projection() == PROJECTION_LL will tell you if the projection
    is lat/long or not
(2) The function G_database_untis_to_meters_factor() will convert
    grid units to meters (returns 0.0 if imagery or some non-metric
    database. Then you would have to convert the grid to meters and
    then to whatever units the z values are in: or
(3) G_begin_distance_calculations() sets up any database (except
    imagery) including lat/lon for distances calculations
    double G_distance(x1,y1,x2,y2) double x1,y1,x2,y2;
    returns the distance from (x1,y1) to (x2,y2) always in meters.

Does this help?

---------------------------------------------------------------------
Michael Shapiro
U.S. Army CERL email: shapiro@zorro.cecer.army.mil
Environmental Division phone: (217) 352-6511 ext 526
P.O. Box 9005 fax: (217) 373-7222
Champaign, Ill. 61826-9005
---------------------------------------------------------------------