Message broker to send GPS

is there an example on how to add GPS information with deepstream message broker?

Is a dynamic or static

dynamic like in getting messages constantly from GPS unit so that they will be sent by MQTT e.g. to Azure so they will appear at Azure , so it will be possible see GPS location from there , for example

but static sample could also do as it could be looped probably

so either of the two

Can you specify your pipeline?

@amycao Thank you for following up!
There is no pipeline at the moment.
I am trying to find an example on how to add GPS data somehow using the deepstream message broker example or somehow else.

“nvmsgbroker” plugin extracts NVDS_META_PAYLOAD type of metadata from the buffer and sends that payload to the server using APIs in nvmsgbroker C library.
for your GPS data, you can create custom objects and attach to buffer as NVDS_EVENT_MSG_META metadata.
To do that NvDsEventMsgMeta provides “extMsg” and “extMsgSize” fields. User can create custom structure, fill that structure and assign the pointer of that structure as “extMsg” and set the “extMsgSize” accordingly. If custom object contains fields that can’t be simply mem copied then user should also provide function to copy and free those objects.
Refer generate_event_msg_meta() to know how to use “extMsg” and “extMsgSize” fields for custom objects and how to provide copy/free function and attach that object to buffer as metadata.
but you need to first generate the GPS data. then integrate with deepstream like above.

1 Like

devs are asking if there is nvmsgbroker Python library
seems there is NvDsEventMsgMeta — Deepstream Deepstream Version: 5.1 documentation
GPS messages are like this

'sender': string,
'time': float,
'counter': int,
'location': (float, float),
'latitude': float,
'longitude': float,
'shift': float,
'speed_ms': float,
'speed_accuracy': int,
'gps_fix_ok': 1|0,
'head_valid': 1|0,

We do not have Python version for deepstream plugins or library, you need to implement in c version, and add python binding for it. you can refer to this faq for how to add python binding.
DeepStream SDK FAQ - Intelligent Video Analytics / DeepStream SDK - NVIDIA Developer Forums

It is not exactly very clear how to use the metadata buffers, given I just want to forward like /dev/pts/26 output with it, right?

terminal 1:

nvidia@nx_xavier:~$  socat -d -d pty,raw,echo=0 pty,raw,echo=0
2021/05/06 13:13:55 socat[23720] N PTY is /dev/pts/25
2021/05/06 13:13:55 socat[23720] N PTY is /dev/pts/26
2021/05/06 13:13:55 socat[23720] N starting data transfer loop with FDs [5,5] and [7,7]

terminal 2:

sudo apt install csh -y
nvidia@nx_xavier:~$ tclsh8.6 gpsfeed+.tcl 

From this point there will be opened GUI of the gpsfeed. - two
GUI windows;
e.g. in serial section goes insteead of default COM1 → /dev/pts/25; baudrate to ->9600
Then in second GUI window = pressing play [ in the top left - a circle icon with a dot in the center;]
Now from the third terminal the GPS feed is available

:~$ cat /dev/pts/26

mentioned in Windows IoT Core - #9 by Andrey1984