Hi everyone! Thanks for all the replies. I will think about the questions that you all have suggested to me. Thanks so much for all the help! I have found the coding on the data of the positioning of the mobile phone that was sent over to the Arduino side. However, the angle of the robot seems to a bit off sometimes.

The codes are as follows:

`private void sendBluetooth() {`

if (btSocket != null) {

try {

btSocket.getOutputStream().write((Float.toString(distFrom(startLat, startLong, endLat, endLong)) + "," + Float.toString(bearing(startLat, startLong, endLat, endLong, degree)) + "\n").getBytes());

msg("Message Sent");

} catch (Exception e) {

msg("Sending Error");

}

}

}

public float distFrom(float lat1, float lon1, float lat2, float lon2) { // one point to another point

float earthRadius = 6371000; //meters

double dLat = Math.toRadians(lat2-lat1);

double dLng = Math.toRadians(lon2-lon1);

double a = Math.sin(dLat/2) * Math.sin(dLat/2) + Math.cos(Math.toRadians(lat1)) * Math.cos(Math.toRadians(lat2)) * Math.sin(dLng/2) * Math.sin(dLng/2);

double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));

float dist = totalDistance + (float) (earthRadius * c);

totalDistance = dist;

return dist;

}

// start lat and long, end lat and long

public int bearing(float lat1, float lon1, float lat2, float lon2, float previousDegree){

double latitude1 = lat1;

double longitude1 = lon1;

double latitude2 = lat2;

double longitude2 = lon2;

double brng = Math.atan2((latitude2-latitude1),(longitude2-longitude1));

double atan2 = Math.toDegrees(brng);

if (atan2 < 0.0)

{

atan2 += 360;

}

degree = (float)atan2;

return (int)(atan2-previousDegree);

}