The navigational network matches the overall cell ensamble signal behavior described in the Dynamic Grouping of Hippocampal Neural Activity During Cognitive Control of Two Spatial Frames but it’s such a whole brain interaction much of the exact wiring is still a scientific mystery.
I described more detail in this topic you might not have seen:
I have tried a number of ways to calculate vectors. Fastest is to use serialized 6 (or 12 or 24) bits of input from each neighbor to address an array for corresponding angle. Where there is no angle (such as equal input from two opposite sides canceling out) Magnitude=0, else 1. A 1 bit at 60 and -60 degrees has Angle=0 and Magnitude=1.
For cells an Angle would already be pointed out by their circular signal pattern, don’t need to calculate it out like a computer simulation may require.
If you need exact math then I earlier went over the code and comments. It’s in Visual Basic 6 but I may challenge myself to make a Python example to fill angle and magnitude arrays. Normally there are only 64 possibilities that can also be one by one calculated and entered by hand.