GPS-Tracking-Velo

Dependencies:   MODSERIAL SDBlockDevice GPS

Forschungsstand und Theoretische Grundlage

Die Bestandteile der Hardware, die das Projekt gebraucht wird, bestehen aus drei Komponente ein Mikrocontroller Board, eine GPS Antenne und ein SIM Modul. GPS basiert auf Satelliten, die mit codierten Radiosignalen ständig ihre aktuelle Position und genaue Uhrzeit ausstrahlen. Aus den Signallaufzeiten können eine GPS Antenne ihre eigene Position und Geschwindigkeit berechnen. Diese GPS Antenne sollte die Daten der Objektposition aus Satelliten auf dem Board gespeichert werden. Diese Daten wurden noch weiter durch eine SIM Module nach GMS Turm und dann per SMS Nachrichten an Handy gesendet. Möglicherweise können diese Daten auch an Webanwendung nach der Sendung an GMS Turm geschickt werden.

https://os.mbed.com/media/uploads/QuangAnhLe/picture1.png

Committer:
QuangAnhLe
Date:
Tue Apr 30 10:08:59 2019 +0000
Revision:
4:793221f865f6
Parent:
0:ee1ae011cba6
first commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
QuangAnhLe 0:ee1ae011cba6 1 # Obsolete
QuangAnhLe 0:ee1ae011cba6 2
QuangAnhLe 0:ee1ae011cba6 3 **The following application has superseded this repository:**
QuangAnhLe 0:ee1ae011cba6 4
QuangAnhLe 0:ee1ae011cba6 5 * [Mbed OS file system example](https://github.com/ARMmbed/mbed-os-example-filesystem)
QuangAnhLe 0:ee1ae011cba6 6
QuangAnhLe 0:ee1ae011cba6 7 # Getting started with the FAT file system on Mbed OS
QuangAnhLe 0:ee1ae011cba6 8
QuangAnhLe 0:ee1ae011cba6 9 This guide reviews the steps to get the FAT file system working on an Mbed OS platform.
QuangAnhLe 0:ee1ae011cba6 10
QuangAnhLe 0:ee1ae011cba6 11 Please install [Mbed CLI](https://os.mbed.com/docs/latest/tools/setup.html).
QuangAnhLe 0:ee1ae011cba6 12
QuangAnhLe 0:ee1ae011cba6 13 ## Hardware requirements
QuangAnhLe 0:ee1ae011cba6 14
QuangAnhLe 0:ee1ae011cba6 15 This example uses a RAM-backed FAT file system. The FAT file system requires at least 128 512-byte blocks for a total of 64KB of space. The HeapBlockDevice, which uses a target's heap for storage, backs this space. Therefore, to support this example, a target must have at least 64KB of space usable by as heap. Because there is more than just the heap in a device's RAM, this translates to the requirement that a target's RAM must be at least 96KB large.
QuangAnhLe 0:ee1ae011cba6 16
QuangAnhLe 0:ee1ae011cba6 17 ## Import the example application
QuangAnhLe 0:ee1ae011cba6 18
QuangAnhLe 0:ee1ae011cba6 19 From the command-line, import the example:
QuangAnhLe 0:ee1ae011cba6 20
QuangAnhLe 0:ee1ae011cba6 21 ```
QuangAnhLe 0:ee1ae011cba6 22 mbed import mbed-os-example-fat-filesystem
QuangAnhLe 0:ee1ae011cba6 23 cd mbed-os-example-fat-filesystem
QuangAnhLe 0:ee1ae011cba6 24 ```
QuangAnhLe 0:ee1ae011cba6 25
QuangAnhLe 0:ee1ae011cba6 26 ### Now compile
QuangAnhLe 0:ee1ae011cba6 27
QuangAnhLe 0:ee1ae011cba6 28 Invoke `mbed compile`, and specify the name of your platform and your favorite toolchain (`GCC_ARM`, `ARM`, `IAR`). For example, for the ARM Compiler 5:
QuangAnhLe 0:ee1ae011cba6 29
QuangAnhLe 0:ee1ae011cba6 30 ```
QuangAnhLe 0:ee1ae011cba6 31 mbed compile -m K64F -t ARM
QuangAnhLe 0:ee1ae011cba6 32 ```
QuangAnhLe 0:ee1ae011cba6 33
QuangAnhLe 0:ee1ae011cba6 34 Your PC may take a few minutes to compile your code. At the end, you see the following result:
QuangAnhLe 0:ee1ae011cba6 35
QuangAnhLe 0:ee1ae011cba6 36 ```
QuangAnhLe 0:ee1ae011cba6 37 [snip]
QuangAnhLe 0:ee1ae011cba6 38 +--------------------------+-------+-------+-------+
QuangAnhLe 0:ee1ae011cba6 39 | Module | .text | .data | .bss |
QuangAnhLe 0:ee1ae011cba6 40 +--------------------------+-------+-------+-------+
QuangAnhLe 0:ee1ae011cba6 41 | Fill | 164 | 0 | 2136 |
QuangAnhLe 0:ee1ae011cba6 42 | Misc | 54505 | 2556 | 754 |
QuangAnhLe 0:ee1ae011cba6 43 | drivers | 640 | 0 | 32 |
QuangAnhLe 0:ee1ae011cba6 44 | features/filesystem | 15793 | 0 | 550 |
QuangAnhLe 0:ee1ae011cba6 45 | features/storage | 42 | 0 | 184 |
QuangAnhLe 0:ee1ae011cba6 46 | hal | 418 | 0 | 8 |
QuangAnhLe 0:ee1ae011cba6 47 | platform | 2355 | 20 | 582 |
QuangAnhLe 0:ee1ae011cba6 48 | rtos | 135 | 4 | 4 |
QuangAnhLe 0:ee1ae011cba6 49 | rtos/rtx | 5861 | 20 | 6870 |
QuangAnhLe 0:ee1ae011cba6 50 | targets/TARGET_Freescale | 8382 | 12 | 384 |
QuangAnhLe 0:ee1ae011cba6 51 | Subtotals | 88295 | 2612 | 11504 |
QuangAnhLe 0:ee1ae011cba6 52 +--------------------------+-------+-------+-------+
QuangAnhLe 0:ee1ae011cba6 53 Allocated Heap: 24576 bytes
QuangAnhLe 0:ee1ae011cba6 54 Allocated Stack: unknown
QuangAnhLe 0:ee1ae011cba6 55 Total Static RAM memory (data + bss): 14116 bytes
QuangAnhLe 0:ee1ae011cba6 56 Total RAM memory (data + bss + heap + stack): 38692 bytes
QuangAnhLe 0:ee1ae011cba6 57 Total Flash memory (text + data + misc): 91947 bytes
QuangAnhLe 0:ee1ae011cba6 58
QuangAnhLe 0:ee1ae011cba6 59 Image: ./BUILD/K64F/gcc_arm/mbed-os-example-fat-filesystem.bin
QuangAnhLe 0:ee1ae011cba6 60 ```
QuangAnhLe 0:ee1ae011cba6 61
QuangAnhLe 0:ee1ae011cba6 62 ### Program your board
QuangAnhLe 0:ee1ae011cba6 63
QuangAnhLe 0:ee1ae011cba6 64 1. Connect your Mbed device to the computer over USB.
QuangAnhLe 0:ee1ae011cba6 65 1. Copy the binary file to the Mbed device.
QuangAnhLe 0:ee1ae011cba6 66 1. Press the reset button to start the program.
QuangAnhLe 0:ee1ae011cba6 67 1. Open the UART of the board in your favorite UART viewing program. For example, `screen /dev/ttyACM0`.
QuangAnhLe 0:ee1ae011cba6 68
QuangAnhLe 0:ee1ae011cba6 69 **Note:** The default serial port baud rate is 9600 bit/s.
QuangAnhLe 0:ee1ae011cba6 70
QuangAnhLe 0:ee1ae011cba6 71 You see the following output:
QuangAnhLe 0:ee1ae011cba6 72
QuangAnhLe 0:ee1ae011cba6 73 ```
QuangAnhLe 0:ee1ae011cba6 74 Welcome to the filesystem example.
QuangAnhLe 0:ee1ae011cba6 75 Formatting a FAT, RAM-backed filesystem. done.
QuangAnhLe 0:ee1ae011cba6 76 Mounting the filesystem on "/fs". done.
QuangAnhLe 0:ee1ae011cba6 77 Opening a new file, numbers.txt. done.
QuangAnhLe 0:ee1ae011cba6 78 Writing decimal numbers to a file (20/20) done.
QuangAnhLe 0:ee1ae011cba6 79 Closing file. done.
QuangAnhLe 0:ee1ae011cba6 80 Re-opening file read-only. done.
QuangAnhLe 0:ee1ae011cba6 81 Dumping file to screen.
QuangAnhLe 0:ee1ae011cba6 82 0
QuangAnhLe 0:ee1ae011cba6 83 1
QuangAnhLe 0:ee1ae011cba6 84 2
QuangAnhLe 0:ee1ae011cba6 85 3
QuangAnhLe 0:ee1ae011cba6 86 4
QuangAnhLe 0:ee1ae011cba6 87 5
QuangAnhLe 0:ee1ae011cba6 88 6
QuangAnhLe 0:ee1ae011cba6 89 7
QuangAnhLe 0:ee1ae011cba6 90 8
QuangAnhLe 0:ee1ae011cba6 91 9
QuangAnhLe 0:ee1ae011cba6 92 10
QuangAnhLe 0:ee1ae011cba6 93 11
QuangAnhLe 0:ee1ae011cba6 94 12
QuangAnhLe 0:ee1ae011cba6 95 13
QuangAnhLe 0:ee1ae011cba6 96 14
QuangAnhLe 0:ee1ae011cba6 97 15
QuangAnhLe 0:ee1ae011cba6 98 16
QuangAnhLe 0:ee1ae011cba6 99 17
QuangAnhLe 0:ee1ae011cba6 100 18
QuangAnhLe 0:ee1ae011cba6 101 19
QuangAnhLe 0:ee1ae011cba6 102 EOF.
QuangAnhLe 0:ee1ae011cba6 103 Closing file. done.
QuangAnhLe 0:ee1ae011cba6 104 Opening root directory. done.
QuangAnhLe 0:ee1ae011cba6 105 Printing all filenames:
QuangAnhLe 0:ee1ae011cba6 106 numbers.txt
QuangAnhLe 0:ee1ae011cba6 107 Closeing root directory. done.
QuangAnhLe 0:ee1ae011cba6 108 Filesystem Demo complete.
QuangAnhLe 0:ee1ae011cba6 109
QuangAnhLe 0:ee1ae011cba6 110 ```
QuangAnhLe 0:ee1ae011cba6 111
QuangAnhLe 0:ee1ae011cba6 112 ## Switch from RAM backed block device to an SD card
QuangAnhLe 0:ee1ae011cba6 113
QuangAnhLe 0:ee1ae011cba6 114 From the command-line, run the following command:
QuangAnhLe 0:ee1ae011cba6 115
QuangAnhLe 0:ee1ae011cba6 116 ```bash
QuangAnhLe 0:ee1ae011cba6 117 mbed add sd-driver
QuangAnhLe 0:ee1ae011cba6 118 ```
QuangAnhLe 0:ee1ae011cba6 119
QuangAnhLe 0:ee1ae011cba6 120 Then change the code on line 3 of `main.cpp` to import the SD card header:
QuangAnhLe 0:ee1ae011cba6 121
QuangAnhLe 0:ee1ae011cba6 122 ```C
QuangAnhLe 0:ee1ae011cba6 123 #include "SDBlockDevice.h"
QuangAnhLe 0:ee1ae011cba6 124 ```
QuangAnhLe 0:ee1ae011cba6 125
QuangAnhLe 0:ee1ae011cba6 126 Change the block device declaration on line 7 of `main.cpp` to use the SD card by replacing the `PinName`s with the pins connected to the SD card:
QuangAnhLe 0:ee1ae011cba6 127
QuangAnhLe 0:ee1ae011cba6 128 ```C
QuangAnhLe 0:ee1ae011cba6 129 SDBlockDevice bd(PinName mosi, PinName miso, PinName sclk, PinName cs);
QuangAnhLe 0:ee1ae011cba6 130 ```
QuangAnhLe 0:ee1ae011cba6 131
QuangAnhLe 0:ee1ae011cba6 132 ## Troubleshooting
QuangAnhLe 0:ee1ae011cba6 133
QuangAnhLe 0:ee1ae011cba6 134 If you have problems, you can review the [documentation](https://os.mbed.com/docs/latest/tutorials/debugging.html) for suggestions on what could be wrong and how to fix it.