These are chat archives for dronekit/dronekit-android

20th
Jul 2016
newtoniant
@newtoniant
Jul 20 2016 19:31
Anybody know how to read the home position from the drone? I'm not sure if I'm not doing it right, or if I've not generated my MAVLink code correctly.
Kelly Schrock
@kellyschrock
Jul 20 2016 19:31
Easy peasy:
Gps gps = drone.getAttribute(AttributeType.GPS);
if(gps != null && gps.isValid()) {
LatLong pos = gps.getPosition();
}
Sorry, my markdown skills in this one-line editor are "under development" :-)
Oh, wait, you said home position. One sec...
final Home droneHome = drone.getAttribute(AttributeType.HOME);
droneHome.getCoordinate() returns the home position.