Ellipse drawn in kilometers

Hello everybody

I have been trying to draw an ellipse in my map, indicating the axes in kilometres.
But the only options I have found are indicate the axes in degrees or in cm of the map.

But I need to indicate the axes on kilometers of real earth (not cm in the map)

My script is:

gmt coast -R-2.5/0/40/42 -JX23/20c -W0.02c -Df -Ba1.f0.2 -S179/255/251 -G170/255/165 -Lf-2.0/40.3/40/0/100
gmt plot -Sc @epicenter.txt -G148/0/210 -W0.025c,0
gmt plot -Se @error_elipse.txt -W0.025c,148/0/210
gmt text @scale_label.txt -F+f11,0/0/0
gmt end show

the @epicenter.txt is:

-1.593 41.398 0.3

@scale_label.txt is:

-2.0 40.35 km

and @error_elipse.txt must be

-1.593 41.389 0 17.7 11.2

Does anyone have any idea how I can do it?

Thanks a lol for your help

take a look in the option -SE:
If -SE rather than -Se is selected, psxy will expect azimuth, and axes [in km], and convert azimuths based on map projection.

Thanks a lot.
I realised that my problem was the map proyection: I changed -JX by -JM and I solved it.
And then I used your proposal of -SE.
Thank you for your help.