Actually, NEITHER Of those relates to the gravity well... though, obviously, one is at least in the same general family, while the other is unrelated. Mercury is a great real-world example of this. Most people don't know this, but Mercury doesn't rotate... AT ALL. So, one side of Mercury is incredibly hot (base-metal-melting hot),while the other side is really quite cold, heated only through conduction through the planet's mass, and radiating into space, so the "dark side" of mercury is very, very cold. Then, there is the fact that the Earth's rotation is believed to have slowed significantly over its history... I saw in a paleontology bit ("Dinosaurs of Patagonia," on Netflix) that it is widely believed (obviously, we have no PROOF) that the Earth's rotation, at the time of the biggest dinosaurs of that period, was barely over 23 hours. So... rotation of the planet has no relationship to an orbit, but mass of the planet does. Or rather, there's a fairly straightforward relationship between (a) planetary mass, (b) orbit distance, and (c) orbital velocity. In fact, there is only one distance from the center of mass of the earth where geosynchronous orbit is possible. (Geosynchronous meaning "always over the same spot relative to the terrain) and even then, that's only possible if the orbital path is directly over the equator... otherwise, the orbit will oscillate from north to south, relative to the ground. This is likely why Star Trek ships require power to maintain orbit over a landing party site... because they're in a lower orbit, which requires them to be moving at a higher orbital velocity, and thus would not be over the landing site most of the time. So, they perpetually have to provide "corrective thrust" to avoid falling from "orbit." A REAL orbit can be maintained essentially perpetually, without any need for power at all. Let's face it... the Enterprise in orbit over a planet will not be moving along anything we'd ever see as a "curved path," merely as a matter of scale. The modeling of the ship's "orbit" along a curved path was one of two things: 1) A production falsehood, "tricking" us without any regard for real science, or 2) The same "representational graphics" that cause us to see ships nearly brushing hulls when dialogue says that they're tens of millions of kilometers apart. I like #2 better. The path the ship travels is curved, just as we see it. But we're not seeing the tiny pinprick of light that you'd really see if viewing that sequence in-scale. Instead, you're seeing a "computer-augmented image" with the ship expanded for easier viewing. Just like a naval "fleet command" board uses ship models which would, in scale to, say, the pacific ocean theater, make those ships hundreds of miles long.