From 7374d8e7981c6d68a190ac6e1d9a9a5c90cb7b9a Mon Sep 17 00:00:00 2001 From: oberion Date: Mon, 5 Sep 2011 19:54:05 +0200 Subject: [PATCH] Model in google earth is now rolling and pitching --- images/earth.html | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/images/earth.html b/images/earth.html index 363e97d22d..28828e9833 100644 --- a/images/earth.html +++ b/images/earth.html @@ -1,4 +1,4 @@ - + @@ -415,9 +415,9 @@ function createAircraft(id, type, color) planeModel.setLocation(planeLoc); planeLink = ge.createLink(''); planeOrient = ge.createOrientation(''); - planeModel.setOrientation(planeOrient); + planeModel.setOrientation(planeOrient); - planeLink.setHref('http://qgroundcontrol.org/_media/users/models/ascent-park-glider.dae'); + planeLink.setHref('http://qgroundcontrol.org/_media/users/models/ascent-park-glider.dae'); planeModel.setLink(planeLink); planeModel.setAltitudeMode (ge.ALTITUDE_ABSOLUTE); @@ -589,10 +589,10 @@ function setAircraftPositionAttitude(id, lat, lon, alt, roll, pitch, yaw) //currFollowHeading = ((yaw/M_PI)+1.0)*360.0; - // FIXME Currently invalid conversion from right-handed z-down to z-up frame - planeOrient.setRoll(((roll/M_PI))*180.0+180.0); - planeOrient.setTilt(((pitch/M_PI))*180.0+180.0); - planeOrient.setHeading(((yaw/M_PI))*180.0-90.0); + planeOrient.setRoll(((pitch / M_PI)) * 180.0); + planeOrient.setTilt(-((roll / M_PI)) * 180.0); + planeOrient.setHeading(((yaw / M_PI)) * 180.0 + 90.0); + planeModel.setOrientation(planeOrient); currFollowHeading = ((yaw/M_PI))*180.0; -- GitLab