1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <!-- XSchema for MW / INAV missions
3 This file is part of INAV
4 usage e.g. xmllint --noout --schema mw-mission.xsd example.mission
5 Updated 2021-11-12 for 'meta' substitution.
7 <xs:schema xmlns:
xs=
"http://www.w3.org/2001/XMLSchema" elementFormDefault=
"qualified">
8 <xs:element name=
"mission">
11 <xs:element ref=
"version"/>
12 <xs:choice minOccurs=
"0" maxOccurs=
"unbounded">
13 <xs:element ref=
"missionitem"/>
14 <xs:element ref=
"mwp"/>
15 <xs:element ref=
"fwapproach"/>
20 <xs:element name=
"version">
22 <xs:attribute name=
"value" use=
"required"/>
25 <xs:element name=
"fwapproach">
27 <xs:attribute name=
"no" use=
"required" type=
"xs:integer"/>
28 <xs:attribute name=
"index" use=
"required" type=
"xs:integer"/>
29 <xs:attribute name=
"approachalt" use=
"required" type=
"xs:integer"/>
30 <xs:attribute name=
"landalt" use=
"required" type=
"xs:integer"/>
31 <xs:attribute name=
"landheading1" use=
"required" type=
"xs:integer"/>
32 <xs:attribute name=
"landheading2" use=
"required" type=
"xs:integer"/>
33 <xs:attribute name=
"approachdirection" use=
"required">
35 <xs:restriction base=
"xs:token">
36 <xs:enumeration value=
"left"/>
37 <xs:enumeration value=
"right"/>
41 <xs:attribute name=
"sealevelref" use=
"required" type=
"xs:boolean"/>
44 <xs:element name=
"missionitem">
46 <xs:attribute name=
"action" use=
"required">
48 <xs:restriction base=
"xs:token">
49 <xs:enumeration value=
"UNASSIGNED"/>
50 <xs:enumeration value=
"WAYPOINT"/>
51 <xs:enumeration value=
"POSHOLD_UNLIM"/>
52 <xs:enumeration value=
"POSHOLD_TIME"/>
53 <xs:enumeration value=
"RTH"/>
54 <xs:enumeration value=
"SET_POI"/>
55 <xs:enumeration value=
"JUMP"/>
56 <xs:enumeration value=
"SET_HEAD"/>
57 <xs:enumeration value=
"LAND"/>
61 <!-- no min,max as may be AMSL -->
62 <xs:attribute name=
"alt" use=
"required" type=
"xs:integer"/>
64 flag is not strictly required unless the WP is "Flyby Home"
65 or the are multiple mission segments 'multi-mission', INAV 4.0
67 <xs:attribute name=
"flag" use=
"optional" type=
"xs:integer"/>
69 Locations are decimal degrees, WGS84 (EPSG:4326)
71 <xs:attribute name=
"lat" use=
"required">
73 <xs:restriction base=
"xs:decimal">
74 <xs:minInclusive value=
"-90"/>
75 <xs:maxInclusive value=
"90"/>
79 <xs:attribute name=
"lon" use=
"required">
81 <xs:restriction base=
"xs:decimal">
82 <xs:minInclusive value=
"-180"/>
83 <xs:maxInclusive value=
"180"/>
87 <!-- not really needed, but for historic compatibility ... -->
88 <xs:attribute name=
"no" use=
"required" type=
"xs:integer"/>
89 <xs:attribute name=
"parameter1" use=
"required" type=
"xs:integer"/>
90 <xs:attribute name=
"parameter2" use=
"required" type=
"xs:integer"/>
91 <xs:attribute name=
"parameter3" use=
"required" type=
"xs:integer"/>
94 <xs:element name=
"mwp">
97 <xs:element ref=
"details" minOccurs=
"0"/>
99 <xs:attribute name=
"cx" type=
"xs:decimal"/>
100 <xs:attribute name=
"cy" type=
"xs:decimal"/>
101 <xs:attribute name=
"generator"/>
102 <xs:attribute name=
"home-x" type=
"xs:decimal"/>
103 <xs:attribute name=
"home-y" type=
"xs:decimal"/>
104 <xs:attribute name=
"save-date"/>
105 <xs:attribute name=
"zoom">
107 <xs:restriction base=
"xs:integer">
108 <xs:minInclusive value=
"0"/>
109 <xs:maxInclusive value=
"20"/>
115 <xs:element name=
"details">
118 <xs:element ref=
"distance"/>
119 <xs:sequence minOccurs=
"0">
120 <xs:element ref=
"nav-speed"/>
121 <xs:element ref=
"fly-time"/>
122 <xs:element ref=
"loiter-time"/>
127 <xs:element name=
"distance">
129 <xs:attribute name=
"units" use=
"required" type=
"xs:NCName"/>
130 <xs:attribute name=
"value" use=
"required" type=
"xs:integer"/>
133 <xs:element name=
"nav-speed">
135 <xs:attribute name=
"units" use=
"required"/>
136 <xs:attribute name=
"value" use=
"required" type=
"xs:integer"/>
139 <xs:element name=
"fly-time">
141 <xs:attribute name=
"units" use=
"required" type=
"xs:NCName"/>
142 <xs:attribute name=
"value" use=
"required" type=
"xs:integer"/>
145 <xs:element name=
"loiter-time">
147 <xs:attribute name=
"units" use=
"required" type=
"xs:NCName"/>
148 <xs:attribute name=
"value" use=
"required" type=
"xs:integer"/>
151 <xs:element name=
"meta" substitutionGroup=
"mwp"/>
152 <xs:element name=
"MISSION" substitutionGroup=
"mission"/>
153 <xs:element name=
"MISSIONITEM" substitutionGroup=
"missionitem"/>
154 <xs:element name=
"VERSION" substitutionGroup=
"version"/>