-
- void search (double frequency, double longitude_rad,
- double latitude_rad, double altitude_m);
-
- SGPropertyNode_ptr _longitude_node;
- SGPropertyNode_ptr _latitude_node;
- SGPropertyNode_ptr _altitude_node;
+ typedef struct {
+ double dt;
+ SGGeod pos;
+ SGGeod wp0_pos;
+ SGGeod wp1_pos;
+ bool waypoint_changed;
+ double speed_kt;
+ double track1_deg;
+ double track2_deg;
+ double magvar_deg;
+ double wp0_distance;
+ double wp0_course_deg;
+ double wp0_bearing_deg;
+ double wp1_distance;
+ double wp1_course_deg;
+ double wp1_bearing_deg;
+ } UpdateContext;
+
+ void search (double frequency, const SGGeod& pos);
+
+ /**
+ * reset all output properties to default / non-service values
+ */
+ void clearOutput();
+
+ void updateWithValid(UpdateContext& ctx);
+
+ void updateNearestAirport(UpdateContext& ctx);
+ void updateWaypoint0(UpdateContext& ctx);
+ void updateWaypoint1(UpdateContext& ctx);
+
+ void updateLegCourse(UpdateContext& ctx);
+ void updateWaypoint0Course(UpdateContext& ctx);
+ void updateWaypoint1Course(UpdateContext& ctx);
+
+ void waypointChanged(UpdateContext& ctx);
+ void updateTTWNode(UpdateContext& ctx, double distance_m, SGPropertyNode_ptr node);
+ void updateTrackingBug(UpdateContext& ctx);
+