Convert::MIL1750A 0.1 review

Download
by rbytes.net on

Convert::MIL1750A is a Perl module for conversion routines between decimal floating/integer values and hexadecimal values in the MIL-

License: Perl Artistic License
File size: 3K
Developer: Jared Clarke
0 stars award from rbytes.net

Convert::MIL1750A is a Perl module for conversion routines between decimal floating/integer values and hexadecimal values in the MIL-STD-1750A format.

SYNOPSIS

use MIL1750A;

# Convert to MIL-STD-1750A hex from decimal
$hex16i = I16_to_1750A( $dec_value );
$hex16f = F16_to_1750A( $dec_value );
$hex32f = F32_to_1750A( $dec_value );
$hex48f = F48_to_1750A( $dec_value );

# Convert MIL-STD-1750A hex to decimal
$dec_value = M1750A_to_16int( $hex16i );
$dec_value = M1750A_to_16flt( $hex16f );
$dec_value = M1750A_to_32flt( $hex32f );
$dec_value = M1750A_to_48flt( $hex48f );
or ...
use MIL1750A qw( i16_to_mil f16_to_mil f32_to_mil f48_to_mil
mil_to_32f mil_to_48f mil_to_16f mil_to_16i );

# Convert to MIL-STD-1750A hex from decimal
$hex16i = i16_to_mil( $dec_value );
$hex16f = f16_to_mil( $dec_value );
$hex32f = f32_to_mil( $dec_value );
$hex48f = f48_to_mil( $dec_value );

# Convert MIL-STD-1750A hex to decimal
$dec_value = mil_to_16i( $hex16i );
$dec_value = mil_to_16f( $hex16f );
$dec_value = mil_to_32f( $hex32f );
$dec_value = mil_to_48f( $hex48f );

Convert::MIL1750A features routines to convert between 16I/16F/32F/48F decimal values and their equivalent in MIL-STD-1750A hexadecimal. The 1750A standard describes a microprocessor that is used as the backbone of many modern and legacy avionics systems. The 1750A stores data as an 8-bit exponent and n-bit mantissa (where n is the number of bits remaining in the value).

It is important to treat 16-bit values as 16-bit, 32-bit as 32-bit and 48-bit as 48-bit. Crossing bit structures will create unexpected results as 1750A hex values are structured differently, depending on their size. Additionally, the 16F format is not a formal member of the 1750A standard; it is used, however, in certain applications and is provided for reference. The 1750A standard allows positive and negative values using the 2's complement arrangement.

This module is extremely useful for ingesting data output by or for a 1750A flight processor. I would like to thank and acknowledge Dave Niklewski for helping me to find the standard documentation.Convert::MIL1750A is a Perl module for conversion routines between decimal floating/integer values and hexadecimal values in the MIL-STD-1750A format.

Requirements:
Perl

Convert::MIL1750A 0.1 keywords