I was wondering if it's possible to find the location of a microcontroller (possibly mounted on a drone) relative to another microcontroller (also on a drone) in 3d space.
I am a bit confused about what kind of a sensor it might need.
Would gps help when I'm looking at distances between the microcontrollers to be in the order of some 50-60cm.
It's a tricky problem. Ordinary GPS is nowhere near that accurate and even differential GPS probably doesn't have the resolution you're looking for, especially in the altitude dimension.
To find the position of an object in 3D space you need measurements of direction from at least 3, preferably more, independent sensors placed at known locations. The 3 measurements are then combined to produce the x, y and z positions of the object.
In view of the small distances involved GPS is not going to be of any use to you.
I'm not sure even that level of accuracy is enough if the OP wants to work in the 50cm range. A 10cm error would throw any measurement of position off I would think.
Also, moving objects make it harder - how frequently does Pozyx get a fix?
It's been done before - I recall seeing a video from some American university showing off their shoal of drones performing impressive maneuvers and keeping station on their neighbors.
You might consider tracking such things down and see if they gave details about how they did it.
I wonder why beginners tend to think of drones first. Finding the position of one robot on the floor is a very difficult challenge, let alone coordinating the movements of two robots on the floor.
Using distance 4 base stations are the minimum, if you have direction
information only 2.
Direction information gives you a line, two lines cross at a unique point.
Distance information gives a spherical surface, it takes 3 spheres to
intersect at two points, and then a fourth to disambiguate which of the
two points. Relative distance readings are similar but define hyperbolic
surfaces rather than spheres.