AOCODARCF7MINI_V1: DSHOT_DMAR and V1 output order
[inav.git] / docs / development / wp_mission_schema / mw-mission.xsd
blob2ca411e7662c41c1747fbf9acfbecd519edcf6c9
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.
6 -->
7 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
8 <xs:element name="mission">
9 <xs:complexType>
10 <xs:sequence>
11 <xs:element ref="version"/>
12 <xs:choice minOccurs="0" maxOccurs="unbounded">
13 <xs:element ref="missionitem"/>
14 <xs:element ref="mwp"/>
15 </xs:choice>
16 </xs:sequence>
17 </xs:complexType>
18 </xs:element>
19 <xs:element name="version">
20 <xs:complexType>
21 <xs:attribute name="value" use="required"/>
22 </xs:complexType>
23 </xs:element>
24 <xs:element name="missionitem">
25 <xs:complexType>
26 <xs:attribute name="action" use="required">
27 <xs:simpleType>
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"/>
38 </xs:restriction>
39 </xs:simpleType>
40 </xs:attribute>
41 <!-- no min,max as may be AMSL -->
42 <xs:attribute name="alt" use="required" type="xs:integer"/>
43 <!--
44 flag is not strictly required unless the WP is "Flyby Home"
45 or the are multiple mission segments 'multi-mission', INAV 4.0
46 -->
47 <xs:attribute name="flag" use="optional" type="xs:integer"/>
48 <!--
49 Locations are decimal degrees, WGS84 (EPSG:4326)
50 -->
51 <xs:attribute name="lat" use="required">
52 <xs:simpleType>
53 <xs:restriction base="xs:decimal">
54 <xs:minInclusive value="-90"/>
55 <xs:maxInclusive value="90"/>
56 </xs:restriction>
57 </xs:simpleType>
58 </xs:attribute>
59 <xs:attribute name="lon" use="required">
60 <xs:simpleType>
61 <xs:restriction base="xs:decimal">
62 <xs:minInclusive value="-180"/>
63 <xs:maxInclusive value="180"/>
64 </xs:restriction>
65 </xs:simpleType>
66 </xs:attribute>
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"/>
72 </xs:complexType>
73 </xs:element>
74 <xs:element name="mwp">
75 <xs:complexType>
76 <xs:sequence>
77 <xs:element ref="details" minOccurs="0"/>
78 </xs:sequence>
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">
86 <xs:simpleType>
87 <xs:restriction base="xs:integer">
88 <xs:minInclusive value="0"/>
89 <xs:maxInclusive value="20"/>
90 </xs:restriction>
91 </xs:simpleType>
92 </xs:attribute>
93 </xs:complexType>
94 </xs:element>
95 <xs:element name="details">
96 <xs:complexType>
97 <xs:sequence>
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"/>
103 </xs:sequence>
104 </xs:sequence>
105 </xs:complexType>
106 </xs:element>
107 <xs:element name="distance">
108 <xs:complexType>
109 <xs:attribute name="units" use="required" type="xs:NCName"/>
110 <xs:attribute name="value" use="required" type="xs:integer"/>
111 </xs:complexType>
112 </xs:element>
113 <xs:element name="nav-speed">
114 <xs:complexType>
115 <xs:attribute name="units" use="required"/>
116 <xs:attribute name="value" use="required" type="xs:integer"/>
117 </xs:complexType>
118 </xs:element>
119 <xs:element name="fly-time">
120 <xs:complexType>
121 <xs:attribute name="units" use="required" type="xs:NCName"/>
122 <xs:attribute name="value" use="required" type="xs:integer"/>
123 </xs:complexType>
124 </xs:element>
125 <xs:element name="loiter-time">
126 <xs:complexType>
127 <xs:attribute name="units" use="required" type="xs:NCName"/>
128 <xs:attribute name="value" use="required" type="xs:integer"/>
129 </xs:complexType>
130 </xs:element>
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"/>
135 </xs:schema>