These are chat archives for dronekit/dronekit-android

11th
May 2017
Nguyễn Thanh Hải
@b1acKr0se
May 11 2017 04:45

Hey guys. Is there an equivalent of DJI's custom mission step in dronekit?

To quote the doc:
"The Custom Mission serializes multiple missions or mission steps. It is an easy way to create complex, rich missions. Each mission step is uploaded to the aircraft at time of execution."

ansgar
@KirilaMenski
May 11 2017 07:55

Hi, guys! Can someone guide me how can I handle machine type drone to left, right, forward, back. I'm trying do it with YawCondition like:

YawCondition yawCondition = new YawCondition();
yawCondition.setAngle(10); //to move right
yawCondition.setAngle(-10); //to move left
yawCondition.setAngularSpeed(2);
mMission.addMissionItem(yawCondition);
MissionApi.getApi(mDrone).setMission(mMission, true);
MissionApi.getApi(mDrone).startMission(true, true, new AbstractCommandListener() {...});

But seems to it not working. Also I'm trying with ControlApi:

ControlApi.getApi(mDrone).turnTo(45, 30, false, new AbstractCommandListener() {...});
with a same thing

Seiran
@Zerakul
May 11 2017 08:36
@KirilaMenski
You realize that when you put
YawCondition yawCondition = new YawCondition();
yawCondition.setAngle(10); //to move right
yawCondition.setAngle(-10); //to move left
You override the first yawCondition.setAngle(10);?
and also YawCondition means that the drone will rotate on its axis. It will not move left or right only rotate.
and last, please note, that when you put setMission and startMission on the same action, this can cause to a crash, because there is always a possibility that the setMission didn't sent the data properly and the drone will start the last known mission
ansgar
@KirilaMenski
May 11 2017 08:44
@Zerakul Thanks for answer. Nope, It is two commands in different methods. I wrote it here for example. Is there any way at all to manage it in the left and right?
Seiran
@Zerakul
May 11 2017 08:47
@KirilaMenski What you mean "to manage it in the left and right?"
do you want to move the copter left and right like the RC stick inputs?
ansgar
@KirilaMenski
May 11 2017 08:52
@Zerakul I develop application to handle only land drone like a car. And I mean control a wheels to turn left and right
Seiran
@Zerakul
May 11 2017 08:57
@KirilaMenski Sorry, I don't understand what you trying to achieve.
If you trying to control the drone from your app like with RC , then as far as I know this functionality was disabled in Drone-Kit.
ansgar
@KirilaMenski
May 11 2017 09:04
@Zerakul I am sorry for my English) Maybe on screen it will be better understood. I have that car https://yadi.sk/i/xzfQbZ6R3J34BD and I need to manage it to left, right, foward and back.
Fernando de Oliveira Santos
@fernando-s97
May 11 2017 21:53
Hi guys, how can I get the follwing datas and where should I put then? Flight time, signal strength, satelitte count
I was almost forgetting, I need the drone location too
Seiran
@Zerakul
May 11 2017 21:59
@fernando-s97
Gps droneGps = this.drone.getAttribute(AttributeType.GPS);
droneGps.getPosition();
droneGps.getSatellitesCount();
this.drone.getFlightTime();
Signal signal = this.drone.getAttribute(AttributeType.SIGNAL);
signal.getSignalStrength();
Fernando de Oliveira Santos
@fernando-s97
May 11 2017 22:02
@Zerakul Where should I put this.drone.getFlightTime();, signal.getSignalStrength(); and droneGps.getPosition(); to keep all of them always updated?
Seiran
@Zerakul
May 11 2017 22:04
@fernando-s97 they are updated automatically when onDroneEvent called. Each attribute has his AttributeEvent for GPS it is AttributeEvent.GPS_POSITION .
Fernando de Oliveira Santos
@fernando-s97
May 11 2017 22:05
And just to confirm, the signal strenght is about the telemetry, right?
Seiran
@Zerakul
May 11 2017 22:06
@fernando-s97 I didn't check it yet, but I think it is telemetry signal.
Fernando de Oliveira Santos
@fernando-s97
May 11 2017 22:07
@Zerakul Thanks
Fernando de Oliveira Santos
@fernando-s97
May 11 2017 22:15
@Zerakul Do you know what the SoloState object is for?