Rev 434 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 434 | Rev 436 | ||
---|---|---|---|
1 | // all constant strings are within the flash to save space in the sram |
1 | // all constant strings are within the flash to save space in the sram |
2 | #include <avr/pgmspace.h> |
2 | #include <avr/pgmspace.h> |
3 | 3 | ||
4 | //________________________________________________________________________________________________________________________________________ |
4 | //________________________________________________________________________________________________________________________________________ |
5 | // |
5 | // |
6 | // Definition of KML header and footer elements for documents, placemarks and linestrings |
6 | // Definition of KML header and footer elements for documents, placemarks and linestrings |
7 | // |
7 | // |
8 | //________________________________________________________________________________________________________________________________________ |
8 | //________________________________________________________________________________________________________________________________________ |
9 | const prog_char KML_DOCUMENT_HEADER[] = |
9 | const prog_char KML_DOCUMENT_HEADER[] = |
10 | { |
10 | { |
11 | "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n" |
11 | "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n" |
12 | "<kml xmlns=\"http://earth.google.com/kml/2.2\">\r\n" |
12 | "<kml xmlns=\"http://earth.google.com/kml/2.2\">\r\n" |
13 | "<Document>\r\n" |
13 | "<Document>\r\n" |
14 | "<name>Mikrokopter GPS logging</name>\r\n" |
14 | "<name>Mikrokopter GPS logging</name>\r\n" |
15 | "\r\n" |
15 | "\r\n" |
16 | "<Style id=\"MK_gps-style\">\r\n" |
16 | "<Style id=\"FM_gps-style\">\r\n" |
17 | "<LineStyle>\r\n" |
17 | "<LineStyle>\r\n" |
18 | "<color>ff0000ff</color>\r\n" |
18 | "<color>ff00ff00</color>\r\n" |
19 | "<width>2</width>\r\n" |
19 | "<width>2</width>\r\n" |
20 | "</LineStyle>\r\n" |
20 | "</LineStyle>\r\n" |
21 | "</Style>\r\n" |
21 | "</Style>\r\n" |
22 | }; |
22 | }; |
23 | 23 | ||
24 | //________________________________________________________________________________________________________________________________________ |
24 | //________________________________________________________________________________________________________________________________________ |
25 | // |
25 | // |
26 | // footer of an KML- file. |
26 | // footer of an KML- file. |
27 | // |
27 | // |
28 | //________________________________________________________________________________________________________________________________________ |
28 | //________________________________________________________________________________________________________________________________________ |
29 | const prog_char KML_DOCUMENT_FOOTER[] = |
29 | const prog_char KML_DOCUMENT_FOOTER[] = |
30 | { |
30 | { |
31 | "</Document>\r\n" |
31 | "</Document>\r\n" |
32 | "</kml>\r\n" |
32 | "</kml>\r\n" |
33 | }; |
33 | }; |
34 | 34 | ||
35 | //________________________________________________________________________________________________________________________________________ |
35 | //________________________________________________________________________________________________________________________________________ |
36 | // |
36 | // |
37 | // Header of an placemark |
37 | // Header of an placemark |
38 | // |
38 | // |
39 | //________________________________________________________________________________________________________________________________________ |
39 | //________________________________________________________________________________________________________________________________________ |
40 | const prog_char KML_PLACEMARK_HEADER[] = |
40 | const prog_char KML_PLACEMARK_HEADER[] = |
41 | { |
41 | { |
42 | "<Placemark>\r\n" |
42 | "<Placemark>\r\n" |
43 | "<name>Flight</name>\r\n" |
43 | "<name>FollowMe</name>\r\n" |
44 | "<styleUrl>#MK_gps-style</styleUrl>\r\n" |
44 | "<styleUrl>#FM_gps-style</styleUrl>\r\n" |
45 | }; |
45 | }; |
46 | 46 | ||
47 | //________________________________________________________________________________________________________________________________________ |
47 | //________________________________________________________________________________________________________________________________________ |
48 | // |
48 | // |
49 | // Footer of an placemark |
49 | // Footer of an placemark |
50 | // |
50 | // |
51 | //________________________________________________________________________________________________________________________________________ |
51 | //________________________________________________________________________________________________________________________________________ |
52 | const prog_char KML_PLACEMARK_FOOTER[] = |
52 | const prog_char KML_PLACEMARK_FOOTER[] = |
53 | { |
53 | { |
54 | "</Placemark>\r\n" |
54 | "</Placemark>\r\n" |
55 | }; |
55 | }; |
56 | 56 | ||
57 | 57 | ||
58 | //________________________________________________________________________________________________________________________________________ |
58 | //________________________________________________________________________________________________________________________________________ |
59 | // |
59 | // |
60 | // Header of an linestring |
60 | // Header of an linestring |
61 | // |
61 | // |
62 | //________________________________________________________________________________________________________________________________________ |
62 | //________________________________________________________________________________________________________________________________________ |
63 | const prog_char KML_LINESTRING_HEADER[] = |
63 | const prog_char KML_LINESTRING_HEADER[] = |
64 | { |
64 | { |
65 | "<LineString>\r\n" |
65 | "<LineString>\r\n" |
66 | "<tessellate>1</tessellate>\r\n" |
66 | "<tessellate>1</tessellate>\r\n" |
67 | "<altitudeMode>relativeToGround</altitudeMode>\r\n" // also possible "absolute" |
67 | "<altitudeMode>relativeToGround</altitudeMode>\r\n" // also possible "absolute" |
68 | "<coordinates>\r\n" |
68 | "<coordinates>\r\n" |
69 | }; |
69 | }; |
70 | 70 | ||
71 | //________________________________________________________________________________________________________________________________________ |
71 | //________________________________________________________________________________________________________________________________________ |
72 | // |
72 | // |
73 | // Footer of an linestring |
73 | // Footer of an linestring |
74 | // |
74 | // |
75 | //________________________________________________________________________________________________________________________________________ |
75 | //________________________________________________________________________________________________________________________________________ |
76 | const prog_char KML_LINESTRING_FOOTER[] = |
76 | const prog_char KML_LINESTRING_FOOTER[] = |
77 | { |
77 | { |
78 | "\r\n</coordinates>" |
78 | "\r\n</coordinates>" |
79 | "\r\n</LineString>\r\n" |
79 | "\r\n</LineString>\r\n" |
80 | }; |
80 | }; |
81 | 81 | ||
82 | 82 |