hc05 4.0 version - rssi to distance -

DFS

Using RSSI for distance is a common question here. It doesn't work.

The signal strength is affected by too many factors including the orientation of the antennas and the presence of obstacles that will deflect or absorb radio frequency energy.

...R

What distance do you want to measure and what level of accuracy do you require?

Is there clear line of sight over the distance to be measured?

...R

I see two options.

Look for commercially available products for distance measurements. Many of them have been available for many years and you will find information of how they work. Then choose one best suited for your purpose.

Second, scientific work is not only valid when it has a positive outcome. It is equally valid when you research something and find that something does not work. I read somewhere about studies that have been done about BLE distance measurements in trams and buses. They found the reflection of the radio waves by the metal vehicle housing creates unpredictable RSSI values. You could try this for yourself. Take your system and ride your local train and log the RSSI values. Note the distances and the spread of the RSSI values over a time.

Here is a link to a study I found

Measurement-Based Evaluation Of Google/Apple Exposure Notification API For Proximity Detection In A Commuter Bus

Ercank:
This is a project required for a university graduation thesis

I can't imagine that being true, but you might get some sort of proof of concept by using a BLE device like the HM-10, rather than an HC-05, which is just a "classic" Bluetooth. A case in point is a locally used COVID-19 tracing app which uses RSSI. This will not install on a phone that does not have BLE.