class LatLonAlt implements Serializable, SizeProvider {

    public boolean positionsCrossLongitudeBoundary(LatLonAlt p2)
    {
        if (p2 == null)
        {
            throw new IllegalArgumentException("Null Value for position");
        }

        // A segment cross the line if end pos have different longitude signs
        // and are more than 180 degress longitude apart
        if (Math.signum(getLonD()) != Math.signum(p2.getLonD()))
        {
            double delta = Math.abs(getLonD() - p2.getLonD());
            if (delta > 180 && delta < 360)
            {
                return true;
            }
        }

        return false;
    }

    private  LatLonAlt(double latitudeDegrees, double longitudeDegrees);

}