Examples of Measurement


Examples of org.osgi.util.measurement.Measurement

      // Check if we have to move to other side of the earth
      if (dlat > LAT_RANGE || dlat < -LAT_RANGE) {
        dlon = normalize(dlon - LON_RANGE, LON_RANGE);
        dlat = normalize((LAT_RANGE * 2.0D) - dlat, LAT_RANGE);
      }
      lon = new Measurement(dlon, lon.getError(), lon.getUnit(), lon
          .getTime());
      lat = new Measurement(dlat, lat.getError(), lat.getUnit(), lat
          .getTime());
    }

    /*
     * Normalize track to be a value such that: 0 <= value < +2PI. This
     * corresponds to 0 deg to +360 deg. 0 is North, 0.5PI is East, PI is
     * South, 1.5PI is West
     */
    normalizeTrack: {
      if (track == null) {
        break normalizeTrack;
      }
      double dtrack = track.getValue();
      if ((0.0D <= dtrack) && (dtrack < TRACK_RANGE)) {
        break normalizeTrack; /* value is already normalized */
      }
      dtrack %= TRACK_RANGE;
      if (dtrack < 0.0D) {
        dtrack += TRACK_RANGE;
      }
      track = new Measurement(dtrack, track.getError(), track.getUnit(),
          track.getTime());
    }

    this.latitude = lat;
    this.longitude = lon;
View Full Code Here

Examples of org.osgi.util.measurement.Measurement

    // Check if we have to move to other side of the earth
    if (dlat > LAT_RANGE || dlat < -LAT_RANGE) {
      dlon = normalize(dlon - LON_RANGE, LON_RANGE);
      dlat = normalize((LAT_RANGE * 2.0D) - dlat, LAT_RANGE);
    }
    longitude = new Measurement(dlon, longitude.getError(), longitude
        .getUnit(), longitude.getTime());
    latitude = new Measurement(dlat, latitude.getError(), latitude
        .getUnit(), latitude.getTime());
  }
View Full Code Here

Examples of org.osgi.util.measurement.Measurement

    }
    value %= TRACK_RANGE;
    if (value < 0.0D) {
      value += TRACK_RANGE;
    }
    return new Measurement(value, track.getError(), track.getUnit(), track
        .getTime());
  }
View Full Code Here

Examples of org.osgi.util.measurement.Measurement

      // Check if we have to move to other side of the earth
      if (dlat > LAT_RANGE || dlat < -LAT_RANGE) {
        dlon = normalize(dlon - LON_RANGE, LON_RANGE);
        dlat = normalize((LAT_RANGE * 2.0D) - dlat, LAT_RANGE);
      }
      lon = new Measurement(dlon, lon.getError(), lon.getUnit(), lon
          .getTime());
      lat = new Measurement(dlat, lat.getError(), lat.getUnit(), lat
          .getTime());
    }

    /*
     * Normalize track to be a value such that: 0 <= value < +2PI. This
     * corresponds to 0 deg to +360 deg. 0 is North, 0.5PI is East, PI is
     * South, 1.5PI is West
     */
    normalizeTrack: {
      if (track == null) {
        break normalizeTrack;
      }
      double dtrack = track.getValue();
      if ((0.0D <= dtrack) && (dtrack < TRACK_RANGE)) {
        break normalizeTrack; /* value is already normalized */
      }
      dtrack %= TRACK_RANGE;
      if (dtrack < 0.0D) {
        dtrack += TRACK_RANGE;
      }
      track = new Measurement(dtrack, track.getError(), track.getUnit(),
          track.getTime());
    }

    this.latitude = lat;
    this.longitude = lon;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.