code: public Double distance3d(Position other) {
  		if (other == null || latitude == null || longitude == null || altitude == null)
  			return null;
  
  		double[] xyz1 = this.toECEF();
  		double[] xyz2 = other.toECEF();
  
  		return Math.sqrt(
  				Math.pow(xyz2[0] - xyz1[0], 2) +
  						Math.pow(xyz2[1] - xyz1[1], 2) +
  						Math.pow(xyz2[2] - xyz1[2], 2)
  		);
  	}
docs: Calculate the three-dimensional distance between this and another position.
  This method assumes that the coordinates are WGS84.
  @param other position
  @return 3d distance in meters or null if lat, lon, or alt is missing