dji-sdk / Mobile-SDK-iOS

DJI Mobile SDK for iOS: http://developer.dji.com/mobile-sdk/
Other
577 stars 256 forks source link

Matrice 300 RTK -WaypointV2Mission conflicts with RTK? #424

Closed dingpwen closed 3 years ago

dingpwen commented 3 years ago

When RTK is Open, and trying to [[DJISDKManager missionControl].waypointV2MissionOperator startMissionWithCompletion:^(NSError * _Nullable error) {}]

It always tell that "The aircraft home point is not recorded yet"

But when I open the Rtk through RC, RC told me that home location is updated.

How to make waypointV2Mission work normally when RTK is opened?

MY firmware and sdk are all the latest.

Matheus193dn commented 3 years ago

@dingpwen hey it's me again, I have a note for you: only disable RTK when you are using Assistant app (for M300) to debug inside. If you go outside, please enable it.

This is my code when I debug inside:

image

For more details: https://github.com/Matheus193dn/Mobile-SDK-iOS/blob/master/Sample%20Code/SwiftSampleCode/DJISDKSwiftDemo/Camera/fpv/CameraFPVViewController.swift

dingpwen commented 3 years ago

@Matheus193dn

At first, thanks for your help!

I have tested outside, it also show me the same hits as "The aircraft home point is not recorded yet" when RTK is opened.

Matheus193dn commented 3 years ago

image Did you try with one of these functions?

dingpwen commented 3 years ago

image Did you try with one of these functions?

I tried when using assistant app, but no-use. When test outside, these codes have been deleted.

Matheus193dn commented 3 years ago

Oh, the weather in my location is not good today. I will try it when the weather get better, I will let you know my result ASAP.

dingpwen commented 3 years ago

@dji-dev Do you have any answers?

dingpwen commented 3 years ago

when I am trying to get the info of home location: getHomeLocationWithCompletion:^(CLLocation * _Nullable homeLocation, NSError * _Nullable error) { if(error) { NSLog(@"get home location error:%@", error.description); } else { NSLog(@"home location is (lat=%.6f,lon=%.6f, high=%.2f)", homeLocation.coordinate.latitude, homeLocation.coordinate.longitude, homeLocation.altitude);

I find that altitude is always 0, even if i use use codes to force set to 100: dispatch_async(dispatch_get_main_queue(), ^{ CLLocation *loc = [[CLLocation alloc]initWithCoordinate:homeLocation.coordinate altitude:100 horizontalAccuracy:0 verticalAccuracy:0 timestamp:[NSDate date]]; [[BRDroneSDKManager obtainFlightController]setHomeLocation:loc withCompletion:^(NSError * _Nullable error) { if(error) { NSLog(@"set home location error:%@", error.description); }

It is also 0, when get after set success.

dingpwen commented 3 years ago

@Matheus193dn any news?

@dji-dev any replies?

Matheus193dn commented 3 years ago

Oh, sorry for late response. I tested with RTK enabled on Phantom4 RTK and it worked, i will test M300 later.

dingpwen commented 3 years ago

Oh, sorry for late response. I tested with RTK enabled on Phantom4 RTK and it worked, i will test M300 later.

Do you open the RTK by RC or codes?

Matheus193dn commented 3 years ago

Oh, sorry for late response. I tested with RTK enabled on Phantom4 RTK and it worked, i will test M300 later.

Do you open the RTK by RC or codes?

oh i used code to enable/disable it

dingpwen commented 3 years ago

Oh, sorry for late response. I tested with RTK enabled on Phantom4 RTK and it worked, i will test M300 later.

Do you open the RTK by RC or codes?

oh i used code to enable/disable it

Your RTK uses BASE_STATION or Network RTK?

Matheus193dn commented 3 years ago

@dingpwen plz use BASE_STATION

dingpwen commented 3 years ago

@dingpwen plz use BASE_STATION

I test outside yesterday, and found it can fly with BASE_STATION. But what a fuck, the app crash in this line: _gps = [DUXGPSSignalWidget new];

with error as EXC_BAD_ACCESS!