RTIToOTSData.java

  1. package org.opentrafficsim.road.network.factory.opendrive.data;

  2. import java.io.Serializable;

  3. /** */
  4. public class RTIToOTSData implements Serializable
  5. {
  6.     /** */
  7.     private static final long serialVersionUID = 20150000L;

  8.     /** Time stamp */
  9.     private float timeStamp;// int32_t64 Hans suggests

  10.     /** */
  11.     private float deltaT;

  12.     // My vehicle state
  13.     /** */
  14.     private Position egoPos; // position[m]

  15.     /** */
  16.     private Orientation egoOri;

  17.     /** */
  18.     private Velocity egoVel; // local reference frame

  19.     /** */
  20.     private AngularVel egoAngVel;

  21.     /** */
  22.     private int intersection_type;

  23.     /** */
  24.     private int intersection_phase;

  25.     /** */
  26.     private float intersection_distance;

  27.     /**
  28.      *
  29.      */
  30.     public RTIToOTSData()
  31.     {

  32.         this.setEgoPos(new Position()); // position[m]

  33.         this.setEgoOri(new Orientation());

  34.         this.setEgoVel(new Velocity()); // local reference frame

  35.         this.setEgoAngVel(new AngularVel());
  36.     }

  37.     /** {@inheritDoc} */
  38.     @Override
  39.     public String toString()
  40.     {
  41.         return "RTIToOTSData [timeStamp=" + this.getTimeStamp() + "\ndeltaT=" + this.getDeltaT() + "\negoPos="
  42.             + this.getEgoPos() + "\negoOri=" + this.getEgoOri() + "\negoVel=" + this.getEgoVel() + "\negoAngVel="
  43.             + this.getEgoAngVel() + "\nintersection_type=" + this.getIntersection_type() + "\nintersection_phase="
  44.             + this.getIntersection_phase() + "\nintersection_distance=" + this.getIntersection_distance() + "]";
  45.     }

  46.     /**
  47.      * @return timeStamp
  48.      */
  49.     public float getTimeStamp()
  50.     {
  51.         return this.timeStamp;
  52.     }

  53.     /**
  54.      * @param timeStamp set timeStamp
  55.      */
  56.     public void setTimeStamp(float timeStamp)
  57.     {
  58.         this.timeStamp = timeStamp;
  59.     }

  60.     /**
  61.      * @return deltaT
  62.      */
  63.     public float getDeltaT()
  64.     {
  65.         return this.deltaT;
  66.     }

  67.     /**
  68.      * @param deltaT set deltaT
  69.      */
  70.     public void setDeltaT(float deltaT)
  71.     {
  72.         this.deltaT = deltaT;
  73.     }

  74.     /**
  75.      * @return intersection_type
  76.      */
  77.     public int getIntersection_type()
  78.     {
  79.         return this.intersection_type;
  80.     }

  81.     /**
  82.      * @param intersection_type set intersection_type
  83.      */
  84.     public void setIntersection_type(int intersection_type)
  85.     {
  86.         this.intersection_type = intersection_type;
  87.     }

  88.     /**
  89.      * @return intersection_phase
  90.      */
  91.     public int getIntersection_phase()
  92.     {
  93.         return this.intersection_phase;
  94.     }

  95.     /**
  96.      * @param intersection_phase set intersection_phase
  97.      */
  98.     public void setIntersection_phase(int intersection_phase)
  99.     {
  100.         this.intersection_phase = intersection_phase;
  101.     }

  102.     /**
  103.      * @return intersection_distance
  104.      */
  105.     public float getIntersection_distance()
  106.     {
  107.         return this.intersection_distance;
  108.     }

  109.     /**
  110.      * @param intersection_distance set intersection_distance
  111.      */
  112.     public void setIntersection_distance(float intersection_distance)
  113.     {
  114.         this.intersection_distance = intersection_distance;
  115.     }

  116.     /**
  117.      * @return egoPos
  118.      */
  119.     public Position getEgoPos()
  120.     {
  121.         return this.egoPos;
  122.     }

  123.     /**
  124.      * @param egoPos set egoPos
  125.      */
  126.     public void setEgoPos(Position egoPos)
  127.     {
  128.         this.egoPos = egoPos;
  129.     }

  130.     /**
  131.      * @return egoOri
  132.      */
  133.     public Orientation getEgoOri()
  134.     {
  135.         return this.egoOri;
  136.     }

  137.     /**
  138.      * @param egoOri set egoOri
  139.      */
  140.     public void setEgoOri(Orientation egoOri)
  141.     {
  142.         this.egoOri = egoOri;
  143.     }

  144.     /**
  145.      * @return egoVel
  146.      */
  147.     public Velocity getEgoVel()
  148.     {
  149.         return this.egoVel;
  150.     }

  151.     /**
  152.      * @param egoVel set egoVel
  153.      */
  154.     public void setEgoVel(Velocity egoVel)
  155.     {
  156.         this.egoVel = egoVel;
  157.     }

  158.     /**
  159.      * @return egoAngVel
  160.      */
  161.     public AngularVel getEgoAngVel()
  162.     {
  163.         return this.egoAngVel;
  164.     }

  165.     /**
  166.      * @param egoAngVel set egoAngVel
  167.      */
  168.     public void setEgoAngVel(AngularVel egoAngVel)
  169.     {
  170.         this.egoAngVel = egoAngVel;
  171.     }

  172. }