= Automatically determining the best Pitch and Roll = '''Note: This is an experimental procedure, you still need to check the values in LAG and process the final data in ALSPP. Keep a note of any problems and pass them onto dac''' If you are using this to process data after day 2014/238 you need to use the calibration file '/users/rsg/arsf/calibration/2014/lidar/20140826/2014_238_calibration_no_fla.reg' in ALSPP, as this doesn't have a FLA correction so ''should'' produce the same values as alsproc - check this though. Currently the scripts are still in development and are not available on the arsf path. You need to load them using: {{{ source ~dac/scratch_network/arsf_devel/load_paths }}} The general procedure is similar to that of alsproc, for which there is a guide [wiki:Procedures/AlsprocProcessing here]. A couple of changes are required to the config file: * Set start, end and increment values for pitch / roll / heading. {{{ roll-start = -0.0039 roll-end = -0.0041 roll-inc = -0.00001 }}} You can vary multiple parameters at the same time but the total number of increments must not exceed 100. * For long lines set a minimum and maximum time to process {{{ time-min = 558224 time-max = 558249 }}} Ideally covering an area with good features for the comparison (i.e., buildings and hard surfaces). * Only process the first returns {{{ first-return-only = true }}} * Only set two filightlines at once to process Once the parameters have been set in the config file you can run the script 'calc_roll_offsets.py' (pass in the '-h' flag to get more information on usage). Basic usage will be something like: {{{ calc_roll_offsets.py -d out_diff_images_folder --plot out_plot.pdf 2014303.cfg }}} The script will run alsproc for every increment for each line then compare the two (or more) lines for each increment and return the best match. Note this might not be the best value for the flights, just the minimum for the range of values provided. To get more information look at the plot. Ideally there should be a minima somewhere between the minimum and maximum values. If it is still decreasing you should change the range. I good practice is to start with a large range and bigger increments to get a rough idea of the correct values then run again with a narrower range and smaller increments. It's a good idea to check the LAS files as well to make sure everything looks OK. If you want to run multiple increments in parallel (on your local machine) you can do so with the following environmental variable: {{{ export RUN_ALSPROC_INC_PARALLEL=YES }}}