TerraSAR-X terrain correction with SNAP and GDAL

Hi everyone!
I was testing the operation of the geometric correction tool in snap. I made the correction using EC - Average Height Range-Doppler and Geolocation Grid and also, TC using Range-Doppler TC. What I need to do is to add vectior to scene. Unfortunately for each result I have other offset from image to vector. EC which are not using any DEM give me the largest offset. The best result I obtained using TC. Now I am trying to do a similar analysis using the GDAL library, especially gdalwarp command. I got results very similar to EC Average Height Range Doppler while I want to use GDAL to get results like in TC. I have tried for TerraSAR-X to use additional parameters to gdalwarp (rpc, dem) but gdal cannot calculate them. Have any of you tried to do TC using other tools than SNAP? Any help would be valuable. Thanks