Excellent!
Where to start - I have no idea, I have never done any android development
I do have a wealth of experience on Linux, and of course Android is built on Linux.
Let me give a brief overview.
The CollisionAware App does nothing more than connect to a listening posix socket on PilotAware,
then it streams the Location services information through the socket connection.
in essence - thats it!
So I would start by investigating :-
1. How to access location services on Android
2. Socket Comms on Android
I would hope (2) is Linux/Posix compliant, in which case we can just lift the code straight from the
IOS Application.
We could probably take most of this info offline through direct email, but let me start by saying this is
what the code in the IOS callback thread looks like for grabbing the location data.
gps.f32lat = (Float32) (currentLocation.coordinate.latitude);
gps.f32lon = (Float32) (currentLocation.coordinate.longitude);
gps.i32altmtr = (int32_t) (currentLocation.altitude);
gps.course = (int32_t) (currentLocation.course);
gps.speedms = (int32_t) (currentLocation.speed);
// convert Metres to feet
gps.i32altft = gps.i32altmtr * METRES_TO_FEET;
gps.speedkns = gps.speedms * MS_TO_KNOTS;
Hopefully location services data in Android is all in the same format - but may not be the case.
so as you can see from above I grab the data into a structure, and then this is sent over the posix socket,
in another thread with a specific interval period of 1 second
//
// If we are connected to the port
//
sprintf(tbuf, "$P3IGGA,%f,%f,%d,%d,%d,%d,%d,%d,*FF\r\n",
gps.f32lat, gps.f32lon, gps.i32altft,
gps.course, gps.speedkns, date, time,
gps.valid);
if (sendData(gps.sockfd, tbuf, &gps.commsok) <= 0) {
NSLog(@"sendData Failed self=%@", self);
}
This is then received by PilotAware and used accordingly.
Is this enough bootstrap info ?
As I mentioned 2 things to investigate, accessing location services, setting up posix thread connections.
Thx
Lee