Skip to content

Commit

Permalink
upgrade TraCI to SUMO 0.25.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sommer committed Feb 22, 2016
1 parent 7ed5510 commit 7df73b1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/veins/modules/mobility/traci/TraCIConnection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,8 @@ std::list<TraCICoord> TraCIConnection::omnet2traci(const std::list<Coord>& list)

double TraCIConnection::traci2omnetAngle(double angle) const {

// rotate angle so 0 is east (in TraCI's angle interpretation 0 is south)
angle = angle - 90;
// rotate angle so 0 is east (in TraCI's angle interpretation 0 is north, 90 is east)
angle = 90 - angle;

// convert to rad
angle = angle * M_PI / 180.0;
Expand All @@ -251,8 +251,8 @@ double TraCIConnection::omnet2traciAngle(double angle) const {
// convert to degrees
angle = angle * 180 / M_PI;

// rotate angle so 0 is south (in OMNeT++'s angle interpretation 0 is east)
angle = angle + 90;
// rotate angle so 0 is south (in OMNeT++'s angle interpretation 0 is in positive x direction, 90 is in positive y direction)
angle = 90 - angle;

// normalize angle to -180 <= angle < 180
while (angle < -180) angle += 360;
Expand Down
4 changes: 2 additions & 2 deletions src/veins/modules/mobility/traci/TraCIScenarioManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -260,11 +260,11 @@ void TraCIScenarioManager::init_traci() {
uint32_t apiVersion = version.first;
std::string serverVersion = version.second;

if (apiVersion == 8) {
if (apiVersion == 10) {
MYDEBUG << "TraCI server \"" << serverVersion << "\" reports API version " << apiVersion << endl;
}
else {
error("TraCI server \"%s\" reports API version %d, which is unsupported. We recommend using SUMO 0.21.0.", serverVersion.c_str(), apiVersion);
error("TraCI server \"%s\" reports API version %d, which is unsupported. We recommend using SUMO 0.25.0.", serverVersion.c_str(), apiVersion);
}

}
Expand Down

0 comments on commit 7df73b1

Please sign in to comment.