Emulator data from GNSS receiver NMEA
Introduction
I had the need to test an application that uses the GNSS data NMEA. was Due to the fact that worked on the project navigation of the aircraft, test the air expensive naturally on earth to drive a car with a GNSS receiver is not particularly convenient, that like sitting at the table to have a virtual parallel port data Protocol NMEA allegedly moving equipment. First, search for different software had to try and find something suitable, but most paid and control of the emulation data is not very convenient, although practically emulate all settings of the NMEA standard. But I needed something simple emulating coordinates, speed, in principle, nothing more was required quite convenient and logical control. So I had to write an app of this kind in C#.
Fly_nmea
NMEA ("National Marine Electronics Association") — the full name is "NMEA 0183" is a text communication Protocol, marine (typically navigation) equipment together.
Data is transmitted in the form of proposals. The format is as follows:
$AAAAA[, <data> ]*hh, where:
$ — a symbol of the beginning of a sentence (code 24h);
AAAAA Five-character address (name) of the proposal;
[, <data> ] — list of data fields separated by commas (code 2Сһ);
* — a sign of the checksum (code 2Ah);
hh is the checksum.
Example sentences:
GGA Data determining the location by GPS
Time, place and data relevant to the observation.
$GPGGA,hhmmss.sss,llll.ll,a,yyyy.yy,a,x,xx,x.x,x.x,M,x.x,M,x.x,xxx*hh
I wanted to emulate four lines:
the
-
the
- GLL Coordinates the
- GSV – satellites Visible the
- RMC – Recommended minimum data sets for GPS and GLONASS the
- GSA – the precision deterioration Factor to be used for navigation satellites
Emulation is organized in the following order:
the
-
the
- we set initial coordinates in the system WGS-84 the
- then go to a flat projection, for example Mercator(coordinate transformation used an existing library in C# GeoUtility.dll) the
- knowing the plane coordinates x, y, h implement the physics of motion of the aircraft variable settings through a graphical interface, such as: roll, pitch, speed the
- convert plane coordinates in the coordinates B, L, H WGS-84 the
- create a package of standard NMEA messages of the required four lines the
- send them to a virtual parallel port
Fly_nmea + Android Sensor
For easier testing I have established to receive data from Android sensors (tilt angles). Android UDP sends two lines like:
the
-
the
- "Angle:\t236.04152\t-1.0\t-3.0" the
- "Acc:\t-0.46309182\t-0.14982383\t-10.56939"
On app emulation I take them and on the basis of the tilt angles change the settings:
the
-
the
- Roll the
- Pitch
In app emulation you can switch off the control via the interface on the Android Sensor.
Connection Fly_nmea
For emulation of COM ports will come in handy more Virtual Serial Ports Emulator, you will need to configure two virtual COM ports e.g. COM1 <-> COM6, and the program Fly_nmea will send data to COM6 and COM1 the program that uses the NMEA Protocol to pick them up.
Opinion
Overall I spent more time searching for such software, and not finding what I'm fully satisfied faster wrote it myself. On a past project I worked on, managed quite successfully to connect the emulator to the programs, understand NMEA Protocol such as: 2Gis SAS planet and.
FlyNMEA and android sensor(project for the transfer of data from the sensors via UDP) here
VSPE emulation ports here
upd: the frequency of the emulated data 5 Hz
Комментарии
Отправить комментарий