I was writing it in cartesian coordinates! I just chose to call the linear distance, measured from the center of mass of the Earth, r. I could've used y or any other letter, it's entirely arbitrary. Regardless, if you choose to write it in spherical coordinates, it would still be correct...