sommer / veins

Veins - The open source vehicular network simulation framework.
http://veins.car2x.org
GNU General Public License v2.0
284 stars 225 forks source link

The variable “curSpeed” in handlePositionUpdate(cObject* obj) is equal to (-0,0,0) #198

Closed shengun567 closed 3 years ago

shengun567 commented 3 years ago

When I run the examples in veins5.0, I find the value of curSpeed is equal to (-0,0,0). Why?

void DemoBaseApplLayer::handlePositionUpdate(cObject* obj)
{
    ChannelMobilityPtrType const mobility = check_and_cast<ChannelMobilityPtrType>(obj);
    curPosition = mobility->getPositionAt(simTime());
    curSpeed = mobility->getCurrentSpeed();
    EV<<"DemoBaseApplLayer::handlePositionUpdate curSpeed="<<curSpeed<<endl;
}
sommer commented 3 years ago

Thank you for your message, but this is most probably not the right place to have this discussion. We're using the Veins issue tracker only to track mistakes in Veins. While there is certainly a chance that you might have found a mistake, there is also a good chance that Veins is working as it should and, rather, your problem can be solved with some guidance. May I please point you to the Veins FAQ for further guidance and a list of preferred places for having discussions. You can find the FAQ at http://veins.car2x.org/documentation/faq/