Exporting simulated SITL GPS

I would like to know if this setup is possible:

I want to export simulated SITL GPS through TCP/serial port, do some data manipulation on it and then inject it again to SITL through parameter command

Is there any arguments in SITL command line which supports this?
Or could you please guide me how to implement this through modifying SITL source code



From memory, we just have two simulated GNSS on SITL and we don’t allow double connection (not sure but nerver seen it) on a single unit.
We support nmea output from the autopilot, so you can use the second GNSS and use the tcp port as nmea to have the output. From there injection is straight forward.
I am not sure if we allow a direct passthrough to the gps for ublox protocols in a sane way.

Looking into libraries/SITL and libraries/AP_HAL_SITL you should gind the two files used for simulated GNSS. Code is quite simple