    @Test
    public void testCenterOfVessel() {

        Position p;

        p = FreeFlowAnalysis.centerOfVessel(Position.create(56, 12), 0f, 0, 0, 0, 0);
        assertEquals(56f, p.getLatitude(), 1e-16);
        assertEquals(12f, p.getLongitude(), 1e-16);

        p = FreeFlowAnalysis.centerOfVessel(Position.create(56, 12), 0f, 50, 50, 10, 10);
        assertEquals(56.000000f, p.getLatitude(), 1e-6);
        assertEquals(12.000000f, p.getLongitude(), 1e-6);

        p = FreeFlowAnalysis.centerOfVessel(Position.create(56, 12), 90f, 50, 50, 10, 10);
        assertEquals(56.000000f, p.getLatitude(), 1e-6);
        assertEquals(12.000000f, p.getLongitude(), 1e-6);

        p = FreeFlowAnalysis.centerOfVessel(Position.create(56, 12), 180f, 50, 50, 10, 10);
        assertEquals(56.000000f, p.getLatitude(), 1e-6);
        assertEquals(12.000000f, p.getLongitude(), 1e-6);

        p = FreeFlowAnalysis.centerOfVessel(Position.create(56, 12), 0f, 25, 75, 10, 10);
        assertEquals(56.000225f, p.getLatitude(), 1e-6);
        assertEquals(12.000000f, p.getLongitude(), 1e-6);

        p = FreeFlowAnalysis.centerOfVessel(Position.create(56, 12), 0f, 75, 25, 10, 10);
        assertEquals(55.999774f, p.getLatitude(), 1e-6);
        assertEquals(12.000000f, p.getLongitude(), 1e-6);

        p = FreeFlowAnalysis.centerOfVessel(Position.create(56, 12), 0f, 50, 50, 5, 15);
        assertEquals(56.000000f, p.getLatitude(), 1e-6);
        assertEquals(12.000081f, p.getLongitude(), 1e-6);

        p = FreeFlowAnalysis.centerOfVessel(Position.create(56, 12), 0f, 50, 50, 15, 5);
        assertEquals(56.000000f, p.getLatitude(), 1e-6);
        assertEquals(11.999919f, p.getLongitude(), 1e-6);
    }