Class GTUTransceiver

All Implemented Interfaces:
Serializable, EventListener, EventListenerInterface, EventProducerInterface, Identifiable, org.opentrafficsim.imb.transceiver.EventTransceiver, org.opentrafficsim.imb.transceiver.Transceiver

public class GTUTransceiver
extends AbstractTransceiver
The GTUTransceiver publishes the following information on the IMB bus:
  1. LaneBasedGTU.LANEBASED_INIT_EVENT as an IMB NEW event for a GTU entering the network. This also is done for GTUs that have been registered at the start of the simulation.
  2. LaneBasedGTU.LANEBASED_MOVE_EVENT as an IMB CHANGE event for a GTU that moves on the network.
  3. LaneBasedGTU.LANEBASED_DESTROY_EVENT as an IMB DELETE event for a GTU that leaves the network.
GTUs are identified by their gtuId.

OTS publishes events about GTUs (vehicles) to IMB, e.g. to calculate statistics or emissions from the vehicles or to display them in the US animation.

When a GTU is created, a NEW message is sent to IMB to identify the GTU and its initial characteristics, including the lane on which it resides with its reference point, and the position on the lane. The CHANGE message is posted whenever a vehicle initiates a new OperationalPlan, which coincides with a MOVE Event in OTS. When a GTU is removed from the network, a DELETE event is posted. The GTU NEW messages are posted after the Network NEW, Node NEW, Link NEW, and Lane NEW messages are posted to ensure the Lane on which the GTU resides is known.

The longitudinal position of a GTU on a lane is the (projected) position on the center line of the lane, in meters. The zero-point is chosen at the start of the center line of the lane that has been provided in the Lane_GTU NEW message.

NEW

 
Variable Type Comments
timestamp double time of the event, in simulation time seconds
gtuId String id of the GTU that has been added to the simulation
position.x double x-coordinate of the gtu position in (gis) coordinates
position.y double y-coordinate of the gtu position in (gis) coordinates
position.z double z-coordinate of the gtu position in (gis) coordinates
position.rotZ double angle in the x-y plane of the gtu
networkId String Id of the Network where the gtu's reference point is
linkId String id of the Link; unique within the Network
laneId String id of the Lane, unique within the Link
longitudinalPosition double gtu position on the center line of the lane, in meters
length double length of the gtu, in meters
width double width of the gtu, in meters
baseColor.R byte R-component of the gtu's base color
baseColor.G byte G-component of the gtu's base color
baseColor.B byte B-component of the gtu's base color

CHANGE

 
Variable Type Comments
timestamp double time of the event, in simulation time seconds
gtuId String id of the vehicle that has a new position
position.x double x-coordinate of the gtu position at the timestamp
position.y double y-coordinate of the gtu position at the timestamp
position.z double z-coordinate of the gtu position at the timestamp
position.rotZ double angle in the x-y plane of the gtu
networkId String Id of the Network where the gtu's reference point is
linkId String id of the Link; unique within the Network
laneId String id of the Lane, unique within the Link
longitudinalPosition double gtu position on the center line of the lane, in meters
speed double current speed of the gtu, in m/s
acceleration double current acceleration of the gtu, in m/s2
turnIndicatorStatus String one of {NONE, LEFT, RIGHT, HAZARD, NOTPRESENT}
brakingLights boolean braking lights on or off
odometer double odometer reading of the GTU, in meters

DELETE

 
Variable Type Comments
timestamp double time of the event, in simulation time seconds
gtuId String id of the GTU that that is removed from the simulation
lastPosition.x double x-coordinate of the gtu position at removal
lastPosition.y double y-coordinate of the gtu position at removal
lastPosition.z double z-coordinate of the gtu position at removal
position.rotZ double angle in the x-y plane of the gtu
lastNetworkId String Id of the Network where the Link resides
lastLinkId String id of the Link where the GTU was destroyed
lastLaneId String id of the Lane in the Link where the GTU was destroyed
lastLongitudinalPosition double gtu position on the center line of the lane, in meters
odometer double final odometer reading of the GTU, in meters

Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.

$LastChangedDate: 2015-07-24 02:58:59 +0200 (Fri, 24 Jul 2015) $, @version $Revision: 1147 $, by $Author: averbraeck $, initial version Sep 11, 2016
Author:
Alexander Verbraeck, Peter Knoppers, Wouter Schakel
See Also:
Serialized Form