Commit ec7108c8 authored by garciay's avatar garciay
Browse files

Update rotation external function

parent 75913aa9
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -304,8 +304,9 @@ public class ItsExternalFunctionsProvider implements IItsExternalFunctionsProvid

    	FloatValue v_rotation = _tcicdWrapper.getFloat();
        v_rotation.setFloat(p_rotation.getFloat());
        double lat = _tcicdWrapper.getInteger(p_cenLatitude) + Math.cos(v_rotation.getFloat()) * (_tcicdWrapper.getInteger(p_refLatitude) - _tcicdWrapper.getInteger(p_cenLatitude)) - Math.sin(v_rotation.getFloat()) * (_tcicdWrapper.getInteger(p_refLongitude) - _tcicdWrapper.getInteger(p_cenLongitude));
        double long_ = _tcicdWrapper.getInteger(p_cenLongitude) + Math.sin(v_rotation.getFloat()) * (_tcicdWrapper.getInteger(p_refLatitude) - _tcicdWrapper.getInteger(p_cenLatitude)) + Math.cos(v_rotation.getFloat()) * (_tcicdWrapper.getInteger(p_refLongitude) - _tcicdWrapper.getInteger(p_cenLongitude));
        // X = longitude, Y = latitude
        double long_ = _tcicdWrapper.getInteger(p_cenLongitude) + Math.cos(v_rotation.getFloat()) * (_tcicdWrapper.getInteger(p_refLongitude) - _tcicdWrapper.getInteger(p_cenLongitude)) - Math.sin(v_rotation.getFloat()) * (_tcicdWrapper.getInteger(p_refLatitude) - _tcicdWrapper.getInteger(p_cenLatitude));
        double lat = _tcicdWrapper.getInteger(p_cenLatitude) + Math.sin(v_rotation.getFloat()) * (_tcicdWrapper.getInteger(p_refLongitude) - _tcicdWrapper.getInteger(p_cenLongitude)) + Math.cos(v_rotation.getFloat()) * (_tcicdWrapper.getInteger(p_refLatitude) - _tcicdWrapper.getInteger(p_cenLatitude));
        Long rlat = Math.round(lat);
        Long rlong = Math.round(long_);