The easiest way is to access directly to mobility module from the Udp app module.
Appp and mobility modules are child of host module. So, you need to write the following inside UDP module:
cModule* mobilityMod = getParentModule()->getSubmodule("mobility", 0);
Usually mobility is the name of the mobility module, if it has another name, then you have to change it in getSubmodule() function.
You can make a dynamic_cast to evaluate the tyoe of mobility and you will have access to its internal functions.
For example:
dynamic_cast<LinearMobility*>(mobilityMod)->getSpeed();
getSpeed() or any other getter or setter function.
More help in this link:
https://doc.omnetpp.org/omnetpp/api/classomnetpp_1_1cModule.html