I am trying to run a simulation in OMNeT++ to collect throughput with respect to a mobile wireless node location. I need to be able to collect the x and y coordinates of a node as a vector over the course of the simulation. It does not appear that any module automatically records the location of a node, and I have not been able to use cOutVector to add it myself.
None of the mobility modules I found (mostly using TurtleMobility, but I looked at several others) seem to record the node's position. I have also tried to record them manually with cOutVectors and signals, but I have not had success, as most of the important functions in INET are defined as const, and the cOutVectors functions and the emit() function for signals both seem to require non-const items (the cOutVector or sigsim_t) to operate on.
There is a signal, which is emitted on every update of mobility model. However, it is not added to the final statistic by default for some reason.
So, you may redefine the same signal in your application or in your host module but with @statistic
directive in the ned file, like here. Here is more about signal+statistic mechanism of data aggregation.