void Visit(LineSectorZone& oz) { fixed line_length = Units::ToSysDistance(GetFormValueFixed(*wf, _T("prpOZLineLength"))); if (fabs(line_length - oz.getLength()) > fixed(49)) { oz.setLength(line_length); task_modified = true; } }
ObservationZonePoint* Serialiser::deserialise_oz(const Waypoint& wp, const bool is_turnpoint) { tstring type; if (!m_node.get_attribute(_T("type"),type)) { assert(1); return NULL; } if (_tcscmp(type.c_str(), _T("Line")) == 0) { LineSectorZone *ls = new LineSectorZone(wp.Location); fixed length; if (m_node.get_attribute(_T("length"), length)) { ls->setLength(length); } return ls; } else if (_tcscmp(type.c_str(), _T("Cylinder")) == 0) { CylinderZone *ls = new CylinderZone(wp.Location); fixed radius; if (m_node.get_attribute(_T("radius"), radius)) { ls->setRadius(radius); } return ls; } else if (_tcscmp(type.c_str(), _T("Sector")) == 0) { SectorZone *ls = new SectorZone(wp.Location); fixed radius; Angle start, end; if (m_node.get_attribute(_T("radius"), radius)) { ls->setRadius(radius); } if (m_node.get_attribute(_T("start_radial"), start)) { ls->setStartRadial(start); } if (m_node.get_attribute(_T("end_radial"), end)) { ls->setEndRadial(end); } return ls; } else if (_tcscmp(type.c_str(), _T("FAISector")) == 0) { return new FAISectorZone(wp.Location, is_turnpoint); } else if (_tcscmp(type.c_str(), _T("Keyhole")) == 0) { return new KeyholeZone(wp.Location); } else if (_tcscmp(type.c_str(), _T("BGAFixedCourse")) == 0) { return new BGAFixedCourseZone(wp.Location); } else if (_tcscmp(type.c_str(), _T("BGAEnhancedOption")) == 0) { return new BGAEnhancedOptionZone(wp.Location); } assert(1); return NULL; }
virtual void Visit(LineSectorZone& tp) { // length tp.setLength(fixed(1000)); }