Finding position of non stationary microcontrollers in 3d space

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.

Thanks in advance

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.

Poszyx works indoors, with 10 cm accuracy.

I should think so too at that price

Pozyx seems to be the only option available with that level of accuracy.

The link should help inform people that the indoor positioning problem is extremely difficult.

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?

Thank you folks, for your responses. I think I'd have to abandon the project for the time being. Pozyx really doesn't fit in my budget.

I'd maybe revisit the project sometime again

Nor your drone either I suspect

Yes, not the drone either.

My idea was to build coordinated drones, but I'd have to rethink my approach and think of using cameras and things like that

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.

My idea was to build coordinated drones

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.