So, I have this nifty function:
latitudeDifference = endLatitude - startLatitude longitudeDifference = endLongitude - startLongitude RADIUS = 6367 (This is the radius of the earth)
angle = $\sin^2\left(\dfrac{latitudeDifference}{2}\right) + cos(startLatitude) * cos(endLatitude) * \sin^2\left(\dfrac{longitudeDifference}{2}\right) $
unitDistance = 2 * arctan$\left(\dfrac{\sqrt(angle)}{\sqrt(1.0f - angle)}\right) $
distance = RADIUS * unitDistance;
that helps me to figure out the distance between two points, given a startCoordinate and an endCoordinate. However, I am trying to utilize this function in order to calculate the latitude and longitude offsets given a distance (basically inverting the function for endLatitude and endLongitude), but when I found the functions, I couldn't escape i in many use cases, which says to me that the calculation must be invalid.
Is it possible to inverse this function to find a latitude or longitude offset for which is 'distance' away from the starting point?
Basically, if I have a coordinate (latitude : 50.0, longitude : 100.0) and I want to know the offset for both latitude and longitude (two separate equations) given a certain distance (50KM in this case), is it possible to reverse this function in order to give me a latitude offset (50KM away from (50.0, 100.0) using only latitude) and a longitude offset (50KM away from (50.0, 100.0) using only longitude)?
In even simpler terms, I have distance, but I want endLatitude and endLongitude by calculating them separately and assuming their counterpart is 0.
EDIT
I want to find the distance in latitude and longitude. Essentially, I want to know the offset of latitude that is 50km away from the starting point and the longitude offset that is 50km from the starting point in terms of latitude.longitude (degrees and/or radians).
Maybe this image will help:
I want to find point A and point B in terms of Latitude and Longitude (Radians)