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"/>
19 <xs:element name=
"version">
21 <xs:attribute name=
"value" use=
"required"/>
24 <xs:element name=
"missionitem">
26 <xs:attribute name=
"action" use=
"required">
28 <xs:restriction base=
"xs:token">
29 <xs:enumeration value=
"UNASSIGNED"/>
30 <xs:enumeration value=
"WAYPOINT"/>
31 <xs:enumeration value=
"POSHOLD_UNLIM"/>
32 <xs:enumeration value=
"POSHOLD_TIME"/>
33 <xs:enumeration value=
"RTH"/>
34 <xs:enumeration value=
"SET_POI"/>
35 <xs:enumeration value=
"JUMP"/>
36 <xs:enumeration value=
"SET_HEAD"/>
37 <xs:enumeration value=
"LAND"/>
41 <!-- no min,max as may be AMSL -->
42 <xs:attribute name=
"alt" use=
"required" type=
"xs:integer"/>
44 flag is not strictly required unless the WP is "Flyby Home"
45 or the are multiple mission segments 'multi-mission', INAV 4.0
47 <xs:attribute name=
"flag" use=
"optional" type=
"xs:integer"/>
49 Locations are decimal degrees, WGS84 (EPSG:4326)
51 <xs:attribute name=
"lat" use=
"required">
53 <xs:restriction base=
"xs:decimal">
54 <xs:minInclusive value=
"-90"/>
55 <xs:maxInclusive value=
"90"/>
59 <xs:attribute name=
"lon" use=
"required">
61 <xs:restriction base=
"xs:decimal">
62 <xs:minInclusive value=
"-180"/>
63 <xs:maxInclusive value=
"180"/>
67 <!-- not really needed, but for historic compatibility ... -->
68 <xs:attribute name=
"no" use=
"required" type=
"xs:integer"/>
69 <xs:attribute name=
"parameter1" use=
"required" type=
"xs:integer"/>
70 <xs:attribute name=
"parameter2" use=
"required" type=
"xs:integer"/>
71 <xs:attribute name=
"parameter3" use=
"required" type=
"xs:integer"/>
74 <xs:element name=
"mwp">
77 <xs:element ref=
"details" minOccurs=
"0"/>
79 <xs:attribute name=
"cx" type=
"xs:decimal"/>
80 <xs:attribute name=
"cy" type=
"xs:decimal"/>
81 <xs:attribute name=
"generator"/>
82 <xs:attribute name=
"home-x" type=
"xs:decimal"/>
83 <xs:attribute name=
"home-y" type=
"xs:decimal"/>
84 <xs:attribute name=
"save-date"/>
85 <xs:attribute name=
"zoom">
87 <xs:restriction base=
"xs:integer">
88 <xs:minInclusive value=
"0"/>
89 <xs:maxInclusive value=
"20"/>
95 <xs:element name=
"details">
98 <xs:element ref=
"distance"/>
99 <xs:sequence minOccurs=
"0">
100 <xs:element ref=
"nav-speed"/>
101 <xs:element ref=
"fly-time"/>
102 <xs:element ref=
"loiter-time"/>
107 <xs:element name=
"distance">
109 <xs:attribute name=
"units" use=
"required" type=
"xs:NCName"/>
110 <xs:attribute name=
"value" use=
"required" type=
"xs:integer"/>
113 <xs:element name=
"nav-speed">
115 <xs:attribute name=
"units" use=
"required"/>
116 <xs:attribute name=
"value" use=
"required" type=
"xs:integer"/>
119 <xs:element name=
"fly-time">
121 <xs:attribute name=
"units" use=
"required" type=
"xs:NCName"/>
122 <xs:attribute name=
"value" use=
"required" type=
"xs:integer"/>
125 <xs:element name=
"loiter-time">
127 <xs:attribute name=
"units" use=
"required" type=
"xs:NCName"/>
128 <xs:attribute name=
"value" use=
"required" type=
"xs:integer"/>
131 <xs:element name=
"meta" substitutionGroup=
"mwp"/>
132 <xs:element name=
"MISSION" substitutionGroup=
"mission"/>
133 <xs:element name=
"MISSIONITEM" substitutionGroup=
"missionitem"/>
134 <xs:element name=
"VERSION" substitutionGroup=
"version"/>