I'm wondering if the nodes in the circuit know their own relative position.
The simple answer is no. Otherwise your anonymity is broken.
Your question requires you to understand Onion RoutingOnion Routing:
In an onion network, messages are encapsulated in layers of encryption, analogous to layers of the vegetable onion. The encrypted data is transmitted through a series of network nodes called onion routers, each of which "peels" away a single layer, uncovering the data's next destination. When the final layer is decrypted, the message arrives at its destination. The sender remains anonymous because each intermediary knows only the location of the immediately preceding and following nodes
From the Tor project, you can read the same thing:
The circuit is extended one hop at a time, and each relay along the way knows only which relay gave it data and which relay it is giving data to. No individual relay ever knows the complete path that a data packet has taken. The client negotiates a separate set of encryption keys for each hop along the circuit to ensure that each hop can't trace these connections as they pass through.
Add to this, the circuit your requests are taking within the Tor network is refreshed every a dozen of minutes.