code: public Position getLocalPosition(Position ref) {
  		if (!horizontal_position_available)
  			return null;
  
  		// latitude zone size
  		double Dlat = isOddFormat() ? 360.0 / 59.0 : 360.0 / 60.0;
  
  		// latitude zone index
  		double j = Math.floor(ref.getLatitude() / Dlat) + Math.floor(
  				0.5 + mod(ref.getLatitude(), Dlat) / Dlat - ((double) getCPREncodedLatitude()) / ((double) (1 << 17)));
  
  		// decoded position latitude
  		double Rlat = Dlat * (j + ((double) getCPREncodedLatitude()) / ((double) (1 << 17)));
  
  		// longitude zone size
  		double Dlon = 360.0 / Math.max(1.0, NL(Rlat) - (isOddFormat() ? 1.0 : 0.0));
  
  		// longitude zone coordinate
  		double m = Math.floor(ref.getLongitude() / Dlon) + Math.floor(0.5 + mod(ref.getLongitude(), Dlon) / Dlon
  				- ((double) getCPREncodedLongitude()) / ((double) (1 << 17)));
  
  		// and finally the longitude
  		double Rlon = Dlon * (m + ((double) getCPREncodedLongitude()) / ((double) (1 << 17)));
  
  		Integer alt = this.getAltitude();
  		return new Position(Rlon, Rlat, alt != null ? alt.doubleValue() : null);
  	}
docs: This method uses a locally unambiguous decoding for airborne position messages. It
  uses a reference position known to be within 180NM (= 333.36km) of the true target
  airborne position. the reference point may be a previously tracked position that has
  been confirmed by global decoding (see getGlobalPosition()).
  @param ref reference position
  @return decoded position. The positional
  accuracy maintained by the Airborne CPR encoding will be approximately 5.1 meters.
  Result will be null if message does not contain horizontal position information.
  This can also be checked with {@link #hasPosition()}.