参数 | |
空机重量 | 390g |
起飞重量(11.1V 2200mAh) | 550g |
续航时间 | 20分钟 |
载重能力 | 200g |
悬停力效率 | >10g/w |
电机 | 2206 kv1200 |
桨 | 8043 |
单个电机最大推力 | 290g |
传感器 | 型号 |
陀螺仪 | MAX21000 |
加速度计 | ADXL362 |
磁阻 | HMC5983 |
气压计 | MS5611 |
参数 | 值 |
陀螺仪ODR | 2kHz |
姿态解算更新率 | 1kHz |
控制更新率 | 1kHz |
电调控制更新率 | 1kHz |
CPU 占用率 | 50~70%* |
可扩展标记语言(英语:eXtensible Markup Language,简称: XML),是一种标记语言。标记指计算机所能理解的信息符号,通过此种标记,计算机之间可以处理包含各种信息的文章等。如何定义这些标记,既可以选择国际通用的标记语言,比如HTML,也可以使用像XML这样由相关人士自由决定的标记语言,这就是语言的可扩展性。XML是从标准通用标记语言(SGML)中简化修改出来的。它主要用到的有可扩展标记语言、可扩展样式语言(XSL)、XBRL和XPath等。[1]上面说了一堆,意思就是说,.kml 呢,实际上就是一个文本文件,里面用文本记录各种描述,比如线,颜色图形,位置等等。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | <?xml version="1.0" encoding="UTF-8"?> <kml xmlns=""> <Document> <name>Paths</name> <description> DBP V0.4 KML LOG</description> <Style id="yellowLineGreenPoly"> <LineStyle> <color>7f00ffff</color> <width>4</width> </LineStyle> <PolyStyle> <color>5f00ff00</color> </PolyStyle> </Style> <Placemark> <name>Absolute Extruded</name> <description>Deep Blue Plane V0.4 Path</description> <styleUrl>#yellowLineGreenPoly</styleUrl> <LineString> <extrude>1</extrude> <tessellate>1</tessellate> <altitudeMode>absolute</altitudeMode> <coordinates> ........ </coordinates> </LineString> </Placemark> </Document> </kml> |
1 2 3 4 5 6 7 8 9 | <Style id="yellowLineGreenPoly"> <LineStyle> <color>7f00ffff</color> <width>4</width> </LineStyle> <PolyStyle> <color>5f00ff00</color> </PolyStyle> </Style> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 | //记录kml文件 void entry_thread_kml_log(void* parameter) { int fd = -1; int size; int gps_count_bef = 1; char buf[512]; char dir[64]; unsigned int buf_offset = 0; //指示上一次写到哪里 unsigned long long file_byte_seek = 0; //指示文件长度 unsigned int head_len = 0; //文件头尾的长度 unsigned int tail_len = 0; const char file_name[] = "path.kml"; const char head[] = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" "<kml xmlns=\"\">\n" "\t<Document>\n" "<name>Paths</name>\n" "<description> DBP V0.4 KML LOG</description>\n" "<Style id=\"yellowLineGreenPoly\">\n" " <LineStyle>\n" " <color>7f00ffff</color>\n" " <width>4</width>\n" " </LineStyle>\n" " <PolyStyle>\n" " <color>5f00ff00</color>\n" " </PolyStyle>\n" "</Style>\n" "<Placemark>\n" " <name>Absolute Extruded</name>\n" " <description>Deep Blue Plane V0.4 Path</description>\n" " <styleUrl>#yellowLineGreenPoly</styleUrl> \n" " <LineString>\n" " <extrude>1</extrude>\n" " <tessellate>1</tessellate>\n" //这一句是有没有竖线 " <altitudeMode>absolute</altitudeMode>\n" " <coordinates>\n"; const char tail[] = " </coordinates>\n " " </LineString>\n" " </Placemark>\n" "</Document>\n" "</kml>\n"; //预先记录文件头尾长度 head_len = strlen(head); tail_len = strlen(tail); //复制工作区 目录 strcpy(dir, log_dir); //打开记录文件 strcat(dir, file_name); //try to open the working file while(fd < 0) { int count = 0; fd = open(dir, O_WRONLY | O_CREAT, 0); rt_thread_delay(RT_TICK_PER_SECOND); if ((count ++ )> 60) //60 seconds { rt_kprintf("kml: open file for write failed\n"); return; } } rt_kprintf("google earth file'path.kml' has been created.\n"); //写入文件头 write(fd, head, head_len); file_byte_seek += head_len; //主循环 while(1) { while(gps_count_bef >= gps.count) { rt_thread_delay(5); } gps_count_bef = gps.count; //mark for 1 second a cycle //等待直到数据有效 if(gps.flag == 0) continue; sprintf(buf,"\t\t\t\t%f,%f,%f\n", gps.lon, gps.lat, gps.altitude); //将缓存区写入文件 size = write(fd, buf, strlen(buf)); file_byte_seek += size; //记录写入长度 if(size>0) { //rt_kprintf(buf); } else { rt_kprintf("kml log: Write to file wrong!\n"); while(1) rt_thread_delay(1000); //相当于停止这个线程 } //写入文件尾 write(fd, tail, tail_len); close(fd); fd = open(dir, O_WRONLY | O_CREAT | O_APPEND, 0);//末尾重新打开 //覆盖 从文件头开始计算写入了多少有效数据,覆盖文件尾 lseek(fd, file_byte_seek, DFS_SEEK_SET); } } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | GGA Global Positioning System Fix Data 123519 Fix taken at 12:35:19 UTC 4807.038,N Latitude 48 deg 07.038' N 01131.000,E Longitude 11 deg 31.000' E 1 Fix quality: 0 = invalid 1 = GPS fix (SPS) 2 = DGPS fix 3 = PPS fix 4 = Real Time Kinematic 5 = Float RTK 6 = estimated (dead reckoning) (2.3 feature) 7 = Manual input mode 8 = Simulation mode 08 Number of satellites being tracked 0.9 Horizontal dilution of position 545.4,M Altitude, Meters, above mean sea level 46.9,M Height of geoid (mean sea level) above WGS84 ellipsoid (empty field) time in seconds since last DGPS update (empty field) DGPS station ID number *47 the checksum data, always begins with * |
1 2 | AccAdX = ADC0H; AccAdX = (AccAdX<<8) + ADCHL; |
欢迎光临 (http://www.51hei.com/bbs/) | Powered by Discuz! X3.1 |