Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Inquiry : Conversion from co-ordinate axis to Latitude and Longitude

What is the <location> attribute of the network that was loaded when the calls below were made?

Am Fr., 3. Mai 2019 um 19:00 Uhr schrieb Sheshadri Kalkunte Ramachandra <sheshadrik@xxxxxxxxxx>:
Code:

position = traci.vehicle.getPosition(self.vehicleId)
pos_x = position[0] # cartesian X
pos_y = position[1] # cartesian Y
geo_co_ord = traci.simulation.convertGeo(pos_x, pos_y, fromGeo=False)

The geo co-ordinates which i receive are incorrect. I have checked by putting them in google maps.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Outputs:

The cartesian co-ordinate  (50450.7527098387, 22602.868908196364)  => returned by getPosition(vehicleId)
The geo co-ordinate  (777805.9327098387, 1439436.2689081964) => returned by convertGeo(pos_x, pos_y)



Back to the top