Hello, you need to specify the source position type tmp->writeByte(POSITION_2D) before sending x and y
regards, Jakob From: Wasim Ahmed <[email protected]> > To: "[email protected]" <[email protected]> > Cc: > Date: Tue, 6 Dec 2016 12:52:27 +0000 (UTC) > Subject: Fw: SUMO-TRACI-QUERY [Converting XY Coordinates to Lat/Long] > > > > Hello, > > > > I wanted to convert the retrieved XY coordinates to Latitude and Longitude. > > > > I saw the command to do so is 0x82 and 0x58 in documentation [ > http://www.sumo.dlr.de/wiki/TraCI/Simulation_Value_ > Retrieval#Command_0x82:_Position_Conversion]. > > > > I have valid XY Coordinates in pos.x and pos.y. > > So in order to convert my XY Coordinates to Lat/Long . I am using > following command. Don’t know what’s wrong with it: > > > > *tcpip*::Storage* *tmp* = new *tcpip*::Storage; > > > > *tmp*->writeByte(TYPE_COMPOUND); > > *tmp*->writeInt(2); > > > > *tmp*->writeDouble(pos.x); > > *tmp*->writeDouble(pos.y); > > *tmp*->writeByte(TYPE_UBYTE); > > > > *tmp*->writeUnsignedByte(POSITION_LON_LAT); > > > > send_commandGetVariable(0x82,0x58,“veh1”,*tmp*); > > > > I debugged the code and error is coming in > “send_commandGetVariable(0x82,0x58,“veh1”,tmp);” > function. > > Getting following error on SUMO-GUI Server: > > > > Error: tcpip::Storage::readIsSafe: want to read 823066624 bytes from > Storage, but only 20 remaining > > Quitting (on error). > > > > > > Any Help!! > > > > ThanksJ > > > ------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today.http://sdm.link/xeonphi _______________________________________________ sumo-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sumo-user
