[Elphel-support] Connecting the IMU and GPS adapter boards to 10369board

Lemay, Lee C CIV SPAWARSYSCEN-PACIFIC, 52340 lee.lemay at navy.mil
Tue Oct 11 17:28:13 PDT 2011


Andrey,
 
This is excellent. Thank you for the information.
 
I have one request, which would be to be able to configure the ADIS IMU
sample decimation rate through the use of imu_setup.php. For completeness,
one would also able to select the FIR filter in default configuration, A-D,
and enable or disable the filter.
I understand if this is not a priority. It would definitely enhance the
usability of the ADIS IMU.
 
Lee

  _____  

From: elphel at gmail.com [mailto:elphel at gmail.com] On Behalf Of Andrey
Filippov
Sent: Tuesday, October 11, 2011 3:50 PM
To: Lemay, Lee C CIV SPAWARSYSCEN-PACIFIC, 52340;
support-list at support.elphel.com
Subject: Re: [Elphel-support] Connecting the IMU and GPS adapter boards to
10369board




On Tue, Oct 11, 2011 at 4:24 PM, Lemay, Lee C CIV SPAWARSYSCEN-PACIFIC,
52340 <lee.lemay at navy.mil> wrote:



Thank you Andrey. I have a few more questions.
 
Where do you set the baud rate for GPS?


To write to EEPROM you may use this page
http://community.elphel.com/<remove-this>bootblock353/ , this page also
allows to read EEPROM and bootblock records on the camera boards
 


Which directory is the XML configuration file located in?


/etc/imu_logger.xml

You may also try to open the page the http://camera-ip/imu_setup.php
(without parameters) - it shows how to control the logger (I'll attach the
output below)

 

If I want to use "auto" baud rate, will the process be:
- power on Elphel
- wait until GPS gets a lock
- type 'reboot' into the console ?

"reboot -f"
or open url in the browser
http://camera-ip/phpshell.php?command=reboot+-f

just make sure you close that page - otherwise if the browser (or the
computer) will crash, it will try to open that page when you run the
browser, rebooting camera unintentionally.


 
Because if I hard reboot the Elphel by removing power, the GPS will lose
power too. So typing reboot seems like the only way to maintain GPS lock and
reboot the camera. Correct me if I am wrong.


Usually, if the GPS was locked, it will re-lock after short power outage
before the camera will try to detect it. 


 
I appreciate your help!
 
Lee

  _____  




Usage of IMU/GPS logger (/imu_setup.php)


This script controls IMU/GPS logger. When the camera starts, the script
looks for the /etc/imu_logger.xml" and if it is found, the settings from
this file are applied to the logger. If there is no such file (i.e. at first
boot after reflashing the camera) script looks for the optional extension
boards 103695 <http://192.168.0.9/imu_setup.php>  and 103696
<http://wiki.elphel.com/index.php?title=103696>  and uses the information
from their flash memory (not erased during reflash) combined with the
defaults to create initial /etc/imu_logger.xml file that can be modified
later

Script receives parameters as HTTP GET request, there are five special
parameters: 

*	source <http://192.168.0.9/imu_setup.php?source>  - returns the
source of this script 

*	list <http://192.168.0.9/imu_setup.php?list>  - returns an XML
containing current logger settings, the names of the nodes can be used to
modify specific settings 

*	save - overwrite /etc/imu_logger.xml with the current settings -
they will be used next time camera will boot up 

*	msg=url-encoded-text-up-to-56-bytes - set the "odometer" message
that will be logged next time the external input is toggled 

*	smsg=url-encoded-text-up-to-56-bytes - (not yet implemented) set the
"odometer" message and trigger logging immediately

Other parameters are just name=value pairs with colons separating names and
subnames 

*	imu_period - set the IMU logging period in SPI SCLK periods, maybe
set to auto (default value, same as 0xff000000) to log when the IMU data is
ready. Value 0 turns the IMU logging off 

*	sclk_freq - set SPI clock frequency, in Hz. Default is 5000000
(5MHz) 

*	stall - set SPI 'stall' time, in microseconds. Default is 2 usec 

*	baud_rate - set baud rate for the serial GPS, default is 19200 

