Rev 362 | Rev 380 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 362 | Rev 378 | ||
---|---|---|---|
Line 132... | Line 132... | ||
132 | 132 | ||
Line 133... | Line 133... | ||
133 | u8 retvalue = 1; |
133 | u8 retvalue = 1; |
Line 134... | Line 134... | ||
134 | 134 | ||
135 | if(doc == NULL) return(0); |
135 | if(doc == NULL) return(0); |
136 | 136 | ||
137 | while(doc->state != GPX_DOC_CLOSED && (SD_WatchDog)) // close linestring, placemark and document before closing the file on the memorycard |
137 | while(doc->state != GPX_DOC_CLOSED) // close linestring, placemark and document before closing the file on the memorycard |
138 | { |
138 | { |
139 | switch(doc->state) |
139 | switch(doc->state) |
Line 298... | Line 298... | ||
298 | u8 u8_1, u8_2; |
298 | u8 u8_1, u8_2; |
299 | // write <trkpt> tag |
299 | // write <trkpt> tag |
300 | switch(part) |
300 | switch(part) |
301 | { |
301 | { |
302 | case 0: |
302 | case 0: |
- | 303 | DebugOut.Analog[19]++; |
|
303 | if(GPSData.Position.Latitude < 0) u8_1 = '-'; |
304 | if(GPSData.Position.Latitude < 0) u8_1 = '-'; |
304 | else u8_1 = '+'; |
305 | else u8_1 = '+'; |
305 | i32_1 = abs(GPSData.Position.Latitude)/10000000L; |
306 | i32_1 = abs(GPSData.Position.Latitude)/10000000L; |
306 | i32_2 = abs(GPSData.Position.Latitude)%10000000L; |
307 | i32_2 = abs(GPSData.Position.Latitude)%10000000L; |
307 | sprintf(string, "<trkpt lat=\"%c%ld.%07ld\" ",u8_1, i32_1, i32_2); |
308 | sprintf(string, "<trkpt lat=\"%c%ld.%07ld\" ",u8_1, i32_1, i32_2); |
Line 465... | Line 466... | ||
465 | //________________________________________________________________________________________________________________________________________ |
466 | //________________________________________________________________________________________________________________________________________ |
Line 466... | Line 467... | ||
466 | 467 | ||
467 | u8 GPX_LoggGPSCoordinates(GPX_Document_t *doc,unsigned char part) |
468 | u8 GPX_LoggGPSCoordinates(GPX_Document_t *doc,unsigned char part) |
468 | { |
469 | { |
469 | u8 retval = 0; |
470 | u8 retval = 0; |
470 | while(doc->state != GPX_DOC_TRACKSEGMENT_OPENED && (SD_WatchDog)) // automatic create document with default filename on the card. |
471 | while(doc->state != GPX_DOC_TRACKSEGMENT_OPENED) // automatic create document with default filename on the card. |
471 | { |
472 | { |
472 | switch(doc->state) |
473 | switch(doc->state) |
473 | { |
474 | { |
474 | case GPX_DOC_CLOSED: // document hasn't been opened yet therefore it will be initialized automatically |
475 | case GPX_DOC_CLOSED: // document hasn't been opened yet therefore it will be initialized automatically |