Commit ec7108c8 authored by garciay's avatar garciay
Browse files

Update rotation external function

parent 75913aa9
......@@ -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_);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment