Device::IRU_GE - Perl Module to read and control a GE Aviation Systems IRU
use Device::IRU_GE; my %arg_hsh; $arg_hsh{baudrate} = 19200; $arg_hsh{parity} = "none"; $arg_hsh{databits} = 8; $arg_hsh{stopbits} = 1; $arg_hsh{'port'} = '/dev/ttyr0a'; my $Ge_obj = new IRU_GE(\%arg_hsh) $Ge_obj->set_5D(3); print "Sent gyrocompass command\n"; while (1) { my $att_ref = $Ge_obj->get_62(); print "$att_ref->{hdg_true} $att_ref->{roll} $att_ref->{pitch} \n"; }
The module provides a software interface to the General Electric North Finding Module (NFM) or also known as Interial Reference Unit (IRU) or a component of the Land Navigation System (LNS).
This module implements several of the functions defined in the GE Aviation Systems document:
"RS-422 Interface Protocol Specification for the Operational Vehicle Program of the Inertial Reference Unit"
This document is dated 08 October 2008 and must be acquired from GE Aviation Systems directly.
GE Aviation Systems LLC 3290 Patterson Avenue, SE, Grand Rapids, MI 49512-1991, USA
This Perl Module provides functions which are identified using the numerical Command ID's found in the reference document.
Only a few of the more useful methods or functions are described please have a look at the code for others or contact me.
Object Constructor which expects an argument with a hash or reference to a hash providing the communication parameters.
$ge_obj = Device::GE_IRU(%arg_hsh);
Available arguements: baudrate, parity, databits, stopbits, port
Defaults for these argument parameters are as follows:
$arg_hsh{'port'} = "/dev/ttyS0"; $arg_hsh{baudrate} = 19200; $arg_hsh{parity} = "none"; $arg_hsh{databits} = 8; $arg_hsh{stopbits} = 1;
Branch to Zero or total system restart. All output stops and the IRU resets.
$ge_obj->set_01();
Set IRU Mode This command is used to set the mode of the IRU to one of the valid modes shown below
$ge_obj->set_5D($mode)
Where $modes is one of the following:
3 Gyrocompass Mode (GC) 6 Navigation Mode (NAV) 8 In-Vehicle Calibration Mode (IVC) 9 Base Motion Compensated Coarse Align Mode (BMCCOARSE) 12 Fast Base Motion Compensated Coarse Align Mode (FASTBMCCOARSE)
Mode 3 or gyrocompass is the most common arguement here and this will send the IRU off into a gyrocompass excursion taking about 3 minutes to complete. The IRU must be motionless during this time.
Get Latitude and Longitude, True Heading, Grid Heading, Pitch and Roll and return in a hash reference
Note: When using this function I have noticed that the checksum value gets screwed up if there is any movement during an gyrocompass and stay corrupt. The values returned by this call appear to be correct but the checksum is just wrong and requires a power cycle to fix. I recommend get_62 only attitude is required.
Contents of returned hash reference are in degrees
$ref->{'lat'} = Latitude $ref->{'lng'} = Longitude $ref->{'hdg_grid'} = Grid Heading $ref->{'hdg_true'} = True Heading $ref->{'pitch'} = Pitch $ref->{'roll'} = Roll
Get the Heading and Attitude and return in a hash reference
my $ref = $ge_obj->get_62();
$ref->{'hdg_grid'} = Grid Heading $ref->{'hdg_true'} = True Heading $ref->{'pitch'} = Pitch $ref->{'roll'} = Roll
Get residual heading and gyrocompass time remaining.
my $ref = $ge_obj->get_0F();
Contents of returned hash reference
$ref->{'gc_time'} = time remain for gyrocompass to complete $ref->{'gc_mode_num'} = Numerical gyro mode $ref->{'gc_mode_str'} = Gyro mode string $ref->{'residual'} = heading residual $ref->{'move_stat'} = Moving status 0 for static, 1 for movement in the last 10 sec
Used to test the serial connection with a loopback plug.
Time::HiRes Math::Trig Device::SerialPort qw( :PARAM :STAT 0.07 ) or ( Win32::SerialPort qw(:STAT 0.19 ) ) with minor mods
PERFORMANCE SPECIFICATION FOR THE LAND NAVIGATION SYSTEM AND NORTH FINDING MODULE, Document Number YV1657, Rev. B 15 March 2001
RS-422 Interface Protocol Specification for the Operational Vehicle Program of the Inertial Reference Unit, Document Number YV2656, Rev. x 08 October 2008
Steve Troxel, <troxel 'at' perlworks.com>
Copyright (C) 2010 by Troxel
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.
To install Device::IRU_GE, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Device::IRU_GE
CPAN shell
perl -MCPAN -e shell install Device::IRU_GE
For more information on module installation, please visit the detailed CPAN module installation guide.