Version 9 (modified by asm, 9 years ago) (diff)

--

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 in the following ticket: https://arsf-dan.nerc.ac.uk/trac/ticket/573

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.

The general procedure is similar to that of alsproc, for which there is a guide here. You need to generate a config file following the procedure on this page, add the projection (as detailed) and then make the following changes for calc_roll_offsets.py:

  • 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. You can vary the increments for two lines but comparisons will only be made for the same pitch / roll / heading values not all combinations. If you know the value for one line you can set 'pitch-correct' / 'roll-correct' / 'heading-correct' for that line. The order is important if you are having one fixed line and iterating over values for the second line. The first line to be processed in the config file mist be the one which is fixed.

  • 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). You can get the times by opening the files in LAG and clicking on a point.

  • Only process the first returns
    first-return-only = true
    
  • Only set two filightlines at once to process by setting other lines to
    process_line = false
    

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 -o 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

This will use all your cores so be careful when running it.

There is also a script 'calc_roll_offsets_qsub.py', the options are the same as 'calc_roll_offsets.py' but it will submit to the grid rather than running on the local machine. Currently this will only submit a single job with a pair of lines.

Make sure you remove the files once they are no longer needed as it is possible to generate large amounts of data with this script. If you are not using the grid you might want to set the output to your local disk,