*	imu_slot - specify the IMU board (103695
<http://wiki.elphel.com/index.php?title=103695> ) connection to the 10369
<http://wiki.elphel.com/index.php?title=10369>  board 0 - none, 1 - J9, 2 -
J10, 3 - J11. Default is 1 (J9) 

*	gps_slot - specify the GPS board (103696
<http://wiki.elphel.com/index.php?title=103696> ) connection to the 10369
<http://wiki.elphel.com/index.php?title=10369>  board 0 - none, 1 - J9, 2 -
J10, 3 - J11. Default is 2 (J10) 

*	gps_mode - synchronization mode for the GPS: 0 - pulse-per-sample
external input, negative front, 1 - pps input positive front, 2 - start of a
first sentence after pause, 3 - start of each individual sentence. Mode 2 is
the default, modes 0 and 1 require that GPS has a dedicated synchro output 

*	msg_conf - GPIO number and polarity (+16 - invert polarity) uses to
log external events (i.e. odometer pulses from a vehicle wheel sensor).
Timestamp uses leading edge, software may write to the 56-byte buffer (see
'msg=' command above) before the trailing edge to attach the message to the
event after the event occured. In the case of short external pulses the
logged message will be the last written before the event 

*	img_sync - 0 - disable logging of the images, 1 - enable. In the
case of the multiple synchronized cameras this provides a way to match
external (master) camera timestamps transmitted over the synchronization
cable, with the local camera timestamps used by the logger - both are
logged. Default is 1 

*	extra_conf - Development signals (0 - config_long_sda_en, 1
-config_late_clk, 2 - config_single_wire, should be set for 103695 rev A).
Default is 4 

*	slow_spi - may be set to 1 for slow SPI devices (other changes may
be needed, i.e. changing power from 3.3V to 5.0V selected by a resistor
divider). Default is 0 

*	imu_sa - i2c slave address modifier (matches hardware jumpers).
Default is 3 

*	sleep_busy - setting for the driver. It is a sleep time (in
microseconds) before the driver will poll the logger buffer if it does not
have the full sample record (64 bytes of data) ready 

*	imu_registers - setting the IMU register addresses to be logged
(total number of logged registers is 28). You may see the complete list of
the registers in the IMU datasheet. The registers are addressed as
'imu_registers:NN', where NN is the register sequnce number, starting with
0. Below are the default values: 


*	imu_registers:0=0x10 - x gyro low 

*	imu_registers:1=0x12 - x gyro high 

*	imu_registers:2=0x14 - y gyro low 

*	imu_registers:3=0x16 - y gyro high 

*	imu_registers:4=0x18 - z gyro low 

*	imu_registers:5=0x1a - z gyro high 

*	imu_registers:6=0x1c - x accel low 

*	imu_registers:7=0x1e - x accel high 

*	imu_registers:8=0x20 - y accel low 

*	imu_registers:9=0x22 - y accel high 

*	imu_registers:10=0x24 - z accel low 

*	imu_registers:11=0x26 - z accel high 

*	imu_registers:12=0x40 - x delta angle low 

*	imu_registers:13=0x42 - x delta angle high 

*	imu_registers:14=0x44 - y delta angle low 

*	imu_registers:15=0x46 - y delta angle high 

*	imu_registers:16=0x48 - z delta angle low 

*	imu_registers:17=0x4a - z delta angle high 

*	imu_registers:18=0x4c - x delta velocity low 

*	imu_registers:19=0x4e - x delta velocity high 

*	imu_registers:20=0x50 - y delta velocity low 

*	imu_registers:21=0x52 - y delta velocity high 

*	imu_registers:22=0x54 - z delta velocity low 

*	imu_registers:23=0x56 - z delta velocity high 

*	imu_registers:24=0x0e - temperature 

*	imu_registers:25=0x70 - time m/s 

*	imu_registers:26=0x72 - time d/h 

*	imu_registers:27=0x74 - time y/m

*	nmea - set format of the four logged NMEA sentences. For each
sentence two text fields have to be specified - 'sentence' (the three
letters following the comman prefix '$GP'), and 'format' that consists of a
sequence of 'n' (for number) and 'b' (for bytes), up to 24 total. Numbers
consisting of digits, minus sign and decimal point are encoded with 2 digits
per byte (to make sure the longest sentence fits into the 56 byte logger
payload buffer), followed by the 0xf nibble (half-byte). Bytes are encoded
with MSB cleared ( & 0x7f) for all bytes in a field but the last, the last
byte has it set (|0x80). Empty byte field is logged as 0xff. Below are the
default settings: 


*	nmea:0:sentence=RMC - sentence $GPRMC 

*	nmea:0:format=nbnbnbnnnnb - format for the $GPRMC 

*	nmea:1:sentence=GGA - sentence $GPGGA 

*	nmea:1:format=nnbnbnnnnbnbbb - format for the $GPGGA 

*	nmea:2:sentence=GSA - sentence $GPGSA 

*	nmea:2:format=bnnnnnnnnnnnnnnnn - format for the $GPGSA 

*	nmea:3:sentence=VTG - sentence $GPVTG 

*	nmea:3:format=nbnbnbnb - format for the $GPVTG 

You may record the log to a file (i.e. on external USB stick or SSD/HDD)
with teh following command:
cat /dev/imu >log-file-path

Test logger and GPS:
fpcf -imu 10000 | grep "1:"

The fpcf output starts the line (logged sample) with the source of the
sample: 

*	0: - IMU (normally 2560 samples/sec) 

*	1: - GPS 

*	2: - camera images 

*	3: - 'odometer' - external events

'10000' means that fpcf should output 10000 samples, that takes
approximately 4 seconds if IMU output is being logged.  

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://support.elphel.com/pipermail/support-list_support.elphel.com/attachments/20111011/0395b7c8/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5668 bytes
Desc: not available
URL: <http://support.elphel.com/pipermail/support-list_support.elphel.com/attachments/20111011/0395b7c8/attachment.bin>


More information about the Support-list mailing list