Table of contents
6.The magnetic fields sensors
7.The inclination measurement system
9.The data acquisition system
11.The power supply
12.Realisation of the PCB
13.The embedded system
14.Static Library Util.a
17.Sensors controller commands
the second front-end program. It uses the QT library to display the different
dialog is open when the program starts. It setup the communication parameters.
The main dialog is the displayed. A graphical picture is used to indicate the
azimuth, the inclination and the angular rate. An edit box is also available to
log the state of the system and the errors.
Figure 34: Connection to the Smart Compass
Figure 35: Xcompass dialogs
The calibration could easily be done by
checking the modules that want be calibrated.
In addition, the Value dialog returns the
quick way to monitor the card measurement.
All these dialog have been realized
thanks to Qt. Qt is a cross platform user interface toolkit that supports,
apart from graphical user interfaces, also database, files, filesystems,
sockets and much more in a platform independent manner. Qt is written in C++,
but there are bindings for many other languages such as C, Python, C#, etc. It
is fully object orientated and can be considered to be event driven. Qt also
extends C++ with signals and slots using the moc, the meta object compiler.
This allows the creation of loosely coupled components that can be reused.
The signals and slots are what make the
different Qt components as reusable as they are. They provide a mechanism
through which it is possible to expose interfaces that can be freely
interconnected. For example a menu item, push button, toolbar button and any
other item can expose signal corresponding to "activated",
"clicked" or any other appropriate event. By connecting such a signal
to slots of any other items and the event automatically calls the slots.
The key advantage of the signals and
slots is that the caller does not have to know anything about the receiver and
vice versa. This makes it possible to integrate many components easily without
the component's designer having actually thought about the used configuration.
This is truly loose coupling.
In order to be able to use the signals
and slots each class has to be declared in a header file. The implementation is
best placed in a separate ui.h file. The header file is then passed through a
Qt tool known as the moc. The moc produces a cpp containing the code that makes
the signals and slots happen (and more). This way of creating object file is
used to not lose the handmade code when generating CPP and h files by UI tool.
To generate the executable, the file Xcompass.pro
can be executed by qmake (on QT_DIR/bin) to generate the make file.
Once generated, the make file will
automatically construct the dependant object and generate the binary file.