solve for r, the distance from the center of mars to the satellite. To get altitude, subtract the radius of Mars.
I don't know how you got v, so here
or r^3= T^2 G*Massmars/4PI^2
solve for r.
How do you determine the altitude at which a satellite must fly in order to complete one orbit in the same time period that it takes the earth to make one complete rotation?
Here is the needed info for Earth which you can apply to Mars.
The force exerted by the earth on the satellite derives from
...................................................F = GMm/r^2
where G = the universal gravitational constant, M = the mass of the earth, m = the mass of the satellite and r = the radius of the satellite from the center of the earth.
GM = µ = 1.407974x10^16 = the earth's gravitational constant.
The centripetal force required to hold the satellite in orbit derives from F = mV^2/r.
Since the two forces must be equal, mV^2/r = µm/r^2 or V^2 = µ/r.
The circumference of the orbit is C = 2Pir.
A geosycnchronous orbit is one with a period equal to the earth's rotational period, which, contrary to popular belief, requires 23hr-56min-4.09sec. to rotate 360º, not 24 hours. Therefore, the time to complete one orbit is 23.93446944 hours or 86,164 seconds
Squaring both sides, 4Pi^2r^2 = 86164^2
But V^2 = µ/r
Therefore, 4Pi^2r^2/(µ/r) = 86164^2 or r^3 = 86164^2µ/4Pi^2
Thus, r^3 = 86164^2(1.407974x10^16)/4Pi^2 = 2.647808686x10^24
Therefore, r = 138,344,596 feet. = 26,201.6 miles.
Subtracting the earth's radius of 3963 miles, the altitude for a geosynchronous satellite is ~22,238 miles.