御2行业进阶版,rtk.setStateCallback这回调结果,只收到一次,而不是实时动态接收的是什么原因?

Completed

Comments

21 comments

  • DJI Developer Support
    你有确定自己正确开启了RTK吗?setStateCallback会在状态变化的时候回调。开启RTK:如何开启RTK?
    0
    Comment actions Permalink
  • DJI Developer Support
    确定开启了,开启流程跟你们给出的文档一样的。
    0
    Comment actions Permalink
  • DJI Developer Support
    你们发一个上传地址吧?我把代码截屏上传你们看下。
    0
    Comment actions Permalink
  • DJI Developer Support
    这里是上传链接,您可以把代码上传到链接里。 上传链接:https://pan-sec.djicorp.com/s/LdY3sdbNQFJRRAs 密码:dji123
    0
    Comment actions Permalink
  • DJI Developer Support
    rtk相关的代码已上传,setStateCallback回调方法只执行一次。
    0
    Comment actions Permalink
  • DJI Developer Support
    我这边收到你的代码。从代码来看,可以给出一点建议。 这部分回调的设置建议采取嵌套形式,也就是在上一个设置成功的回调里设置下一个属性。sample中是通过按键设置,但是您的代码中是一同设置,因为线程的关系,他们实际上执行的顺序可能不会按照您代码上的顺序,因此建议使用形似嵌套的方式。 ![](https://djisdksupport.zendesk.com/attachments/token/IFJeS9xhhuAyzYw6Alx27dSnq/?name=image.png)
    0
    Comment actions Permalink
  • DJI Developer Support
    改成了嵌套,RTKNetworkServiceProvider.getInstance().startNetworkService这个方法报错,要登录大疆账号。错误信息:No logged in account or the login session has expired, please login DJI Account and try again.
    0
    Comment actions Permalink
  • DJI Developer Support
    使用RTK是需要登录大疆账号的,需要登录大疆账号获取账户信息解锁这部分功能。
    0
    Comment actions Permalink
  • DJI Developer Support
    是在自已工程中,代码登录大疆账号吗?那为什么,RTK信号好了,又可以使用呢?
    0
    Comment actions Permalink
  • DJI Developer Support
    你说的使用RTK是需要登录大疆账号,是使用这个UserAccountManager.getInstance().logIntoDJIUserAccount登录吗?这个登录方法,也没有传账号的参数呢?那这个账号是怎以传过去的。
    0
    Comment actions Permalink
  • DJI Developer Support
    是在自已工程中,代码登录大疆账号吗? -->是的。通过logIntoDJIUserAccount登录。 那为什么,RTK信号好了,又可以使用呢? -->RTK信号好指的是什么呢?如果要使用RTK功能是必须登录DJI账户,如果使用的是千寻RTK,需要读取账户里的对应信息,例如是否激活,使用期限。
    0
    Comment actions Permalink
  • DJI Developer Support
    我只是要实时监听RTK状态setStateCallback,这个也需要登录大疆账号吗?我用了大疆登录接口,这个没有后台传账号,而是弹框一个登录,手动输入账号的。我看pilot也没有在应用中弹大疆登录框啊!
    0
    Comment actions Permalink
  • DJI Developer Support
    pilot如果要使用功能是需要你登录DJI账户的,这一点您可以退出登录之后检验一下。不登录账户可以通过rtk.setStateCallback设置回调,但是使用网络RTK必须通过账户认证,rtk没办法使用,rtk.setStateCallback也就不会回调信息。目前MSDK只要弹出登录框的登录接口,你正确登录之后可以在logIntoDJIUserAccount的回调中查看到结果。 RTK的使用流程可以参考这篇文章:如何开启RTK? 如果是基站RTK则不用登录账户。
    0
    Comment actions Permalink
  • DJI Developer Support
    加了大疆账号登录,也登录成功了,setStateCallback这个回调还是只执行了一次。加了登录,这个网络状态监听addNetworkServiceStateCallback是可以多次回调了。另外RTK连接速度跟登录账号有没有关系,我加了登录后,感觉连接速度快了很多。
    0
    Comment actions Permalink
  • DJI Developer Support
    登录账户之后,你使用sample的RTK部分可以正常回调吗?sample:Mobile-SDK-Android/NetworkRTKView.java at master · dji-sdk/Mobile-SDK-Android (github.com) 需要注意的是使用这个DEMO前需要填写对应的APP_KEY。
    0
    Comment actions Permalink
  • DJI Developer Support
    sample中setStateCallback也只执行一次,如果只执行一次,什么时候达到PositioningSolution.FIXED_POINT怎么监听到。
    0
    Comment actions Permalink
  • DJI Developer Support
    方便上传一个你使用sample开启RTK的视频到我们的链接里吗?我们想更加直观地了解一下问题的表现。 LINK:https://pan-sec.djicorp.com/s/Td5RzddEA3aJx3z password:dji123
    0
    Comment actions Permalink
  • DJI Developer Support
    回调结果一次原因已找到了。
    0
    Comment actions Permalink
  • DJI Developer Support
    您方便向我们反馈一下是因为什么原因吗?如果是MSDK的问题,我们会尝试复现和修复的。
    0
    Comment actions Permalink
  • DJI Developer Support
    上一个页面有调用setStateCallback,页面没关。到下一个页再使用setStateCallback就不会实时刷新。
    0
    Comment actions Permalink
  • DJI Developer Support
    从您的描述来看应该是使用上的问题。 感谢您的反馈,如果有与你问题相同的开发者,我们有了一个新的思路去提供解决方案。
    0
    Comment actions Permalink

Please sign in to leave a comment.