[GRASSLIST:1660] A problem in using r.mapcalc

hello

I encountered a problem in using r.mapcalc.
I try to create a new map using atan function from two maps that
comprise sin and cosine values in radian.

I used this expression :
r.mapcalc dene='atan(cosine_map*180/3.14,sine_map*180/3.14)'
But it only gives 45 and 225 values.
When I check this formula with known values. It gives correct
values:
for example r.mapcalc dene='atan(0.838670*180/3.14,0.544639*180/3.14)'
it gives correct value: 33

Does anyone have any idea ?
--

Ahmet Temiz
General Directory of Disaster Affairs
Ankara TURKEY

______________________________________
Inflex - installed on mailserver for domain @deprem.gov.tr
Queries to: postmaster@deprem.gov.tr

______________________________________
The views and opinions expressed in this e-mail message are the sender's own
and do not necessarily represent the views and the opinions of Earthquake Research Dept.
of General Directorate of Disaster Affairs.

Bu e-postadaki fikir ve gorusler gonderenin sahsina ait olup, yasal olarak T.C.
B.I.B. Afet Isleri Gn.Mud. Deprem Arastirma Dairesi'ni baglayici nitelikte degildir.

temiz wrote:

I encountered a problem in using r.mapcalc.
I try to create a new map using atan function from two maps that
comprise sin and cosine values in radian.

I used this expression :
r.mapcalc dene='atan(cosine_map*180/3.14,sine_map*180/3.14)'
But it only gives 45 and 225 values.
When I check this formula with known values. It gives correct
values:
for example r.mapcalc dene='atan(0.838670*180/3.14,0.544639*180/3.14)'
it gives correct value: 33

Does anyone have any idea ?

For all x > 0:

  atan(x,x) == 45
  atan(-x,-x) == 225

Your results suggest that your sine and cosine maps are identical.

--
Glynn Clements <glynn.clements@virgin.net>