How to receive Status or Single Frame Data from HTTP Block?  

  RSS

Moderator
(@moderator)
Member Admin
Joined: 9 years ago
Posts: 1048
09/06/2017 4:09 pm  

I am using the HTTP blocks for remote control. This works great!
I know that somehow it is possible to get a singe "snapshot" of the datas coming from the HTTP block via my web browser (instead of a steady stream). How can i do that?
I would like to get those information from the drone detector block so i can allign my camera to the drone.

All you have to do is to add the port number to the browser and then add "sample". You will then get a data "snip" from the stream e.g. " http://localhost:54664/sample".

The JSON dataoutput from the "Drone Detector" block would then look something like attached sample (detection of one drone and one remote):

{
   "data": {
       "tracks": [
           {
               "altitude": -1.0462738275527954,
               "bearing": 2.7427170276641846,
               "detectTime": 1494231786.0274136,
               "energy": -38.492889404296875,
               "info": "FrametQuadcopternDiametert590mmnVeloctiyt20m/snRanget3500mnStaminat28MinnWeightt1,38kgnPayloadt0,462kgn",
               "name": "DJI Phantom 4",
               "probability": 1
           },
           {
               "altitude": -1.0233732461929321,
               "bearing": 2.8442740440368652,
               "detectTime": 1494231787.0813968,
               "energy": -49.153297424316406,
               "info": "TypetRemote ControlnFrametCopternChannelst36 ChannelsnBandwidtht2048kHznModulationtGFSK (FASST)n",
               "name": "Generic 2.4GHz RC",
               "probability": 0.9977357387542725
           }
       ]
   },
   "endTime": 1494231793.6948342,
   "startTime": 1494231793.6948342
}

P.S. all time values are Linux Epoch (seconds since 01.01.1970 at 0:00)

Snip


ReplyQuote
Share: