Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ITS - Intelligent Transport Systems
ITS
Commits
ec7108c8
Commit
ec7108c8
authored
Oct 21, 2016
by
garciay
Browse files
Update rotation external function
parent
75913aa9
Changes
1
Hide whitespace changes
Inline
Side-by-side
javasrc/extfunc/org/etsi/its/extfunc/ItsExternalFunctionsProvider.java
View file @
ec7108c8
...
...
@@ -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_
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment