I found aggregation-and-interpolation-of-sentinel-products-should-i-use-snappy-or-gdal-tools which is very similar to my problem .
I commented out this line parameters.put('mapProjection', '4326)
from the function terrain_correction(product,prj)
, which was forcing the projection to be ‘4326’. The solution was inspired by this post “/by zero error” occurs in Terrain-correction(EPSG:4326) and it worked. My python pipeline is now able to retrieve the correct srtm file.
Thanks a lot to the community. I’ve learn a lot about orbit file, thank you @florian.beyer and thanks @ABraun!