DJI Mobile SDK and DJI Simulator - dji-sdk

Is it possible with the Mobile SDK to write an application that receives way points from a web service and then starts the drone and monitors its operation?
The use case is as follows:
- Start drone
- Fly to a height of 2m
- Take picture/video and send/stream picture/video to the app
- Land again
Is it possible to simulate my code in the DJI Simulator and then when I know everything works use a Spark or Mavic for a real-life demonstration?

Yes absolutely, although it's not necessarily MobileSDK specific and here's a example:
1/ You create a desktop (native or web) app that does the mission planning. This app can save the mission in a known format - My advice is to create a framework/library to manage this format -
2/ A mobile app built on top of the MobileSDK reads the mission in the format - using the said framework that manages this format.
3/ The mobile app translates the mission requirements into missions system available on MobileSDK either through WaypointMissions, MissionControl or even VirtualStick commands.
As for simulation, once the drone is in simulator mode, the execution will work and show how it executes.
If you want to take things further, you can even stream back from the mobile app data to your destkop app to superpose actual path against planned path.
I can't drop a code source for this as it's extensive, but hopefully this helps.

Related

Extremely slow socket data throughput on Android 11?

I've seen some posts elsewhere about very slow file access after "upgrading" a device to Android 11. I'm not having that, but I AM having unbelievably slow performance in a small app that uses sockets. It's a client app that uses a socket to send a request to a server (mine) that monitors my solar installation, to get data back about how it has been performing etc. So the socket interaction is in a separate thread from the UI, and uses runOnUIThread to call a function that updates the UI with the received data. The request data is only a few bytes, maybe 20 or so maximum: the data coming back varies from a few hundred bytes to maybe 50000 bytes or thereabouts.
If I run this app on my phone (Android 8.1) it is fine - it takes 1.5 to 2 seconds to send the request, get the data back, and update the UI. Perfectly fine. It's the same on an older tablet running Android 7.1.2 too. But I have just recently acquired a flash (read expensive) new Samsung tablet running Android 11, and its performance is woeful - the same app doing the same operation takes anything up to 30 seconds, or even more. And it is exactly the same app, exactly the same code. Both devices are running on the same network, so the only significant difference seems to be the Android version. It is repeatable ad nauseum, so it isn't momentary network load either. The app is built to target API level 26 - it has to be so it can run on all the devices it needs to. It is not a commercial app, just something for my own use, but I am totally bewildered by this behaviour.
The other thing I have noted with this new tablet is that it is unable to provide a video stream from a surveillance IP camera I have at home. I use the TinyCam Pro app from Google Play for this. It can connect, but it has never yet managed to give me a picture, regardless of how good my connection is. Again, my phone and the older tablet can do this more often than not, and the new tablet would have far more horsepower than either of them. There is some sort of serious bottleneck in there!
Has anyone else seen this type of thing on Android 11? If so, is there anything that can be done about it, that is usable on earlier versions too? Or do we just have to wait for Android 11.1?
EDIT: I've done some more investigation on this, and I think I have now pinned it down to a 4G network bandwidth issue. I said that the tablet and the phone were doing exactly the same thing, but I have since remembered that they do NOT use the same carrier for their mobile connections. So it's not EXACTLY the same thing. I would actually expect the network capacity for the tablet's carrier to be superior to that of the phone's carrier, but that appears not to be the case where I am at the moment. So I think I have to take back my evil thoughts about the tablet, and maybe even Android 11. Interesting how easy it is to be misled, and how hard it can be to genuinely compare apples with apples when there are so many variables and so many links in the chain. I'll be doing some more tests and comparisons when back in the city, where network capacity should be much more alike for the two carriers.
yes its true. While compare to Android 11 and Android 8 there is a lot of changes updated because of security issue.
May be, If your managing some file in mobile storage mnt/sdcard/ here in this path its speed of access or managing a file in this path its restricted and its becomes less. So, if your using this path please change it like below because it will cause youe app to process slow.
solution - Try to use this file access path is Android/data/data/packageName/
I mean if your using this logic to access file - Environment.getExternalStorageDirectory()
instead of above try this - Context.getExternalFilesDir(null)
refer this link https://developer.android.com/about/versions/11/privacy/storage
I hopes it will help you...

Can I test my DJI SDK for Windows 10 application with a DJI Drone simulator without the risk of running a real DJI Drone?

Can I test my DJI SDK for Windows 10 application with a DJI Drone simulator without the risk of running a real DJI Drone?
I am asking since it is cumbersome to have developers run a real drone in their office to test what they are building.
There are 2 ways to test applications but both require a physical drone.
1) Download and install the PC Simulator; this is a game-engine that connects the PC (USB) to a drone and displays the flight operations. It is available online under the developer downloads.
2) Using the API, you can enable simulator. This method is not as good because you cannot see in real-time what the aircraft is doing unless you receive and display flight details within your app.
Both act the same to the PC simulator can be easier to evaluate and observe the flight operation.
You can set your drone in a simulator mode using the APIs.
This will make your drone respond as if it was flying, but the motors won't turn on.
After that, you can use the DJI Assistant to visualize the aircraft moving in a simulated 3D environment.

