Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

Commit

Permalink
swaped root nav ball calls to primary
Browse files Browse the repository at this point in the history
  • Loading branch information
richardbunt committed Jul 3, 2015
1 parent cd9a08f commit 3aca130
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions Telemachus/src/DataLinkHandlers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1133,15 +1133,15 @@ public NavBallDataLinkHandler(FormatterProvider formatters)
Quaternion result = updateHeadingPitchRollField(dataSources.vessel, dataSources.vessel.findWorldCenterOfMass());
return result.eulerAngles.y;
},
"n.heading", "Heading", formatters.Default, APIEntry.UnitType.DEG));
"n.heading2", "Heading", formatters.Default, APIEntry.UnitType.DEG));

registerAPI(new PlotableAPIEntry(
dataSources =>
{
Quaternion result = updateHeadingPitchRollField(dataSources.vessel, dataSources.vessel.findWorldCenterOfMass());
return (result.eulerAngles.x > 180) ? (360.0 - result.eulerAngles.x) : -result.eulerAngles.x;
},
"n.pitch", "Pitch", formatters.Default, APIEntry.UnitType.DEG));
"n.pitch2", "Pitch", formatters.Default, APIEntry.UnitType.DEG));

registerAPI(new PlotableAPIEntry(
dataSources =>
Expand All @@ -1150,47 +1150,47 @@ public NavBallDataLinkHandler(FormatterProvider formatters)
return (result.eulerAngles.z > 180) ?
(result.eulerAngles.z - 360.0) : result.eulerAngles.z;
},
"n.roll", "Roll", formatters.Default, APIEntry.UnitType.DEG));
"n.roll2", "Roll", formatters.Default, APIEntry.UnitType.DEG));

registerAPI(new PlotableAPIEntry(
dataSources =>
{
Quaternion result = updateHeadingPitchRollField(dataSources.vessel, dataSources.vessel.findWorldCenterOfMass());
return result.eulerAngles.y;
},
"n.rawheading", "Raw Heading", formatters.Default, APIEntry.UnitType.DEG));
"n.rawheading2", "Raw Heading", formatters.Default, APIEntry.UnitType.DEG));

registerAPI(new PlotableAPIEntry(
dataSources =>
{
Quaternion result = updateHeadingPitchRollField(dataSources.vessel, dataSources.vessel.findWorldCenterOfMass());
return result.eulerAngles.x;
},
"n.rawpitch", "Raw Pitch", formatters.Default, APIEntry.UnitType.DEG));
"n.rawpitch2", "Raw Pitch", formatters.Default, APIEntry.UnitType.DEG));

registerAPI(new PlotableAPIEntry(
dataSources =>
{
Quaternion result = updateHeadingPitchRollField(dataSources.vessel, dataSources.vessel.findWorldCenterOfMass());
return result.eulerAngles.z;
},
"n.rawroll", "Raw Roll", formatters.Default, APIEntry.UnitType.DEG));
"n.rawroll2", "Raw Roll", formatters.Default, APIEntry.UnitType.DEG));

registerAPI(new PlotableAPIEntry(
dataSources =>
{
Quaternion result = updateHeadingPitchRollField(dataSources.vessel, dataSources.vessel.rootPart.transform.position);
return result.eulerAngles.y;
},
"n.headingRoot", "Heading calculated using the position of the vessels root part", formatters.Default, APIEntry.UnitType.DEG));
"n.heading", "Heading calculated using the position of the vessels root part", formatters.Default, APIEntry.UnitType.DEG));

registerAPI(new PlotableAPIEntry(
dataSources =>
{
Quaternion result = updateHeadingPitchRollField(dataSources.vessel, dataSources.vessel.rootPart.transform.position);
return (result.eulerAngles.x > 180) ? (360.0 - result.eulerAngles.x) : -result.eulerAngles.x;
},
"n.pitchRoot", "Pitch calculated using the position of the vessels root part", formatters.Default, APIEntry.UnitType.DEG));
"n.pitch", "Pitch calculated using the position of the vessels root part", formatters.Default, APIEntry.UnitType.DEG));

registerAPI(new PlotableAPIEntry(
dataSources =>
Expand All @@ -1199,31 +1199,31 @@ public NavBallDataLinkHandler(FormatterProvider formatters)
return (result.eulerAngles.z > 180) ?
(result.eulerAngles.z - 360.0) : result.eulerAngles.z;
},
"n.rollRoot", "Roll calculated using the position of the vessels root part", formatters.Default, APIEntry.UnitType.DEG));
"n.roll", "Roll calculated using the position of the vessels root part", formatters.Default, APIEntry.UnitType.DEG));

registerAPI(new PlotableAPIEntry(
dataSources =>
{
Quaternion result = updateHeadingPitchRollField(dataSources.vessel, dataSources.vessel.rootPart.transform.position);
return result.eulerAngles.y;
},
"n.rawheadingRoot", "Raw Heading calculated using the position of the vessels root part", formatters.Default, APIEntry.UnitType.DEG));
"n.rawheading", "Raw Heading calculated using the position of the vessels root part", formatters.Default, APIEntry.UnitType.DEG));

registerAPI(new PlotableAPIEntry(
dataSources =>
{
Quaternion result = updateHeadingPitchRollField(dataSources.vessel, dataSources.vessel.rootPart.transform.position);
return result.eulerAngles.x;
},
"n.rawpitchRoot", "Raw Pitch calculated using the position of the vessels root part", formatters.Default, APIEntry.UnitType.DEG));
"n.rawpitch", "Raw Pitch calculated using the position of the vessels root part", formatters.Default, APIEntry.UnitType.DEG));

registerAPI(new PlotableAPIEntry(
dataSources =>
{
Quaternion result = updateHeadingPitchRollField(dataSources.vessel, dataSources.vessel.rootPart.transform.position);
return result.eulerAngles.z;
},
"n.rawrollRoot", "Raw Roll calculated using the position of the vessels root part", formatters.Default, APIEntry.UnitType.DEG));
"n.rawroll", "Raw Roll calculated using the position of the vessels root part", formatters.Default, APIEntry.UnitType.DEG));
}

#endregion
Expand Down

0 comments on commit 3aca130

Please sign in to comment.