thliebig / openEMS

openEMS is a free and open-source electromagnetic field solver using the EC-FDTD method.
http://openEMS.de
GNU General Public License v3.0
453 stars 156 forks source link

RCS sphere tutorial issue #58

Closed khashabri closed 5 years ago

khashabri commented 5 years ago

Hi guys, in the RCS sphere tutorial, some math functions such as sin(x) and cos(x) are used. https://github.com/thliebig/openEMS/blob/ffcf5ee0a64b2c64be306a3154405b0f13d5fbba/python/Tutorials/RCS_Sphere.py#L62 The parameter x should be in radiant as it is mentioned here. However, in the code implementation, these functions get an argument in degree which is false. https://github.com/thliebig/openEMS/blob/ffcf5ee0a64b2c64be306a3154405b0f13d5fbba/python/Tutorials/RCS_Sphere.py#L29 Please note that exceptionally this example works, because 0 degree is equal to 0 radiant. If you choose any other angle you will get a wrong result. The correct implementation would be: k_dir = [cos(inc_angle*2*pi/360), sin(inc_angle*2*pi/360), 0] in the line 62.