- void setCommand(const char* aCmd);
- const char* getCommand() const { return ""; }
-
- const char* getMode() const { return _mode.c_str(); }
-
- bool getScratchValid() const { return _scratchValid; }
- double getScratchDistance() const;
- double getScratchMagBearing() const;
- double getScratchTrueBearing() const;
- bool getScratchHasNext() const { return _searchHasNext; }
-
- double getSelectedCourse() const { return _selectedCourse; }
- double getCDIDeflection() const;
-
- double getLegDistance() const;
- double getLegCourse() const;
- double getLegMagCourse() const;
- double getAltDistanceRatio() const;
-
- double getTrueTrack() const { return _last_true_track; }
- double getMagTrack() const;
- double getGroundspeedKts() const { return _last_speed_kts; }
- double getVerticalSpeed() const { return _last_vertical_speed; }
-
- //bool getLegMode() const { return _mode == "leg"; }
- //bool getObsMode() const { return _mode == "obs"; }
-
- const char* getWP0Ident() const;
- const char* getWP0Name() const;
-
- const char* getWP1Ident() const;
- const char* getWP1Name() const;
-
- double getWP1Distance() const;
- double getWP1TTW() const;
- const char* getWP1TTWString() const;
- double getWP1Bearing() const;
- double getWP1MagBearing() const;
- double getWP1CourseDeviation() const;
- double getWP1CourseErrorNm() const;
- bool getWP1ToFlag() const;
- bool getWP1FromFlag() const;
-
- // true-bearing-error and mag-bearing-error
-
-
+ void setCommand(const char* aCmd);
+ const char* getCommand() const { return ""; }
+
+ const char* getMode() const { return _mode.c_str(); }
+
+ bool getScratchValid() const { return _scratchValid; }
+ double getScratchDistance() const;
+ double getScratchMagBearing() const;
+ double getScratchTrueBearing() const;
+ bool getScratchHasNext() const;
+
+ double getSelectedCourse() const { return _selectedCourse; }
+ void setSelectedCourse(double crs);
+ double getDesiredCourse() const { return _desiredCourse; }
+
+ double getCDIDeflection() const;
+
+ double getLegDistance() const;
+ double getLegCourse() const;
+ double getLegMagCourse() const;
+
+ double getTrueTrack() const { return _last_true_track; }
+ double getMagTrack() const;
+ double getGroundspeedKts() const { return _last_speed_kts; }
+ double getVerticalSpeed() const { return _last_vertical_speed; }
+
+ //bool getLegMode() const { return _mode == "leg"; }
+ //bool getObsMode() const { return _mode == "obs"; }
+
+ const char* getWP0Ident() const;
+ const char* getWP0Name() const;
+
+ const char* getWP1Ident() const;
+ const char* getWP1Name() const;
+
+ double getWP1Distance() const;
+ double getWP1TTW() const;
+ const char* getWP1TTWString() const;
+ double getWP1Bearing() const;
+ double getWP1MagBearing() const;
+ double getWP1CourseDeviation() const;
+ double getWP1CourseErrorNm() const;
+ bool getWP1ToFlag() const;
+ bool getWP1FromFlag() const;
+
+ // true-bearing-error and mag-bearing-error
+
+
+ /**
+ * Tied-properties helper, record nodes which are tied for easy un-tie-ing
+ */
+ template <typename T>
+ void tie(SGPropertyNode* aNode, const char* aRelPath, const SGRawValue<T>& aRawValue)
+ {
+ _tiedProperties.Tie(aNode->getNode(aRelPath, true), aRawValue);
+ }
+
+ /** helper, tie the lat/lon/elev of a SGGeod to the named children of aNode */
+ void tieSGGeod(SGPropertyNode* aNode, SGGeod& aRef,
+ const char* lonStr, const char* latStr, const char* altStr);