Hi
Here is the code to get the x and y coordinates and also a speed of a moving
vehicle.
double myx,myy,myz,V
MobileNode *mn = (MobileNode*)Node::get_node_by_address(vanetID_);
mn->update_position(); // update the position, before using it
myx = mn->X(); // current own location
myy = mn->Y();
myz = mn->Z();
V = mn->speed();
MobileNode *mn = (MobileNode*)Node::get_node_by_address(vanetID_);
mn->update_position(); // update the position, before using it
myx = mn->X(); // current own location
myy = mn->Y();
myz = mn->Z();
V = mn->speed();
///vanetID_ = id of vehicle whose speed and coordinates you would like to
receive.//////
AJMAL KHAN
Ph.D Scholar
Telecommunication Networks Lab
School of Electrical Engineering and Computer Science
Kyungpook National University
Cell : +82 (10) 7732-3885
________________________________
From: Manfe <[email protected]>
To: [email protected]
Sent: Thursday, May 17, 2012 4:52 PM
Subject: [ns] location of node position using gps
Hello,
I am working on a VANET simulations and i need to detect the position and
speed of the nodes. I would want to know how the speed and the location of
the nodes can be obtained using GPS.
Help is urgently needed.
--
View this message in context:
http://old.nabble.com/location-of-node-position-using-gps-tp33862588p33862588.html
Sent from the ns-users mailing list archive at Nabble.com.