Skip to content

Commit

Permalink
Model in google earth is now rolling and pitching
Browse files Browse the repository at this point in the history
  • Loading branch information
oberion committed Sep 5, 2011
1 parent 0c6371e commit 7374d8e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions images/earth.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
Expand Down Expand Up @@ -415,9 +415,9 @@
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);

Expand Down Expand Up @@ -589,10 +589,10 @@
//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;

Expand Down

0 comments on commit 7374d8e

Please sign in to comment.