32#include <wx/datetime.h>
39#define MAX_INT_VAL 2147483647
44#define ETA_FORMAT_STR "%x %H:%M"
75 RoutePoint(
double lat,
double lon,
const wxString &icon_ident,
76 const wxString &name,
const wxString &pGUID = wxEmptyString,
77 bool bAddToList =
true);
92 void SetPosition(
double lat,
double lon);
93 double GetLatitude() {
return m_lat; };
94 double GetLongitude() {
return m_lon; };
95 LLBBox &GetBBox() {
return m_wpBBox; }
103 bool IsShared() {
return m_bsharedMark; }
104 void SetShared(
bool bshared) { m_bsharedMark = bshared; }
106 bool IsSharedInVisibleRoute(
void);
108 bool IsVisibleSelectable(
double scale_val,
bool boverrideViz =
false);
109 void SetVisible(
bool viz =
true) {
m_bIsVisible = viz; }
110 void SetListed(
bool viz =
true) {
m_bIsListed = viz; }
111 void SetNameShown(
bool viz =
true) {
m_bShowName = viz; }
113 virtual wxString GetName(
void) {
return m_MarkName; }
121 wxString GetIconName(
void) {
return m_IconName; }
122 void SetIconName(wxString name) { m_IconName = name; }
124 void *GetSelectNode(
void) {
return m_SelectNode; }
125 void SetSelectNode(
void *node) { m_SelectNode = node; }
127 void *GetManagerListNode(
void) {
return m_ManagerNode; }
128 void SetManagerListNode(
void *node) { m_ManagerNode = node; }
130 void SetName(
const wxString &name);
131 void CalculateNameExtents(
void);
138 void SetWaypointArrivalRadius(
double dArrivalDistance) {
141 void SetWaypointArrivalRadius(wxString wxArrivalDistance) {
144 double GetWaypointArrivalRadius();
146 int GetWaypointRangeRingsNumber(
void);
147 float GetWaypointRangeRingsStep(
void);
148 int GetWaypointRangeRingsStepUnits(
void);
149 void SetShowWaypointRangeRings(
bool b_showWaypointRangeRings) {
152 void SetWaypointRangeRingsNumber(
int i_WaypointRangeRingsNumber) {
155 void SetWaypointRangeRingsStep(
float f_WaypointRangeRingsStep) {
158 void SetWaypointRangeRingsStepUnits(
int i_WaypointRangeRingsStepUnits) {
161 void SetWaypointRangeRingsColour(wxColour wxc_WaypointRangeRingsColour) {
164 void SetTideStation(wxString TideStation) {
m_TideStation = TideStation; };
165 void SetScaMin(wxString str);
166 void SetScaMin(
long val);
167 long GetScaMin() {
return m_ScaMin; };
168 void SetScaMax(wxString str);
169 void SetScaMax(
long val);
170 long GetScaMax() {
return m_ScaMax; };
171 bool GetUseSca() {
return b_UseScamin; };
172 void SetUseSca(
bool value) { b_UseScamin = value; };
173 bool IsDragHandleEnabled() {
return m_bDrawDragHandle; }
174 void SetPlannedSpeed(
double spd);
227 void SetETD(
const wxDateTime &etd);
247 bool SetETD(
const wxString &ts);
285 void SetETE(wxLongLong secs);
527 double m_wpBBox_view_scale_ppm, m_wpBBox_rotation;
567 float m_IconScaleFactor;
568 wxBitmap m_ScaledBMP;
570 bool m_bDrawDragHandle;
572 int m_drag_line_length_man, m_drag_icon_offset;
573 double m_dragHandleLat, m_dragHandleLon;
574 int m_draggingOffsetx, m_draggingOffsety;
603 double m_PlannedSpeed;
610 unsigned int m_dragIconTexture;
611 int m_dragIconTextureWidth, m_dragIconTextureHeight;
614using RoutePointList = std::vector<RoutePoint *>;
Represents a waypoint or mark within the navigation system.
HyperlinkList * m_HyperlinkList
List of hyperlinks associated with this waypoint.
wxColour m_wxcWaypointRangeRingsColour
Color for the range rings display.
wxString m_MarkDescription
Description text for the waypoint.
LLBBox m_wpBBox
Bounding box for the waypoint.
int m_iWaypointRangeRingsNumber
Number of range rings to display around the waypoint.
int m_NameLocationOffsetX
Horizontal offset for waypoint name placement relative to the icon.
void SetCreateTime(wxDateTime dt)
Sets the create time of this RoutePoint in UTC.
static std::function< void(unsigned, const unsigned *)> delete_gl_textures
Horrible Hack (tm).
bool m_bRPIsBeingEdited
Flag indicating if this waypoint is currently being edited.
wxRect CurrentRect_in_DC
Current rectangle occupied by the waypoint in the display.
unsigned int m_iTextTexture
Texture identifier for rendered text.
wxString m_GUID
Globally Unique Identifier for the waypoint.
wxDateTime GetETD()
Retrieves the Estimated Time of Departure for this waypoint, in UTC.
wxDateTime m_CreateTimeX
Creation timestamp for the waypoint, in UTC.
int m_NameLocationOffsetY
Vertical offset for waypoint name placement relative to the icon.
bool m_bIsolatedMark
Flag indicating if the waypoint is a standalone mark.
double m_routeprop_distance
Distance from this waypoint to the next waypoint, in nautical miles.
bool m_bShowNameData
Flag indicating if waypoint data should be shown with the name.
bool m_pos_on_screen
Flag indicating if the waypoint is currently visible on screen.
bool m_bIsActive
Flag indicating if this waypoint is active for navigation.
wxDateTime GetManualETD()
Retrieves the manually set Estimated Time of Departure for this waypoint, in UTC.
int m_iTextTextureHeight
Height of the text texture in pixels.
wxDateTime m_seg_etd
Estimated Time of Departure from this waypoint, in UTC.
bool m_bIsInRoute
Flag indicating if this waypoint is part of a route.
bool m_IconIsDirty
Flag indicating if the waypoint icon needs to be reloaded or redrawn.
wxFont * m_pMarkFont
Font used for rendering the waypoint name.
double m_routeprop_course
Course from this waypoint to the next waypoint, in degrees.
double m_seg_len
Length of the leg from previous waypoint to this waypoint in nautical miles.
bool m_bShowName
Flag indicating if the waypoint name should be shown.
wxString GetETE()
Retrieves the Estimated Time En route as a formatted string.
wxString m_timestring
String representation of the waypoint creation time.
bool m_bBlink
Flag indicating if the waypoint should blink when displayed.
double GetPlannedSpeed()
Return the planned speed associated with this waypoint.
bool m_bPtIsSelected
Flag indicating if this waypoint is currently selected.
bool m_bIsVisible
Flag indicating if the waypoint should be drawn on the chart.
bool m_bIsInLayer
Flag indicating if the waypoint belongs to a layer.
double m_WaypointArrivalRadius
Arrival radius in nautical miles.
int m_iTextTextureWidth
Width of the text texture in pixels.
bool m_btemp
Flag indicating if this is a temporary waypoint.
bool m_manual_etd
Flag indicating whether the ETD has been manually set by the user.
wxColour m_FontColor
Color used for rendering the waypoint name.
double m_seg_vmg
Planned speed for traveling FROM this waypoint TO the next waypoint.
wxSize m_NameExtents
Size of the waypoint name text when rendered.
wxDateTime m_seg_eta
Estimated Time of Arrival at this waypoint, in UTC.
int m_LayerID
Layer identifier if the waypoint belongs to a layer.
int m_iWaypointRangeRingsStepUnits
Units for the range rings step (0=nm, 1=km).
wxDateTime GetCreateTime(void)
Returns the Create Time of this RoutePoint in UTC.
float m_fWaypointRangeRingsStep
Distance between consecutive range rings.
wxLongLong m_seg_ete
Estimated Time Enroute for the leg leading to this waypoint.
wxPoint2DDouble m_screen_pos
Cached screen position of the waypoint for drawing arrows and points.
wxString m_TideStation
Associated tide station identifier.
bool m_bShowWaypointRangeRings
Flag indicating if range rings should be shown around the waypoint.
void SetETD(const wxDateTime &etd)
Sets the Estimated Time of Departure for this waypoint, in UTC.
wxDateTime GetETA()
Retrieves the Estimated Time of Arrival for this waypoint, in UTC.
bool m_bIsListed
Flag indicating if the waypoint should appear in the Route Manager dialog's waypoint list.
Generic hyperlink data type.
wxColour g_colourWaypointRangeRingsColour
Global instance.
int g_LayerIdx
Global instance.
wxRect g_blink_rect
Global instance.