'imu_period'=>'auto',// 0xFFFFFFFF, // 0 - off, >=0xff000000 - "when ready", else - number of SCLK periods
'sclk_freq'=>5000000,// $clkr_divr= 8, // 80MHz divisor to get half SCLK rate (defaulkt SCLK=5MHz)
'stall'=>2,// SPI stall time in usec
'baud_rate'=>19200,// $rs232_div=80/2/$baud
'imu_slot'=>1,
'gps_slot'=>2,
'gps_mode'=>2,// 0 - pps pos, 1 - pps neg, 2 - start of first sesntence after pause, 3 start of sentence
'msg_conf'=>10,// GPIO bit number for external (odometer) input (+16 - invert polarity). Timestamp uses leading edge, software may write to 56-byte buffer before the trailing edge
'extra_conf'=>4,// 0 - config_long_sda_en, 1 -config_late_clk, 2 - config_single_wire, should be set for 103695 rev "A"
'slow_spi'=>0,// set to 1 for slow SPI devices (0 for ADIS-16375)
'imu_sa'=>3,// i2c slave address modifier for the 103695A pca9500
'sleep_busy'=>30000,//microseconds
'imu_registers'=>array(/// Up to 28 total
0x10,// x gyro low
0x12,// x gyro high
0x14,// y gyro low
0x16,// y gyro high
0x18,// z gyro low
0x1a,// z gyro high
0x1c,// x accel low
0x1e,// x accel high
0x20,// y accel low
0x22,// y accel high
0x24,// z accel low
0x26,// z accel high
0x40,// x delta angle low
0x42,// x delta angle high
0x44,// y delta angle low
0x46,// y delta angle high
0x48,// z delta angle low
0x4a,// z delta angle high
0x4c,// x delta velocity low
0x4e,// x delta velocity high
0x50,// y delta velocity low
0x52,// y delta velocity high
0x54,// z delta velocity low
0x56,// z delta velocity high
0x0e,// temperature
0x70,// time m/s
0x72,// time d/h
0x74// time y/m
),
'nmea'=>array(
/// first three letters - sentence to log (letters after "$GP"). next "n"/"b" (up to 24 total) - "n" number (will be encoded 4 digits/byte, follwed by "0xF"
/// "b" - byte - all but last will have MSB 0 (& 0x7f), the last one - with MSB set (| 0x80). If there are no characters in the field 0xff will be output
array('RMC','nbnbnbnnnnb'),
array('GGA','nnbnbnnnnbnbbb'),
array('GSA','bnnnnnnnnnnnnnnnn'),
array('VTG','nbnbnbnb')
),
'message'=>'Odometer message'// Message - up to 56 bytes
);
return$default_config;
functioninit_default_config(){
$default_config=array(
'imu_period'=>'auto',// 0xFFFFFFFF, // 0 - off, >=0xff000000 - "when ready", else - number of SCLK periods
'sclk_freq'=>5000000,// $clkr_divr= 8, // 80MHz divisor to get half SCLK rate (defaulkt SCLK=5MHz)
'stall'=>2,// SPI stall time in usec
'baud_rate'=>19200,// $rs232_div=80/2/$baud
'imu_slot'=>1,
'gps_slot'=>2,
'gps_mode'=>2,// 0 - pps pos, 1 - pps neg, 2 - start of first sesntence after pause, 3 start of sentence
'msg_conf'=>10,// GPIO bit number for external (odometer) input (+16 - invert polarity). Timestamp uses leading edge, software may write to 56-byte buffer before the trailing edge
'extra_conf'=>4,// 0 - config_long_sda_en, 1 -config_late_clk, 2 - config_single_wire, should be set for 103695 rev "A"
'slow_spi'=>0,// set to 1 for slow SPI devices (0 for ADIS-16375)
'imu_sa'=>3,// i2c slave address modifier for the 103695A pca9500
'sleep_busy'=>30000,// microseconds
'imu_registers'=>array(// / Up to 28 total
0x10,// x gyro low
0x12,// x gyro high
0x14,// y gyro low
0x16,// y gyro high
0x18,// z gyro low
0x1a,// z gyro high
0x1c,// x accel low
0x1e,// x accel high
0x20,// y accel low
0x22,// y accel high
0x24,// z accel low
0x26,// z accel high
0x40,// x delta angle low
0x42,// x delta angle high
0x44,// y delta angle low
0x46,// y delta angle high
0x48,// z delta angle low
0x4a,// z delta angle high
0x4c,// x delta velocity low
0x4e,// x delta velocity high
0x50,// y delta velocity low
0x52,// y delta velocity high
0x54,// z delta velocity low
0x56,// z delta velocity high
0x0e,// temperature
0x70,// time m/s
0x72,// time d/h
0x74
)// time y/m
,
'nmea'=>array(
// / first three letters - sentence to log (letters after "$GP"). next "n"/"b" (up to 24 total) - "n" number (will be encoded 4 digits/byte, follwed by "0xF"
// / "b" - byte - all but last will have MSB 0 (& 0x7f), the last one - with MSB set (| 0x80). If there are no characters in the field 0xff will be output
array(
'RMC',
'nbnbnbnnnnb'
),
array(
'GGA',
'nnbnbnnnnbnbbb'
),
array(
'GSA',
'bnnnnnnnnnnnnnnnn'
),
array(
'VTG',
'nbnbnbnb'
)
),
'message'=>'Odometer message'
)// Message - up to 56 bytes
;
return$default_config;
}
/**
Combines $conf and $dflt arrays - all driver parameters are overwritten aftre the call