RuleUtils.addOccurrence(E027, id + " has bearing of " + position.getBearing(), e027List, _log);
heading = position.getBearing();
vpm.setLon(p.getLongitude()); if (p.hasBearing()) { vpm.setBearing(p.getBearing());
public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.Position other) { if (other == com.google.transit.realtime.GtfsRealtime.Position.getDefaultInstance()) return this; if (other.hasLatitude()) { setLatitude(other.getLatitude()); } if (other.hasLongitude()) { setLongitude(other.getLongitude()); } if (other.hasBearing()) { setBearing(other.getBearing()); } if (other.hasOdometer()) { setOdometer(other.getOdometer()); } if (other.hasSpeed()) { setSpeed(other.getSpeed()); } this.mergeExtensionFields(other); this.mergeUnknownFields(other.getUnknownFields()); return this; }
/** * Returns true if this position has valid bearing, and false if it does not * * @param position Vehicle position to validate * @return true if this position has valid bearing, and false if it does not */ public static boolean isBearingValid(GtfsRealtime.Position position) { if (!position.hasBearing()) { return true; } if (position.getBearing() < 0 || position.getBearing() > 360) { return false; } return true; }
public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.Position other) { if (other == com.google.transit.realtime.GtfsRealtime.Position.getDefaultInstance()) return this; if (other.hasLatitude()) { setLatitude(other.getLatitude()); } if (other.hasLongitude()) { setLongitude(other.getLongitude()); } if (other.hasBearing()) { setBearing(other.getBearing()); } if (other.hasOdometer()) { setOdometer(other.getOdometer()); } if (other.hasSpeed()) { setSpeed(other.getSpeed()); } this.mergeExtensionFields(other); this.mergeUnknownFields(other.getUnknownFields()); return this; }