UWP Mediabox - a few questions

I have a question to you and I really hope you can provide me some information.
I wish to build a media center because I have not found any possibilities to cast my stuff straight to the big screen from my Windows mobile phone.
Off course there is the wireless display adapter from Microsoft but I wish not to cast my whole display to my tv.
After testing a few product (Amazon fire tv box, apple tv 3, display dock and the wireless dock) I came to the conclusion that I can not have an all in one solution which fits my perceptions.
From that point I thought that I have to build my own "tv application".
Ok ok... There is kodi(xbmc) and so on... But I think this is just making a detour.
Following features must be included:
running on Windows 10
Cast music, videos and pictures.
Ability to launch and download windows store apps.
Project Rome implementation to share data across devices.
Seems possible but here´s one big problem...
If we are talking about mediaboxes, we do talk about those small boxes besides your tv. Instead off building a micro ATX setup, I want to take this to the next level... using IoT (Raspberry Pi 3).
Using IoT may have some advantages but there are a few disadvantages I have to worry about.
Will Windows 10 work properly on IoT (advantages - disadvantages)
Media streaming?
ARM architecture
Bluetooth, WIFI, Ethernet connectivity
I have never ever worked on IoT before, so I am kinda noob again. I´am asking for some advices to make this possible.
[UWP] How can I stream data (e.g. video, music, images) to another application?
[UWP] Implement a remote control - just like the amazon fire tv controler ?
Advantages - Disadvantages of using Windows 10 on a Raspberry Pi ?
Using windows 10 default applications (Groove Music, Images, Videos - Application) to play incomming data?
What do you think? Is it possible to create a Mediacenter which is running on a raspberry pi using windows 10?
Thank you in advance.
The most straightforward idea would be to create an always-running app with a MediaPlayerElement with a Source property that can be set programmatically by a remote control app. A remote control app could also control the pause, play, next, previous actions.
Be aware that there is no hardware video acceleration support for Raspberry Pi on Windows IoT Core yet, and probably that also won't come soon. There are other devices that do have proper video drivers (look at the hardware support page of Windows IoT Core).
Also be aware that there is no Windows Store on Windows IoT Core, unless you are an OEM (then you can publish your properly signed apps in an official way to devices that are managed by you).
A simpler way would be to buy a Windows 10 box from aliexpress. Then you can use Miracast to stream your screen, install apps from the App Store and play films directly on it, for example using Kodi for which remote control apps exist.

Automatically map mobile devices to drive letter?

Evening community.
I'm in the process of developing a windows based application which heavily revolves around mobiles being connected to a machine via USB, Currently. The communication between android using googles ADB drivers works without a problem (currently, that is). The problem is getting said application to integrate well with IOS users.
What the application does I'm bascially reinventing the wheel of stock control for a client, who wants a completely customized application based around their current mobile barcode scanner which scans and saves the scanned items to a file name created with the date & Time in a text format. This application is both on IOS and Android devices.
What i'm looking to do, is have their current machine automatically map the connected device to a drive letter to allow easier browsing of the device through the application & Pull the necessary file and save locally to then make other changes as needed..
So, the overall question. Is, that without having a jailbroken/rooted mobile device to allow Mass Storage, is it possible to have a Windows XP based machine to automatically map connected IOS and Android devices to a drive letter? There will be only one device connected at one time

Windows Phone Test Framework by Expensify

Does the Windows Phone Test Framework by Expensify support testing on real mobile devices running windows phone 7 OS ?
If yes, which devices does it support? Please reply.
It depends what functionality you want to test.
The framework uses 3 different APIs to talk to the apps:
a COM API to talk to install/uninstall and start/stop apps
Silverlight automation peer support (communicated to using HTTP) to
talk to the silverlight controls within the apps - this allows get
and set of values, some list manipulation and inspection of the
visual tree.
Mouse and keyboard emulation to control the emulator
device - this is needed to do things like physical touches, hard
button presses (and other emulator interactions when the app isn't
running - e.g. taking photos).
For devices attached using USB: 1 and 2 are available
For devices attached using a network: 2 only is available
In summary, you can do some things if you want to... but I don't use the test framework to test real phones - I stick to the emulator. When external inputs (e.g. camera or gps) are needed then I find a way to mock them
according to the first few seconds of http://www.youtube.com/watch?v=2JkJfHZDd2g "there is some support for devices".
I would hope/expect all devices to devices to behave the same way, subject ot how they're configured.

Resources