In my web/MySQL application I have something like this to get distance between two points:

6371 * acos(cos(radians(-19.83996)) * cos(radians(lat)) * cos(radians(-43.94910) - radians(lng)) + sin(radians(-19.83996)) * sin(radians(lat)))

But I tested in SQLite and these mathematical functions (acos, cos, radians, sin) do not exist. Is there something equivalent for me to calculate the distance directly in the database?

However, I have an iPhone application that uses this method to calculate. Works perfectly, but now I need to perform this same search in the database in an Android application.

Thanks in advance.

UPDATE

I have 9000 points to calculate distance and obtain the 5 nearby locations of a given point.

Edit
Report