Table of contents
3.Introduction
4.Specification requirements
5.Solutions suggestions
6.The magnetic fields sensors
7.The inclination measurement system
8.The gyroscope
9.The data acquisition system
10.Communication system
11.The power supply
12.Realisation of the PCB
13.The embedded system
14.Static Library Util.a
15.ViewPort
16.Xcompass
17.Sensors controller commands
18.Test
19.Future improvements
20.Conclusion
21.References
Structures
The two programs ViewPort and Xcompass
have the same structure and are composed by 3 functions:
'main()' that is the entry point of the program
and realise the main task.
The function 'usage()' return the help message
for the app describing the different commands.
'signal_handler()' catch the interrupt signal
(SIGINT, SIGQUIT and SIGKILL) from the environment and handle it to close the
program properly.
Viewport is one of the two front-end
interfaces to the card. It is a console-based program. Its main purpose is to
debug the card.
If successfully started, any character
receive by the port will be outputted to the screen. If the flow of stream
matches one of the keyword of the file HIGHLIGHT, it will be highlighted
according to the corresponding colour.
To facilitate the usage of the
navigation’ system without a graphic interface, we implemented commands
accordingly to the keys pressed on the keyboard:
Instructions
|
Functions
|
ASCII keys
|
GET_CARD
|
Return the card’s number used
|
Ctrl + a (1)
|
RESET_SYSTEM
|
Restart the system
|
Ctrl + b (2)
|
GET_OUTPUT
|
Return the value of the output requested
|
Ctrl + c (3)
|
EXIT
|
Quit the program
|
Ctrl + e (5)
|
SAVE_DATA
|
Save the data on the file chosen at the
start of the program
|
Ctrl + f (6)
|
GET_MAGNETIC_NORTH
|
Return the angle with the magnetic north
|
Ctrl + g (7)
|
GET_TILT
|
Return the inclination according to the
two axis
|
Ctrl + h (8)
|
SET_CALIBRATION
|
Calibrate the different module on the
system
|
Ctrl + i (9)
|
START_CONTINUE_MODE
|
Start the continue mode
|
Ctrl + l (12)
|
PAUSE
|
Allow to do a pause during the execution
of the program
|
Ctrl + p (16)
|
GET_ROTATION
|
Return the rotation speed given by the
gyro
|
Ctrl + r (18)
|
GET_POWER
|
Return the different reference voltage
|
Ctrl + s (19)
|
GET_TEMPERATURE
|
Return the temperature on the different
sensors
|
Ctrl + t (20)
|
GET_USAGE
|
Return the usage of the program
|
Ctrl + u (21)
|
GET_VERSION
|
Return the version of the program
|
Ctrl + v (22)
|
GET_PONG
|
Return ‘PONG’ if the system is started
|
Ctrl + x (24)
|
TEST
|
Save the different output on a file every
seconds
|
Ctrl + z (26)
|
TEST_COMPENSATION
|
Allow testing the compensation on the
different axis.
|
Ctrl + q (17)
|
NO_INSTRUCTION
|
No instruction send
|
No key pressed (-1)
|
Table 12: Viewport's instructions
Any different key pressed will be
directly sent to the port.
These different instructions are ideal to
debug the Smart Compass card.
|