error: At end of source: #67: expected a "}"

Keil MDK编程出现错误:

HardWareDriver\PWM_Output\PWM_Output.c(307): error: At end of source:  #67: expected a "}"


解决方法参考了,博客     realview MDK C/C++ 混合编程问题

http://blog.csdn.net/jianxiang54321/article/details/5025752


试探性的,在代码结尾多加了一个“}” ,结果编译通过,不再提示error,可是“{” “}”的个数并不是一边多,我还没有搞懂是怎么回事


void PWM_Write_Motors(void)
{
#if (Remote_Config_Enable == 1)	 
	  //条件编译,Remote_Config_Enable的定义见fly_config.h,
	  //是否使用遥控器来做参数配置  1 使用, 0 为不使用/
	  //注意,当使用这个功能后,起飞前需要解锁油门才能进行飞行。
//  if(Quadrotor_Mode == Quad_ESC_Cal)return;	//正在校准电调,别添乱了	
	  if(THROTTLE_LOCKed)
	  {	  //油门锁定中,输出PWM不让电机启动,以免伤人。
	    LED_Blink_Routine();  //LED长亮,指示电机锁定状态
	  	PWM_Output_Set_default();
		return;
	  }
#endif

//  PWM_PID_Smooth();  //平滑输出 
//
//  //保护措施,当油门低时,不启动电机。	
//  if(THROTTLE < (int16_t)(MINTHROTTLE+(MAXTHROTTLE-MINTHROTTLE)/20))
	{
//  PID_ROLL = 0;	//油门量小于 5%  不启动电机
//  PID_PITCH = 0; //所有的控制量清零,以防电机启动
//  PID_YAW = 0;
//  }

switch(Fly_Mode)
  {
	  case QUADP :	//十字型的四轴飞行器
	    motor[0] = Math_Constrain(PIDMIX( 0,+1,-1),Min_PWM_Out,Max_PWM_Out); //REAR	 后尾电机
	    motor[1] = Math_Constrain(PIDMIX(-1, 0,+1),Min_PWM_Out,Max_PWM_Out); //RIGHT 右边电机
	    motor[2] = Math_Constrain(PIDMIX(+1, 0,+1),Min_PWM_Out,Max_PWM_Out); //LEFT	 左边电机
	    motor[3] = Math_Constrain(PIDMIX( 0,-1,-1),Min_PWM_Out,Max_PWM_Out); //FRONT 前面电机
		Set_PWMOuput_CH1(motor[0]);
		Set_PWMOuput_CH2(motor[1]);
		Set_PWMOuput_CH3(motor[2]);
		Set_PWMOuput_CH4(motor[3]);
	    break;
	  case QUADX :	//X 型的四轴飞行器
	    motor[0] = Math_Constrain(PIDMIX(-1,+1,-1),Min_PWM_Out,Max_PWM_Out); //REAR_R  后右电机
	    motor[1] = Math_Constrain(PIDMIX(-1,-1,+1),Min_PWM_Out,Max_PWM_Out); //FRONT_R 前右电机
	    motor[2] = Math_Constrain(PIDMIX(+1,+1,+1),Min_PWM_Out,Max_PWM_Out); //REAR_L  后左电机
	    motor[3] = Math_Constrain(PIDMIX(+1,-1,-1),Min_PWM_Out,Max_PWM_Out); //FRONT_L 前左电机
		Set_PWMOuput_CH1(motor[0]);
		Set_PWMOuput_CH2(motor[1]);
		Set_PWMOuput_CH3(motor[2]);
		Set_PWMOuput_CH4(motor[3]);
	    break;
	  case Y4  :
	    motor[0] = Math_Constrain(PIDMIX(+0,+1,-1),Min_PWM_Out,Max_PWM_Out);   //REAR_1 CW
	    motor[1] = Math_Constrain(PIDMIX(-1,-1, 0),Min_PWM_Out,Max_PWM_Out); //FRONT_R CCW
	    motor[2] = Math_Constrain(PIDMIX(+0,+1,+1),Min_PWM_Out,Max_PWM_Out);   //REAR_2 CCW
	    motor[3] = Math_Constrain(PIDMIX(+1,-1, 0),Min_PWM_Out,Max_PWM_Out); //FRONT_L CW
		Set_PWMOuput_CH1(motor[0]);
		Set_PWMOuput_CH2(motor[1]);
		Set_PWMOuput_CH3(motor[2]);
		Set_PWMOuput_CH4(motor[3]);
	    break;
	  case Y6  :
	    motor[0] = Math_Constrain(PIDMIX(+0,+4/3,+1),Min_PWM_Out,Max_PWM_Out); //REAR
	    motor[1] = Math_Constrain(PIDMIX(-1,-2/3,-1),Min_PWM_Out,Max_PWM_Out); //RIGHT
	    motor[2] = Math_Constrain(PIDMIX(+1,-2/3,-1),Min_PWM_Out,Max_PWM_Out); //LEFT
	    motor[3] = Math_Constrain(PIDMIX(+0,+4/3,-1),Min_PWM_Out,Max_PWM_Out); //UNDER_REAR
	    motor[4] = Math_Constrain(PIDMIX(-1,-2/3,+1),Min_PWM_Out,Max_PWM_Out); //UNDER_RIGHT
	    motor[5] = Math_Constrain(PIDMIX(+1,-2/3,+1),Min_PWM_Out,Max_PWM_Out); //UNDER_LEFT  
		Set_PWMOuput_CH1(motor[0]);
		Set_PWMOuput_CH2(motor[1]);
		Set_PWMOuput_CH3(motor[2]);
		Set_PWMOuput_CH4(motor[3]);
		Set_PWMOuput_CH5(motor[4]);
		Set_PWMOuput_CH6(motor[5]); 
	    break;
	  case HEX6	:
	    motor[0] = Math_Constrain(PIDMIX(-7/8,+1/2,+1),Min_PWM_Out,Max_PWM_Out); //REAR_R
	    motor[1] = Math_Constrain(PIDMIX(-7/8,-1/2,-1),Min_PWM_Out,Max_PWM_Out); //FRONT_R
	    motor[2] = Math_Constrain(PIDMIX(+7/8,+1/2,+1),Min_PWM_Out,Max_PWM_Out); //REAR_L
	    motor[3] = Math_Constrain(PIDMIX(+7/8,-1/2,-1),Min_PWM_Out,Max_PWM_Out); //FRONT_L
	    motor[4] = Math_Constrain(PIDMIX(+0  ,-1  ,+1),Min_PWM_Out,Max_PWM_Out); //FRONT
	    motor[5] = Math_Constrain(PIDMIX(+0  ,+1  ,-1),Min_PWM_Out,Max_PWM_Out); //REAR
		Set_PWMOuput_CH1(motor[0]);
		Set_PWMOuput_CH2(motor[1]);
		Set_PWMOuput_CH3(motor[2]);
		Set_PWMOuput_CH4(motor[3]);
		Set_PWMOuput_CH5(motor[4]);
		Set_PWMOuput_CH6(motor[5]); 
	    break;
	  case HEX6X :
	    motor[0] = Math_Constrain(PIDMIX(-1/2,+7/8,+1),Min_PWM_Out,Max_PWM_Out); //REAR_R
	    motor[1] = Math_Constrain(PIDMIX(-1/2,-7/8,+1),Min_PWM_Out,Max_PWM_Out); //FRONT_R
	    motor[2] = Math_Constrain(PIDMIX(+1/2,+7/8,-1),Min_PWM_Out,Max_PWM_Out); //REAR_L
	    motor[3] = Math_Constrain(PIDMIX(+1/2,-7/8,-1),Min_PWM_Out,Max_PWM_Out); //FRONT_L
	    motor[4] = Math_Constrain(PIDMIX(-1  ,+0  ,-1),Min_PWM_Out,Max_PWM_Out); //RIGHT
	    motor[5] = Math_Constrain(PIDMIX(+1  ,+0  ,+1),Min_PWM_Out,Max_PWM_Out); //LEFT
		Set_PWMOuput_CH1(motor[0]);
		Set_PWMOuput_CH2(motor[1]);
		Set_PWMOuput_CH3(motor[2]);
		Set_PWMOuput_CH4(motor[3]);
		Set_PWMOuput_CH5(motor[4]);
		Set_PWMOuput_CH6(motor[5]); 
	  	break;
  }
}     //这里多加的“}”,编译后解决问题
}




  • 1
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 4
    评论
rfc是网络协义的重要学习资源,为方便大家查看,特收藏整理如下。下面是其中一篇内容: Network Working Group Steve Crocker Request for Comments: 1 UCLA 7 April 1969 Title: Host Software Author: Steve Crocker Installation: UCLA Date: 7 April 1969 Network Working Group Request for Comment: 1 CONTENTS INTRODUCTION I. A Summary of the IMP Software Messages Links IMP Transmission and Error Checking Open Questions on the IMP Software II. Some Requirements Upon the Host-to-Host Software Simple Use Deep Use Error Checking III. The Host Software Establishment of a Connection High Volume Transmission A Summary of Primitives Error Checking Closer Interaction Open Questions Crocker [Page 1] RFC 1 Host Software 7 April 1969 IV. Initial Experiments Experiment One Experiment Two Introduction The software for the ARPA Network exists partly in the IMPs and partly in the respective HOSTs. BB&N has specified the software of the IMPs and it is the responsibility of the HOST groups to agree on HOST software. During the summer of 1968, representatives from the initial four sites met several times to discuss the HOST software and initial experiments on the network. There emerged from these meetings a working group of three, Steve Carr from Utah, Jeff Rulifson from SRI, and Steve Crocker of UCLA, who met during the fall and winter. The most recent meeting was in the last week of March in Utah. Also present was Bill Duvall of SRI who has recently started working with Jeff Rulifson. Somewhat independently, Gerard DeLoche of UCLA has
笔记本的风扇控制 ---------------------------------------- 09 November 2006. Summary of changes for version 20061109: 1) ACPI CA Core Subsystem: Optimized the Load ASL operator in the case where the source operand is an operation region. Simply map the operation region memory, instead of performing a bytewise read. (Region must be of type SystemMemory, see below.) Fixed the Load ASL operator for the case where the source operand is a region field. A buffer object is also allowed as the source operand. BZ 480 Fixed a problem where the Load ASL operator allowed the source operand to be an operation region of any type. It is now restricted to regions of type SystemMemory, as per the ACPI specification. BZ 481 Additional cleanup and optimizations for the new Table Manager code. AcpiEnable will now fail if all of the required ACPI tables are not loaded (FADT, FACS, DSDT). BZ 477 Added #pragma pack(8/4) to acobject.h to ensure that the structures in this header are always compiled as aligned. The ACPI_OPERAND_OBJECT has been manually optimized to be aligned and will not work if it is byte-packed. Example Code and Data Size: These are the sizes for the OS- independent acpica.lib produced by the Microsoft Visual C++ 6.0 32- bit compiler. The debug version of the code includes the debug output trace mechanism and has a much larger code and data size. Previous Release: Non-Debug Version: 78.1K Code, 17.1K Data, 95.2K Total Debug Version: 155.4K Code, 63.1K Data, 218.5K Total Current Release: Non-Debug Version: 77.9K Code, 17.0K Data, 94.9K Total Debug Version: 155.2K Code, 63.1K Data, 218.3K Total 2) iASL Compiler/Disassembler and Tools: Fixed a problem where the presence of the _OSI predefined control method within complex expressions could cause an internal compiler error. AcpiExec: Implemented full region support for multiple address spaces. SpaceId is now part of the REGION object. BZ 429 ---------------------------------------- 11 Oc
Twitter Digg Facebook Del.icio.us Reddit Stumbleupon Newsvine Technorati Mr. Wong Yahoo! Google Windows Live Send as Email Add to your CodeProject bookmarks Discuss this article 85 Print Article Database » Database » Other databasesLicence CPOL First Posted 19 Jan 2012 Views 24,219 Downloads 992 Bookmarked 74 times RaptorDB - The Key Value Store V2 By Mehdi Gholam | 8 Mar 2012 | Unedited contribution C#.NETDBABeginnerIntermediateAdvanceddatabase Even faster Key/Value store nosql embedded database engine utilizing the new MGIndex data structure with MurMur2 Hashing and WAH Bitmap indexes for duplicates. See Also More like this More by this author Article Browse Code Stats Revisions (8) Alternatives 4.95 (56 votes) 1 2 3 4 5 4.95/5 - 56 votes μ 4.95, σa 1.05 [?] Is your email address OK? You are signed up for our newsletters but your email address is either unconfirmed, or has not been reconfirmed in a long time. Please click here to have a confirmation email sent so we can confirm your email address and start sending you newsletters again. Alternatively, you can update your subscriptions. Add your own alternative version Introduction What is RaptorDB? Features Why another data structure? The problem with a b+tree Requirements of a good index structure The MGIndex Page Splits Interesting side effects of MGIndex The road not taken / the road taken and doubled back! Performance Tests Comparing B+tree and MGIndex Really big data sets! Index parameter tuning Performance Tests - v2.3 Using the Code Differences to v1 Using RaptorDBString and RaptorDBGuid Global parameters RaptorDB interface Non-clean shutdowns Removing Keys Unit tests File Formats File Format : *.mgdat File Format : *.mgbmp File Format : *.mgidx File Format : *.mgbmr , *.mgrec History Download RaptorDB_v2.0.zip - 38.7 KB Download RaptorDB_v2.1.zip - 39 KB Download RaptorDB_v2.2.zip - 39 KB Download RaptorDB_v2.3.zip - 39.6 KB D
v3.17 * updated libFLAC to version 1.2.1 * added a flush after every log line to help GUIs * "eac3to some.mpls" now also works if the stream files aren't there, anymore * fixed: number of subtitles was not appended to demuxed subtitles' file name * fixed: dialnorm removal (for Nero decoder) failed with some 2.0 TrueHD files v3.16 * added undocumented "-no2ndpass" switch to turn off 2nd pass processing * fixed: two pass processing sometimes produced superfluous sup files * fixed: MPG/EVO/VOB audio tracks with "PES extension 2" were not detected * fixed: very small W64/RF64 files were not detected correctly * fixed: when processing was aborted, log file was sometimes not created * fixed: sometimes specifying a title number addressed the wrong HD DVD title v3.15 * "24.975" is now interpreted as "25.000/1.001" * Blu-Ray "sup" are demuxed with DTS set to 0 again, proper fix will come later * fixed: error code not set for "source file format could not be detected" * fixed: audio resampling from/to 24.975 didn't work properly * fixed: WAV files beginning with lots of zeroes were sometimes not accepted v3.14 * WAV reading was broken for all but very small files (introduced in v3.13) v3.13 * fields and frames are counted and displayed separately now * added DIRAC bitstream parser * added support for "-24.975" and "-changeto24.975" * Blu-Ray subtitle demuxing: PTS value is now written to both PTS + DTS * joining MKV files is now declined with a proper error message * last chapter is now removed, if it's less than 10 seconds from end of movie * fixed: "-normalize" didn't work with stdout, anymore * fixed: audio delay was incorrect when 1st m2ts part contained no audio data * fixed: very small WAV files were not detected correctly * fixed: "eac3to source.eac3 dest.dts -core" crashed v3.12 * fixed: track languages for HD DVD discs were not shown * fixed: MLP channel order was wrong for some specific channel configurations * fixed: "DirectShow reported 255 channels" happened sometimes v3.11 * fixed: MKV subtitle track language wasn't shown v3.10 * Blu-Ray title listing now includes chapter information * fixed: v3.09 didn't show track languages for Blu-Rays v3.09 * added support for MKV "SRT/UTF8", "SRT/ASCII", "ASS" and "SSA" subtitles * increased some internal buffers to avoid AC3 overflow in the "thd ac3 joiner" * fixed: frame counting didn't work for MKV video tracks * fixed: video track FPS change was sometimes declined * fixed: video tracks with "strange" FPS were sometimes handled incorrectly * fixed: clipping removal 2nd pass was executed even for "stdout" * fixed: "eac3to -test" displayed an outdated Nero download link * fixed: specifying a specific playlist still used default playlist's chapters v3.08 * fixed: reading physical disc speed was abysmal (introduced in v3.07) * fixed: read error from physical drive resulted in crash v3.07 * added support for MKV video tracks without sequence headers in bitstream * added support for old style MKV AAC tracks * added support for various MKV "A_MS/ACM" audio formats * added support for various MKV "V_MS/VFW/FOURCC" video formats * added warning for tracks where bitstream parsing failed * demuxing a video track now also complains about video gaps/overlaps * the "-check" option now also complains about video gaps/overlaps * optimized memory allocation * fixed: adding subtitle caption count to filenames sometimes didn't work * fixed: subtitle caption counts in log sometimes had wrong track numbers * fixed: all non-supported MKV tracks shared the same description * fixed: incorrect framerate mismatch complaint was shown for pulldown sources * fixed: FLAC tracks in MKV files don't slow down detection, anymore * fixed: source file detection read 300MB from every source file v3.06 * added MKV reading/parsing support * added demux support for MKV (E-)AC3, DTS(-HD), AAC, MPx, FLAC and WAV tracks * added demux support for MKV "modern style" MPEG2, VC-1 and h264/AVC tracks * reading from (HD) DVD and Blu-Ray drives uses different reading APIs now * empty tracks in TS/m2ts container are not listed, anymore * for 24.000 fps video tracks a little warning is displayed now * when demuxing subtitle files, the number of captions is added to the filename * timestamp derived FPS is used for gap checking instead of video bitstream FPS * fixed: 44.1khz AC3 encoding was still broken * fixed: zero byte stripping pass was done for true 24bit TrueHD tracks * fixed: downconverting WAV files with 0x3f channel mask didn't work * fixed: log output "remaining delay [...]" was sometimes wrong for AC3 tracks * fixed: silent frame creation was tried for E-AC3 although it can't work v3.05 * warning is shown if h264 video bitstream contains "full range" flag * h264 video bitstream "full range" flag is automatically removed * you can disable removal of the "full range" flag by doing "-keepFullRange" * added reader for external DVD, HD DVD and Blu-Ray SUP files * external SUP files can be delayed now * number of HD DVD and DVD subtitles in SUP track is counted and displayed * number of forced and non-forced Blu-Ray subtitles in SUP track is displayed * "-check" option now also works for demuxed audio, video and subtitle tracks * when reading from physical disc drive, 2KB (instead of 1MB) blocks are read * improved automatic skipping over damaged first 5MB of TS/m2ts files * fixed: resampling and Surcode encoding didn't work in one step * fixed: TRP detection crashed * fixed: track listing sometimes contained tracks without description * fixed: h264 with missing framerate in 1st sequence header made eac3to crash * fixed: some AC3WAV files were not detected correctly * fixed: video frame count was not displayed when 2nd pass was executed v3.04 * video track framerates are now shown with up to 3 decimals, if necessary * m2ts/TS framerate is determined by interpreting video track timestamps * m2ts/TS framerate is displayed in the format description (if available) * warning is shown if container timestamps don't match video framerate * warning is shown if video bitstream has a non-standard framerate * video without framerate information: container framerate is used * video without framerate information: framerate can be set (e.g. "-23.976") * video without framerate information: new framerate is written to bitstream * remaining non-fixed audio delay is now shown in log * command prompt colors are restored after eac3to has run through * fixed: 2-pass processing for stripping zero bytes sometimes crashed * fixed: CA (Conditional Access) tracks were shown as "Unknown audio track" v3.03 * fixed: MPEG2 1088 to 1080 cropping was still incomplete v3.02 * fixed: VC-1 stream handling was broken * fixed: destination file extension "*.lpcm" didn't work with 2pass processing * fixed: MPEG2 1088 to 1080 cropping was incomplete * fixed: no log was being created when "temp file could not be interpreted" v3.01 * fixed: m2ts LCPM demuxing didn't work with v3.00 * fixed: TrueHD -> TrueHD+AC3 conversion didn't work with v3.00 v3.00 * broken AC3, DTS, AAC and MPx streams are now automatically repaired * errors in TS/m2ts files are now reported (with runtime) and ignored * damaged first max 5MB and max 5% of a TS/m2ts file are automatically skipped * video/audio tracks which can't be parsed, are now demuxed in raw form * added support for "line 21" closed captions in ATSC/NTSC broadcasts and DVDs * added reading of movie / network name from "line 21" XDS information * for gaps, edits & repairs > 1000ms eac3to now inserts silence by default * for gaps, edits & repairs < 1000ms eac3to now loops audio by default * option "-silence" forces eac3to to insert silence instead of looping audio * option "-loop" forces eac3to to loop audio instead of inserting silence * newly encoded AC3 frame is now used for "silence" instead of file's 1st frame * increased reading block size (might improve reading performance) * optimized TS/m2ts demuxing performance * optimized MPEG2, VC-1 and h264 parsing performance * command line output is colored now (e.g. errors drawn in red) * MPEG2 1920x1088 bitstream is now automatically patched/cropped to 1920x1080 * log file now contains "<WARNING>" and "<ERROR>" indicators * workaround for movie playlists which want the same m2ts file played twice * added version check for eac3to (doh!) * when a read error occurs, reading is tried again up to 3 times * (E-)AC3 frames with -0db dialnorm are now automatically patched to -31db * updated to newer libAften build -> fixes 44.1khz encoding * fixed: sometimes "The last DTS frame is incomplete" was a false alarm * fixed: mkvtoolnix version check didn't work, anymore * fixed: errors were meant to be output to stderr, but they weren't * fixed: automatic gap/overlap fixing with AAC targets aborted processing * fixed: positive edit began a bit too early * fixed: two ID3 tags after each other made eac3to fail detecting the format * fixed: some VOB files were not detected properly v2.87 * fixed: negative edit was done too late (introduced in v2.86) v2.86 * fixed: "1:some.ac3" instead of "1: some.ac3" failed for 2 digit track numbers * fixed: "eac3to source movie.mkv" demuxed video instead of muxing to MKV * negative edit now begins at the specified runtime instead of ending there v2.85 * using "eac3to source video.h264" doesn't demux audio/subtitle tracks, anymore * using "eac3to source movie.*" demuxes video, audio and subtitle tracks * using "eac3to source 1: video.* 2: audio.*" demuxes the specified tracks * AC3 and E-AC3 dialnorm removal now uses "-31db" instead of "-0db" * workaround for DTS files where last byte is missing in each audio frame * fixed: v2.84 sometimes crashed when parsing HD DVD XML files * fixed: v2.84 sometimes chose incorrect XML file * fixed: v2.84 sometimes chose wrong m2ts playlist file * fixed: some actions were eventually applied twice when "-2pass" was used * fixed: AAC encoding quality "quality=0.0x" was passed to Nero as "0.x" v2.84 * fixed: 2nd pass gap removal was tried (and failed) for TrueHD+AC3 targets * fixed: processing aborted when trying to fix gaps in PCM destination files * fixed: more than one RAW/PCM overlaps resulted in lost sync (since v2.81) * fixed: demuxing TrueHD+AC3 stream by title number didn't renew the AC3 part * new option for removing or looping audio data, e.g. "-edit=0:20:47,-100ms" * title sorting criteria changed: resolution is more important than runtime * new option "-lowPriority" sets eac3to to background/idle priority * libav warnings are now assigned to the affected audio track * fixed: "lossless check failed" false alarms for seamless branching movies * fixed: spike removal filter was not active for the very last overlap/gap * improved muxing h264 streams which begin with double sequence headers * source files are now opened with "share read + write access" * destination files are now opened with "share read access" v2.83 * fixed: gap/overlap correction didn't work for FLAC and WAV files * fixed: when clipping was detected, 2nd pass was not always executed correctly v2.82 * fixed: sometimes eac3to stalled before processing (introduced in v2.81) v2.81 * audio gap/overlap fixing is now automatically done in a 2nd pass * option "-normalize" maximizes the volume of the audio data, needs 2 passes * audio clipping is detected and automatically removed in a 2nd pass * "-2pass" activates 2 pass mode (can speedup seamless branching processing) * superfluous zero bytes are now automatically removed in 2nd pass * "-phaseShift" shifts surround channel phase by 90?for DPL II downmixing * spike removal post processing filter now always produces 16bit samples * empty channels are now reported by the bitdepth analyzer as "no audio data" * option "-shutdown" shuts the PC down automatically after processing is done * the HD DVD XPL with the longest title is now loaded instead of VPLST000.XPL * eac3to can now open selected XPL files (e.g. "eac3to ADV_OBJ\VPLS002.XPL") * eac3to can now open selected mpls files (e.g. "eac3to PLAYLIST\00002.mpls") * fixed: TrueHD streams starting with a non-major header failed to decode * fixed: WAV files created by eac3to with empty channels had incorrect header * fixed: RAW/PCM gap/overlap remover sometimes didn't work correctly v2.80 * fixed: FLAC files with missing runtime information were not accepted * gone back to old VOB/EVO auto delay calculation method, more reliable for me * improved TS broadcast audio delay detection * added support for constant bitrate AAC encoding * added support for AAC encoding 0.00 and 1.00 quality v2.79 * improved m2ts file joining overlap detection (mainly for interlaced video) * vob/evo audio delay detection now uses "vobu start presentation time" * program streams which are neither VOB nor EVO are now reported as "MPG" * resampling is now automatically activated for AC3/DTS encoding, if necessary * "Mersenne Twister" random number generator is used for dithering now * zero padded DTS tracks are now displayed as such * fixed: 32bit PCM conversion to floating point was broken * fixed: with some (rare) movies first subtitle began after 50 minutes runtime * only plugins with the extension *.dll are loaded now v2.78 * fixed: h264 interlaced muxing to MKV could result in too long runtime * fixed: transcoding DTS-HD/E-AC3 core sometimes failed to work correctly * improved TS/m2ts audio delay detection * added filter to remove spikes when fixing gaps/overlaps in RAW/PCM audio * each eac3to instance has its own log file now * playlist output now also works with "-log" option * default bitrate for mono & stereo AC3 encodes lowered to 448kbps * default bitrate for mono & stereo DTS encodes lowered to 768kbps * it should be possible to handle TsSplitter splitted TS files via "+" now v2.77 * pcm/raw audio delay is now applied before resampling and fps change * parsing of command line with multiple sources files sometimes failed v2.76 * "-slowdown" now works to convert 24.000 movies to 23.976 * "-speedup" now works to convert 24.000 movies to 25.000 * option "-xx.xxx" (e.g. "-24.000") sets the FPS of the source track * option "-changeToXx.xxx" (e.g. "-changeTo23.976") changes video/audio FPS * modified FPS information is written to video bitstream (VC-1, MPEG2, h264) * demuxing with FPS change option now activates audio track transcoding * SSRC resampling parameters modified slightly to reduce steepness and ringing * fixed incorrect h264 movie slowdown gap/overlap complaints * fixed DTS-HD High Resolution bitrate calculation * dithering is now done differently per channel v2.75 * added (E-)AC3 5.1 "EX" detection * added (E-)AC3 2.0 "Surround" detection * added (E-)AC3 2.0 "Headphone" detection * NeroAacEnc is now fed with up to 32bit float (if available) * resampling option "-quality=low|high|ultra" not supported, anymore * new option "-fast" switches SSRC resampler to fast, but low quality mode * new option "-r8brain" forces use of r8brain resampler instead of SSRC * added support for AES3 PCM streams in TS container * started working on encoder plugin interface v2.74 * "-demux" failed to work for DTS-HD and "TrueHD/AC3" tracks in v2.73 * fixed: DTS-HD tracks could make processing abort at the very end of the movie v2.73 * changed TS demuxing logic to make the broken (!) new SkyHD broadcasts work * DTS core and "TrueHD/AC3" AC3 parameters are displayed separately now * when using "-core" option, eac3to now bases its decisions on core parameters * added WAV/W64/RF64 read/write support for 32bit PCM and 32/64 bit float * option "-full" allows WAV/W64/RF64 output to be native (default <= 24bit PCM) * Surcode DTS encoding is now done with up to 32bit float (if available) * Aften AC3 encoding is now done with up to 64bit float (if available) v2.72 * fixed: per channel bitdepth analyzation didn't work correctly v2.71 * fixed: v2.70 detected Blu-Rays as "TS" without chapters and track languages * fixed: TrueHD downmixing to 2.0 didn't work v2.70 * added floating point support to the complete audio processing chain * added gain functionality, e.g. "-3db" or "+1db" * bitdepth analyzation is now done separately for each channel * fixed: when decoding lossy audio with libav, peaks were clipped incorrectly * fixed: libav MP1/2/3 decoder output was cut down to 24bit * fixed: with some EVO sources the AC3 track was not listed * fixed: if no key frame was found, h264 track in m2(ts) was not listed * fixed: video/audio data before first PAT/PMT was discarded * Blu-Ray chapters now don't contain link points, anymore, unless necessary * added 10db boost to LFE channel, when "-down2" and "-mixlfe" are used * ArcSoft output can now be overwritten to "-2", "-6", "-7" or "-8" channels v2.69 * added high precision SSRC resampler * resampling "-quality" now allows "low", "high" (SSRC) or "ultra" (r8brain) * resampling quality now defaults to "high" (SSRC) * bitdepth is now analyzed separately for original vs. processed data * fixed: downmixing 16 bit DTS tracks to 5.1 or 2.0 didn't work * fixed: Sonic Decoder was incorrectly assumed to decode XXCh DTS files to 6.1 * for movies the Haali Muxer can't handle "-seekToIFrames" is suggested now v2.68 * fixed crash when transcoding Blu-Ray/HD DVD track to FLAC v2.67 * information about HDCD and real bitdepth is now stored into FLAC metadata * information about real bitdepth is now read from FLAC metadata * PTS break: PTS is increased by 1 frame (fixes some false overlap warnings) * fixed: video gap log text was sometimes not correct (runtime information) * added undocumented switch "-neroaacenc="c:\whatever\neroaacenc.exe"" * error log messages are now output to stderr instead of stdout * improved "which mkvtoolnix is currently installed?" check * fixed: mkvtoolnix version check "Oct" date was not interpreted correctly v2.66 * changed eac3to to allow AAC encoding with 7.1 channels (for new Nero encoder) * fixed AGM creation for files bigger than 4GB * added support for Nero's new AAC Encoder download URL * lowered volume of error/success sounds * when there are 2 similar playlists the one with less chapters is ignored now v2.65 * automatic channel remapping for 6.1 tracks with wrong channel mask * automatic channel remapping for ArcSoft DTS decoder 6.1 tracks * fixed: TrueHD -> Surcode encoding didn't work, anymore * fixed: MPEG2 + h264 video gap/overlap removal didn't work properly v2.64 * added channel mask reading support to Blu-Ray PCM track parser * added channel mask reading support to TrueHD parser * added channel mask reading & writing support to FLAC decoder / encoder * changed 5.x channel mask from $03x to $60x * changed 6.x channel mask from $13x to $70x * mono wavs output now creates correct names for some channel masks * when transcoding 6.1 sources to PCM, 7 channel doubling is activated now * fixed: DTS channelmask detection was incorrect for very strange configs * fixed: sometimes the h264 video stream of a Blu-Ray m2ts was not detected v2.63 * fixed: incorrect detection of 6.0 DTS tracks as 5.0 * fixed: incorrect libav DTS channel remapping for 6.x or 7.x tracks * fixed: incorrect ArcSoft DTS channel remapping for "6.0" and "2/2.1" tracks * fixed: v2.61+62 incorrectly decoded 16bit TrueHD tracks to 24bit FLAC/WAV/RAW * fixed: some DTSWAV files made HDCD decoder crash * fixed: DTSWAV and AC3WAV samplerate and bitdepth were reported incorrectly * improved DirectShow channel configuration reporting * undocumented option -progressnumbers now outputs "analyze:" and "process:" v2.62 * fixed: downmixing 16 bit 7.1 DTS tracks to 5.1 stopped working in v2.61 v2.61 * option "-no7doubling" is not supported anymore * option "-double7" added which upconverts 6.1 to 7.1 * added read/write support for Sony wave64 (*.w64) format * added read/write support for RF64 wave64 (*.rf64) format * added write support for AGM format * true bitdepth (e.g. 18 bits) is written to extensible wav header now * when reading 16/24 (true/storage) WAV files, zero bytes are stripped now * added HDCD detection for WAV and FLAC files * added HDCD detection for PCM tracks in VOB/EVO/m2ts containers * added HDCD decoder written by Christopher Key * added new option "-decodeHdcd" to decode HDCD information * HDCD track -> lossy format: HDCD decoding is automatically activated * when DTS-MA and TrueHD tracks are decoded, a check for HDCD is done * fixed some incorrect DTS channel masks * added automatic libav DTS channel remapping * added automatic ArcSoft DTS channel remapping * added channel map manipulation to make funny DTS tracks decode with Sonic * added channel map manipulation to make funny DTS tracks decode with ArcSoft * added channel volume modification to undo ArcSoft mono surround splitting * for TrueHD+AC3 creation AC3 delay and gap correction are disabled now * fixed: DTSWAV and DTSAC3 readers reported too long runtime * fixed: sometimes processing aborted with a "bitdepth reducer" complaint v2.60 * fixed: in v2.59 "-analyzeBitdepth" stopped working for Blu-Ray TrueHD tracks v2.59 * extension ".thd+ac3" is supported now to define destination format * TrueHD tracks without AC3 core can be converted to TrueHD/AC3 now * demuxing a single-part Blu-Ray title keeps the original "TrueHD/AC3" data * demuxing a multi-part Blu-Ray title automatically redoes the AC3 substream * added workaround for Blu-Ray playlists with multiple last "invalid" parts * fixed: "-check" didn't work for LPCM tracks v2.58 * h264 parser rewritten: framerate, pulldown etc is detected reliably now * h264 pulldown is automatically removed from progressive movie sources now * h264 pulldown removal can be disabled by using "-keepPulldown" * h264 muxing now fully supports streams with mixed 23.976 and 29.970 content * h264 1920x1088 bitstream is now automatically patched/cropped to 1920x1080 * h264 filler data is now already removed during demuxing * h264 sources with funny framerates (e.g. Luxe.tv HD) are patched to 25fps now * mixed video/movie h264 streams are now always muxed with 29.970 timestamps * speedup/slowdown now changes framerate information in the h264 bitstream * options "-24p", "-60i" and "-30p" are no longer supported * fixed Blu-Ray seamless branching subtitle remuxing * added workaround for Blu-Ray playlists with a last small "invalid" m2ts part * bitdepth analyzation is now done for decoded FLAC, WAV, PCM, DTS MA, too * bitrate is now also reported for FLAC, WAV and PCM tracks * when encoding AC3, DTS or AAC, the encoding bitrate is reported * fixed: v2.57 incorrectly decoded 16bit TrueHD tracks to 24bit FLAC/WAV/RAW * (M2)TS discontinuities before the first unit start are ignored now * new option "-progressnumbers" replaces progress bar with percentage numbers v2.57 * added automated support for Nero AAC command line encoder * added "quality=0.xx" (0.00 - 0.99) parameter to control AAC encoder quality * added Nero AAC encoder check to the "-test" list * "-test" checks whether a new Haali Matroska Muxer version is available * "-test" checks whether a new MkvToolnix release build is available * "-test" checks whether a new MkvToolnix beta build is available * "-test" checks whether a new Nero AAC encoder version is available * added TRP container support (TS files without PMT/PAT) * parameter "-extensible" is no longer supported (it's default now) * new parameter "-simple" can be used to disable the "-extensible" wav header * decoded TrueHD tracks: bitdepth is now automatically analyzed in more detail * option "-analyzeBitdepth" manually activates extended bitdepth analyzation * DVB subtitle tracks are listed now - can't be demuxed, though * option "-check" doesn't fail on DTS Express tracks, anymore v2.56 * fixed: processing aborted when a VC-1 sequence end code was found v2.55 * AAC bitstream parser added * AAC auto detection added * AAC bitstream delay added * AAC bitstream gap/overlap correction added * AAC decoding (Nero & Sonic) added * old MP2 parser now "officially" and properly supports MP1, MP2 and MP3 * MP3 decoding (libav & Nero) added * added support for MPEG Audio version 2 and version 2.5 * added (limited) support for ID3, APE and LYRICS tags in MP3 and AAC tracks * improved VOB/EVO audio delay detection algorithm * detection and automatic skipping of invalid vob units * options "-60i" and "-24p" are no longer supported for MPEG2 video * improved detection of MPEG2 framerate / pulldown state / mode * improved MPEG2 muxing warnings * several bugs in MPEG2 video muxing fixed * fixed interlaced VC-1 muxing with user data (Nine Inch Nails) v2.54 * VC-1 pulldown removal rewritten (comparable to vc1conv 0.4, but faster) * VC-1 pulldown removal is activated by default * VC-1 pulldown removal can be manually deactivated by "-keepPulldown" option * VC-1 pulldown removal is also available and activated when muxing to MKV now * fixed Blu-Ray subtitle demuxing for seamless branching movies * better task separation when doing multiple operations with an audio track v2.53 * Blu-Ray PGS subtitle demuxing support added * added support for EVO/VOB subtitles which begin very late in the file * MPEG2 video muxing doesn't rely on GOP headers, anymore * all (M2)TS discontinuities are now reported with exact file position * fixed: reading language information from TS files didn't work correctly v2.52 * fixed muxing of MPEG2 broadcasts where "temporal_reference" overruns * MPEG2 bitstream headers are now updated correctly when speedup is performed * MPEG2 bitstream headers are now updated correctly when slowdown is performed * MPEG2 bitstream headers are now updated correctly when pulldown is removed * pulldown removal is now automatically disabled for MPEG2 broadcasts * AC3WAV (SPDIF formatted) support added v2.51 * DTS Express bitstream parser added * DTS Express auto detection added * DTS Express bitstream delay added * DTS Express bitstream gap/overlap correction added * DTS Express decoding (Nero & ArcSoft) added * fixed: 6.1 -> 7.1 channel doubling resulted in wrong channel order * added (undocum.) option "-no7doubling" to disable 6.1 -> 7.1 channel doubling * DTS tracks with funny speaker settings are displayed as "7.1 (strange setup)" * warning is displayed when decoding "7.1 (strange setup)" tracks with ArcSoft v2.50 * ArcSoft DTS Decoder DLL is now directly accessed instead of using DirectShow v2.49 * DTS parser sets correct channel mask now * DTS-HD parser now properly detects format, channels and samplerate * added support for ArcSoft DTS(-HD) Decoder * added several tweaks to make ArcSoft Decoder behave correctly * added ArcSoft test to the "-test" processing * made ArcSoft Decoder default for DTS and DTS-HD decoding v2.48 * 96kHz LPCM tracks in (M2)TS and EVO/VOB containers didn't work correctly * "Applying (E-)AC3 delay" now only shows if the bitstream is actually modified * fixed crash in MP2 reader when checking some PCM tracks * added support for MLP formats 13 - 16 * improved/corrected MLP channel descriptions * MLP parser sets correct channel mask * added proper channel remaps for libav MLP decoding of "funny" channel formats * added proper channel remaps for Nero MLP decoding of "funny" channel formats * added proper channel remaps for Nero AC3 decoding of "funny" channel formats * when doubling 7th channel the channel mask is set correctly now * channel mask is corrected if a decoder doesn't output all channels * channel mask is corrected if channel downmixing is performed v2.47 * improved detection of AC3/DTS tracks in TS/M2TS container * added support for Blu-Ray style LPCM tracks in TS container * fixed 44.1kHz AC3 tracks * fixed crazy audio delay values when no video track was detected * sometimes video/audio tracks were not properly detected in (M2)TS container * MPEG2 demuxing/remuxing incorrectly output the first sequence headers twice * sequence end codes are removed when demuxing video now, too * MPEG2 pulldown removal is automatically activated only for EVO HD sources now * MPEG2 pulldown removal can be manually activated by using "-stripPulldown" * MPEG2 pulldown removal can be disabled by using "-keepPulldown" v2.46 * MPEG2 muxing now fully supports streams with mixed 23.976 and 29.970 content * mixed video/movie MPEG2 streams are now always muxed with 29.970 timestamps * if a movie MPEG2 stream goes video, processing is automatically restarted * MPEG2 pulldown is now automatically removed whenever an MPEG2 stream is read * new option "-keepPulldown" can be used to disable MPEG2 pulldown removal * corrected default WAV channel masks for 4.0, 6.1 and 7.1 * added proper channel remaps for libav AC3 decoding of "funny" channel formats * added general channel mask support * WAV parser reads channel mask from extensible header * (E-)AC3 parser sets correct channel mask v2.45 * Blu-Ray angles are now reported as separate titles * duplicate playlists are not listed in the "folder view", anymore * reduced TrueHD and RAW/PCM gap/overlap threshold to 7ms * reduced (E-)AC3 gap/overlap threshold to 60% of the runtime of one audio frame * reduced MP2 gap/overlap threshold to 60% of the runtime of one MP2 frame * reduced DTS threshold to 60% of the runtime of one DTS frame, but at least 7ms * fixed: Blu-Ray chapter export sometimes wrote incorrect "00:00:00.000" items * improved handling of MPEG2 streams (changes from interlaced to progressive) * video information now shows "with pulldown flags", if applicable * removed "-ignoreDiscon" from help; hint is shown when a discontinuity occurs * added "-ignoreEncrypt" option; hint is shown when a source is encrypted * new option "-extensible" creates WAV files with a slightly different header * fixed some smaller bugs v2.44 * libav is now automatically used when Nero/Sonic decoders are not working * gap/overlap correction of RAW/PCM tracks sometimes aborted * rerunning de/remuxing to correct gaps/overlaps ignored RAW/PCM tracks * "lossless check failed" messages are surpressed on join points now v2.43 * added automatic Blu-Ray playlist parsing * added support for multi part (e.g. seamless branching) Blu-Ray titles * audio gap/overlap detection rewrite completed * added audio gap/overlap correction functionality * added Blu-Ray chapter support * log lines are now prefixed with a track identifier * RAW/PCM delay is used instead of bitstream delay, if possible * fixed: video framecount was missing v2.42 * added support for 16bit DTSWAV files * fixed: Blu-Ray TrueHD support was broken v2.41 * added full MP2 (MPEG2 audio) support including decoding + bitstream delay * added TS/M2TS runtime detection * improved VOB/EVO runtime detection * added TrueHD gap/overlap detection * audio gap/overlap detection logic rewritten (not complete yet) * fixed: log file option didn't work correctly * fixed: some DTS tracks in PAL TS broadcasts weren't detected correctly * fixed: some E-AC3 tracks in PAL TS broadcasts weren't detected correctly v2.40 * video framecount is now also shown for TS/M2TS demuxing/remuxing * "-check" option added to check container for corruption * TS/M2TS: discontinuity check sometimes fired false alarms * HD DVD subtitle language/description was not always correct * title listing is only shown if there are at least 2 titles * if there is only one title, the title is automatically selected * TS/M2TS audio delay detection was broken * improved audio delay detection for broadcasts and badly mastered discs * TS/M2TS video demuxing could eventually add some invalid data * new option "log=c:\whatever\log.txt" specifies the log file path/name v2.39 * simple audio transcoding was broken v2.38 * fixed file path handling bug v2.37 * added HD DVD chapter support * added HD DVD subtitle demuxing support * added pre-freeze detection for Haali Matroska Muxer bug * invalid characters are removed from file names now * log file is copied to destination path (of first destination file) v2.36 * TS/M2TS: discontinuity is only checked for tracks which are de- or remuxed * TS/M2TS: "-demux" creates both a "thd" and an "ac3" file for "thd/ac3" tracks * TS/M2TS: "eac3to source.m2ts movie.mkv" transcodes "thd/ac3" tracks to FLAC * M2TS: track language is displayed (if the file "xxxxx.clpi" is available) * TS: track language is displayed (if the source file contains this info) * video gaps/overlaps in the last 5 seconds of the movie are ignored now v2.35 * fixed broken EVO support v2.34 * TS/M2TS: fixed PAT/PMT reading bug * TS/M2TS: new "-ignoreDiscon" option makes eac3to ignore discontinuity errors v2.33 * added full TS and M2TS support (file joining not supported yet, though) * further improved "-demux" file names * help text and HD DVD track listing is now also written to the log v2.32 * added automatic "VPLST000.XPL" and "HVA00001.VTI" parsing * "eac3to" or "eac3to ." inside of a HD DVD folder lists all title sets * "eac3to someHdDvdMovieFolder" lists all title sets * "eac3to someHdDvdMovieFolder whatever.mkv" converts the longest title set * "eac3to someHdDvdMovieFolder x) whatever.mkv" converts the selected title set * EVO report now contains the EVO display name (if "VPLST000.XPL" is available) * added language to EVO audio track listing (if "VPLST000.XPL" is available) * added EVO audio track display names (if "VPLST000.XPL" is available) * sequence end codes are stripped from VC-1, MPEG2 and h264/AVC * put "-stripPulldown" option back in on request * option "-demux" now writes to "current directory" instead of source directory * option "-demux" now creates files with meaningful names * doing "eac3to src.evo dst.mkv" now creates audio files with meaningful names * doing "eac3to src.evo dst.mkv" writes the audio files to same path as the MKV * after successful (erroneous) processing "success.wav" (error.wav) is played v2.31 * DTSWAV input support added * fixed bitstream delaying of 96khz DTS tracks * improved DTS runtime calculation * fixed DTS audio gap/overlap correction for strange DTS formats * fixed E-AC3 audio gap/overlap correction for strange bitrates * fixed incorrect MKV "default duration" when using "-24p" or "-30p" * fixed incorrect MKV "default duration" when using "-slowdown" or "-speedup" * improved support for "open bitrate" DTS files * slightly improved automatic (E-)AC3 delaying exactness v2.30 * fixed wrong MPEG2 framerate (bug introduced in v2.29) v2.29 * added automatic audio gap/overlap correction for (E-)AC3, DTS(-HD) and LPCM * options "-slowdown" and "-speedup" can now also be used for video muxing * added support for muxing of EVO's secondary video track to MKV * added "-24p", "-30p" and "-60i" options to overwrite detected h264 framerate * fixed some MPEG2 muxing problems * temporarily disabled "-stripPulldown" because vc1conv 0.3 is better v2.28 * new "-seekToIFrames" switch makes Basic Instinct (h264) muxing work v2.27 * fixed h264/AVC muxing crash with some movies (due to too high RAM usage) * fixed missing frames at the end of the movie when doing h264/AVC muxing * fixed non-working "eac3to -test" v2.26 * Haali Splitter replaced with internal splitter for EVO h264/AVC tracks * external raw h264/AVC tracks can now be muxed directly to Matroska * timestamps for h264/AVC MKV videos don't need to be rewritten, anymore * gaps/overlaps in h264/AVC track of EVO files are detected now * h264 aspect ratio is detected and written into MKV now * Haali Media Splitter is not being used at all, anymore * mkvtoolnix is not being used at all, anymore * added detection for MPEG2 interlaced -> progressive mode change * workaround for eacGui bug v2.25 * fixed MPEG2 muxing for interlaced content v2.24 * Haali Splitter replaced with internal splitter for EVO MPEG2 tracks * external raw MPEG2 tracks can now be muxed directly to Matroska * timestamps for MPEG2 MKV videos don't need to be rewritten, anymore * gaps/overlaps in MPEG2 track of EVO files are detected now * VC-1 and MPEG2 aspect ratios are detected and written into MKV now * fixed bug with "-down2" option v2.23 * fixed bug which made some DTS tracks appear dirty although they weren't * fixed extremely big gap detection with Fantastic Four 2 * fixed non cleaned up gaps file bug v2.22 * gap/overlap logic changed completely (optional two pass muxing now) * "-ignoreGaps" parameter is gone v2.21 * latest libav MLP/TrueHD decoder fixes "lossless check failed" bug * latest libav MLP/TrueHD decoder supports & decodes 7.1 TrueHD tracks * Matroska muxing speed dramatically improved * eac3to now detects and handles E-AC3 7.1 tracks correctly * option "-core" extracts 5.1 core from E-AC3 7.1 tracks * added support for small DTS files (< 300kb) v2.20 * changed VC-1 muxing method to fix problems with several movies, e.g. - Unforgiven - Phantom of the Opera - Million Dollar Baby - Fantastic Four 2 * fps value is now also added to MKV header when muxing raw VC-1 stream * added new "-skip" option to skip corruption in the beginning of an EVO file * added extra handling which fixes some EVO authoring bugs v2.19 * fixed h264 bitstream parsing of framerate information format * fixed (again) muxing of some rare VC-1 titles like e.g. POTO USA v2.18 * fixed bug which stopped eac3to v2.15-17 from working on some PCs * fixed h264 bitstream parsing bug (Sum of all Fears) * fps value is added to MKV header now * relaxed VC-1 gap detection once more * TrueHD decoding to stdout fixed (always output as 24 bit now) v2.17 * fixed VC-1 pulldown removal * VC-1 pulldown removal must now be activated by the new option "-stripPulldown" * improved VC-1 gap/overlap detection * new option "-ignoreGaps" disables VC-1 gap/overlap detection * libav E-AC3 decoder background decoding removed again v2.16 * fixed "eac3to -test" crash * fixed "eac3to some.ddp some.wav" crash * made video gap/overlap detection a little more relaxed * WAV header is initialized to 4GB instead of 0GB (for stdout) * fixed incorrect "primary/secondary" text v2.15 * Haali Splitter replaced with internal splitter for EVO VC-1 tracks * external raw VC-1 tracks can now be muxed directly to Matroska * timestamps for VC-1 MKV videos don't need to be rewritten, anymore * some problematic VC-1 movies should mux fine to MKV now (e.g. POTO USA) * gaps/overlaps in VC-1 track of EVO files are detected and displayed now * pulldown can be removed from external raw VC-1 tracks now * pulldown is automatically removed when demuxing EVO VC-1 tracks now * updated to the latest revision of the libav E-AC3 decoder * some minor changes and bugfixes v2.14 * libav TrueHD decoder "end of stream" bug should be fixed now * fixed libav DTS decoder - subwoofer channels is properly decoded now, too * patched libav DTS decoder to output full 24 bit * updated to the latest revision of the libav E-AC3 decoder * when decoding E-AC3 with Nero, libav decoding is also executed at the same time v2.13 * added option to downmix multi channel audio to stereo * added support for VC-1 custom aspect ratios * added stdout output support v2.12 (thanks to Ron/drmpeg for all his help) * video resolution, framerate and mode (progressive/interlaced) are displayed * rewriting timestamps should now always write the correct framerate * after a full EVO/VOB processing the number of video frames is shown * EVO 16 bit and 24 bit LPCM demuxing supported now (need samples for 20 bit) * (E-)AC3 bitstream can be delayed now (similar to delaycut) * DTS bitstream can be delayed now (similar to delaycut) * DTS-HD High-Res and Master Audio bitstream can be delayed now * when demuxing bitstream audio tracks from EVO delay is automatically applied * some little bugs fixed v2.11 * libav E-AC3 decoding is without DRC now * libav AC3 decoding added (without DRC) * libav E-AC3 and AC3 decoding hacked to return full 24 bit * fixed: delay was not applied for lossless audio tracks * fixed crash when parsing PCM files without doing any conversion * TrueHD dialnorm was displayed incorrectly * changed 23.976 to 24/1.001 * fixed some more minor bugs v2.10 * fixed crash which occurred when doing "EVO/VOB -> Surcode DTS encoding" * "eac3to source.evo movie.mkv" syntax replaces "-auto" option * "eac3to 1.evo+2.evo movie.evo" syntax supported now for simple EVO/VOB joining v2.09 * EVO demuxing added with proper delays for all audio tracks * EVO file joining/rebuilding added * automated EVO video remuxing (Matroska) added * automated rewriting of Matroska timestamps to 24p via mkvtoolnix added * multiple operations on the source file can now be run at the same time * switch "-test" tests all external DirectShow filters and tools * latest ffmpeg/libav TrueHD and E-AC3 decoder patches included * latest libAften build included * libav TrueHD decoder is now the default decoder for TrueHD/MLP * support for libav DTS decoding added * fixed a whole lot of bugs (and might have added a few new ones) v2.08 * fixed: bitdepth reducer sometimes crashed when being fed a PCM file * fixed: FLAC encoder sometimes crashed when delay was applied * fixed: some TrueHD files were dithered/processed by Nero when they shouldn't * fixed: Surcode 1.0.29 encoding automation * fixed: source file was deleted when source and dest file names were identical * eac3to output is now always written to "log.txt" * when a crash occurs, "log.txt" is added to the bug report * improved help text + hints slightly * undocumented switch "-check16bit" added * undocumented switch "-mono" added v2.07 * fixed libAV MLP decoding support * added automatic MLP ID20 channel remapping * Surcode 1.0.29 (or newer) home directory detection added v2.06 * doing FLAC -> FLAC now copies metadata from source to destination file * MLP files are correctly decoded now (by both Nero and libav/ffmpeg) * runtime for padded DTS files is shown correctly now v2.05 * added support for libav/ffmpeg decoding of TrueHD/MLP and E-AC3 * added "-libav" switch to force libav decoding v2.04 * don't need dtsac3source.ax, anymore * don't need Nero Splitter, anymore * don't need Sonic HD Demuxer, anymore * replaced hacked DirectShow feeding with a cleaner approach * added support for DTS-HD Master Audio 7.1 tracks (only 5.1 decoding) * little performance boost for PAL speedup/down on DualCore CPUs * fixed some bugs v2.03 * new "-debug" switch added v2.02 * fixed: automatic registering of the dtsac3source filter crashed v2.01 * fixed: AC3 encoding sometimes crashed when being fed 24 bit audio data * fixed: AC3 encoded files were invalid when being fed 24 bit audio data * eac3toGUI didn't work with eac3to v2.0 * "eac3to source.ac3 dest.ac3 -slowdown" didn't do anything useful * when a crash occurs, the bug report is automatically copied to clipboard now * some minor cosmetic improvements v2.00 totally new features * AC3 decoding support (Nero's decoder without DRC/dialnorm) * resampling to 44.1/48/96 kHz (by using "r8brain") * apply/reverse PAL speedup (by using "r8brain") * "eac3to sourceFile" will print out source file details strongly enhanced features * dramatically improved performance (no intermediate files, anymore!) * proper 6.1/7.1 downmixing to 5.1 instead of just dropping the back surround channels * RAW/PCM file detection now auto detects channels, bitdepth and endian * WAV is now fully supported as source file format * destination file extension "PCM" creates Blu-Ray style LPCM tracks * bitdepth can be reduced to anything between 14 bits and 23 bits DTS related improvements/changes * DTS-96/24 support added * "open bitrate" support added * strange channel configuration support added * removal of zero padding from DTS files added * eac3to can fix broken DTS-ES files (they decode to 5.1 instead of 6.1 without the fix) * dialog normalization can be removed without removing the additional DTS-HD data now * core extraction must be specifically asked for now (see "-core" switch) AC3 related improvements * did I mention that eac3to can decode AC3 now? * strange channel configuration support added TrueHD related improvements * delay problem (hopefully) solved * fixed: sometimes some audio data in the middle of a track was lost * TrueHD/AC3 interweaved file can be stripped to TrueHD only now various minor improvements/changes * progress bar added * eac3to detects file format independently of file extension * multiple input files can be treated as one big file * "sox" is not needed, anymore * "dump" filter not needed, anymore * "aften.exe" replaced by "libAften.dll" * "flac.exe" replaced by "libFlac.dll" * DTS/DD+/AC3 source filter ships with eac3to now * 8bit support added * crash analyzer and bug reporting added v1.23 * bugfix: sometimes TrueHD decoding resulted in incorrect sampling rate v1.22 * 6.1 -> 7.1 channel doubling was sometimes incorrectly skipped * OS speaker settings now don't have to be 7.1, anymore * added detection of 5.1 output when 6.1 was expected * DTS and DTS-ES files are now forcefully patched to 24 bit by eac3to (workaround for Sonic decoder) * Sonic Audio Decoder is now always used by default for DTS decoding v1.21 * bugfix: 2 channel DTS files were not accepted * added: DTS-ES 6.1 support * added: DTS-HD High Resolution Matrix 5.1 support * added: DTS-HD Master Audio 6.1 support v1.20 * bugfix: some Blu-Ray TrueHD tracks were not accepted * change: eac3to output text slightly improved v1.19 * bugfix: still some TrueHD files were not accepted ("The source file format is unknown") * added: FLAC supported as source/input file format now * added: full delay functionality v1.18 * bugfix: some TrueHD files were not accepted ("The source file format is unknown") * change: EVO files are not accepted as source files, anymore * added: detection and repacking of 16 bit TrueHD tracks * added: proper detection of "DTS-HD Master Audio" and "DTS-HD High Resolution" tracks * added: runtime information for "DTS-HD High Resolution" tracks * bugfix: bitrate information for "DTS-HD High Resolution" tracks * added: decoding of "DTS-HD Master Audio" tracks (Sonic) * added: decoding of "DTS-HD High Resolution" tracks (Sonic) * added: decoding of conventional DTS tracks (Sonic/Nero) v1.17 * TrueHD dialog normalization removal added v1.16 * added decoding support for Blu-Ray TrueHD files v1.15 * bugfixes v1.14 * DTS dialog normalization can be removed now * DTS core can be extracted from DTS-HD track now v1.13 * "eac3to src.ac3 dst.ac3" removes dialog normalization from AC3 files * "eac3to src.eac3 dst.eac3" removes dialog normalization from E-AC3 files * "eac3to src.thd dst.ac3" extracts the AC3 frames from a Blu-Ray TrueHD track and removes dialog normalization v1.12 * tools "flac.exe", "aften.exe" and "sox.exe" are now distributed in the eac3to zip * correct channel mapping for 7.1 LPCM tracks is default now * new option "-down6" allows downconverting of 7.1 tracks to 5.1 * modded "flac.exe" ships with eac3to now, which has no problems with 2GB file output, anymore v1.11 * bugfix: (L)PCM -> DTS encoding automation failed when source and destination folders differed * added: new "-allowDnr" switch allows Nero's audio decoder to apply DNR * added: new "-keepDialnorm" switch disables removal of E-AC3 dialnorm information v1.10 * E-AC3 dialog normalization detection and removal * DRC turned off for Nero E-AC3 decoder * Surcode automation improved * Nero is now the default E-AC3 and TrueHD decoder * the flag "/nero" is no more * there is a flag "/sonic" now to force the use of the Sonic filters v1.09 * multi channel mono wav output added * automated SurCode DTS encoding added * 24bit PCM handling works now (was buggy before) * "-blu-ray" option removed * with PCM input files "bigendian" is default now * with 5.1 PCM input blu-ray style channel remapping is default now * switches "-16" and "-24" are valid for both TrueHD and PCM input now * eac3to now creates the WAV files on its own instead of using sox * target extension ".wavs" results in one mono wav for each channel being created * SurCode DVD DTS encoding automation added * new options "-768" and "-1536" for DTS encoding * TrueHD output is not downconverted to 16bit by default, anymore * new option "-down16" downconverts the raw data from 24 -> 16 bit (not limited to TrueHD input) v1.08 * added PCM input support * automatic detection of PCM bitdepth added (16bit or 24bit) * "-blu-ray" switch remaps PCM channels correctly v1.07 * added "-8" switch for 8 channel support v1.06 * mono E-AC3 support added v1.05 * support for 5.1 TrueHD audio tracks added v1.04 * E-AC3 files bigger than 4GB are supported now v1.03 * AC3 files bigger than 2GB are supported now v1.02 * FLAC encoding works now without any input/output size limits v1.01 * support for FLAC encoding added * bitrate can be specified via command line parameter * ffdshow removed from the filter chain * "ddp" and "ec3" file extensions are accepted now, too * fix: "dd+" file extension didn't work correctly. v1.00 * initial release * can convert a 2.0 or 5.1 channel E-AC3 file to AC3.
关于雷达方面的知识! EFFECTIVENESS OF EXTRACTING WATER SURFACE SLOPES FROM LIDAR DATA WITHIN THE ACTIVE CHANNEL: SANDY RIVER, OREGON, USA by JOHN THOMAS ENGLISH A THESIS Presented to the Department of Geography and the Graduate School of the University of Oregon in partial fulfillment of the requirements for the degree of Master of Science March 2009 11 "Effectiveness of Extracting Water Surface Slopes from LiDAR Data within the Active Channel: Sandy River, Oregon, USA," a thesis prepared by John Thomas English in partial fulfillment of the requirements for the Master of Science degree in the Department of Geography. This thesis has been approved and accepted by: Date Committee in Charge: W. Andrew Marcus, Chair Patricia F. McDowell Accepted by: Dean of the Graduate School © 2009 John Thomas English 111 IV An Abstract of the Thesis of John Thomas English in the Department of Geography for the degree of to be taken Master of Science March 2009 Title: EFFECTIVENESS OF EXTRACTING WATER SURFACE SLOPES FROM LIDAR DATA WITHIN THE ACTIVE CHANNEL: SANDY RIVER, OREGON, USA Approved: _ W. Andrew Marcus This paper examines the capability ofLiDAR data to accurately map river water surface slopes in three reaches of the Sandy River, Oregon, USA. LiDAR data were compared with field measurements to evaluate accuracies and determine how water surface roughness and point density affect LiDAR measurements. Results show that LiDAR derived water surface slopes were accurate to within 0.0047,0.0025, and 0.0014 slope, with adjusted R2 values of 0.35, 0.47, and 0.76 for horizontal intervals of 5, 10, and 20m, respectively. Additionally, results show LiDAR provides greater data density where water surfaces are broken. This study provides conclusive evidence supporting use ofLiDAR to measure water surface slopes of channels with accuracies similar to field based approaches. CURRICULUM VITAE NAME OF AUTHOR: John Thomas English PLACE OF BIRTH: Eugene, Oregon DATE OF BIRTH: January 1st, 1980 GRADUATE AND UNDERGRADUATE SCHOOLS ATTENDED: University of Oregon, Eugene, Oregon Southern Oregon University, Ashland, Oregon DEGREES AWARDED: Master of Science, Geography, March 2009, University of Oregon Bachelor of Science, Geography, 2001, Southern Oregon University AREAS OF SPECIAL INTEREST: Fluvial Geomorphology Remote Sensing PROFESSIONAL EXPERIENCE: LiDAR Database Coordinator, Oregon Department of Geology & Mineral Industries, June 2008 - present. LiDAR & Remote Sensing Specialist, Sky Research Inc., 2003 - 2008 GRANTS, AWARDS AND HONORS: Gamma Theta Upsilon Geographic Society Member, 2006 Gradutate Teaching Fellowship, Social Science Instructional Laboratory, 20062007 v VI ACKNOWLEDGMENTS I wish to express special thanks to Professors W.A. Marcus and Patricia McDowell for their assistance in the preparation of this manuscript. In addition, special thanks are due to Mr. Paul Blanton who assisted with field data collection for this project. I also thank the members ofmy family who have been encouraging and supportive during the entirety of my graduate schooling. I wish to thank my parents Thomas and Nancy English for always being proud of me. Special thanks to my son Finn for always making me smile. Lastly, special thanks to my wife Kathryn for her unwavering support, love, and encouragement. Dedicated to my mother Bonita Claire English (1950-2004). Vll V111 TABLE OF CONTENTS Chapter Page I. INTRODUCTION 1 II. BACKGROlTND 5 Water Surface Slope 5 LiDAR Measurements of Active Channel Features 7 III. STUDY AREA 10 IV. METHODS 22 Overview 22 LiDAR Data and Image Acquisition 23 Field Data Acquisition 24 LiDAR Processing 25 Calculation of Water Surface Slopes 27 Evaluating LiDAR Slope Accuracies and Controls 33 V. RESULTS 35 Comparison of Absolute Elevations from Field and LiDAR Data in Reach 1 35 Slope Comparisons 41 Surface Roughness Analysis 46 VI. DiSCUSSiON 51 VII. CONCLUSION 57 APPENDIX: ARCGIS VBA SCRIPT CODE 58 REFERENCES 106 IX LIST OF FIGURES Figure Page 1. Return Factor vs. LiDAR Scan Angle 2 2. Angle of Incidence 3 3. Wave Action Relationship to LiDAR Echo 3 4. Site Map 11 5. Annual Hydrograph of Sandy River 13 6. Oregon GAP Vegetation within Study Area 15 7. Photo of Himalayan Blackberry on Sandy River 16 8. Reach 1 Site Area Map with photo 18 9. Reach 2 Site Area Map 20 10. Reach 3 Site Area Map 21 11. LiDAR Point Filtering Processing Step 26 12. Field DEM Interpolated using Kriging 29 13. Reach 1 LiDAR Cross Sections and Sample Point Location 31 14. Differences Between LiDAR and Field Based Elevations 37 15. Regression ofLiDAR and Field Cross section Elevations 38 16. Comparison of LiDAR and Field Longitudinal Profiles (5, 10,20 meters) 40 17. Regression ofField and LiDAR Based Slopes (5, 10,20 meters) 42 18. Differences Between LiDAR and Field Based Slopes (5, 10,20 meters) 44 19. Relationship of Water Surfaces to LiDAR Point Density 47 20. Marmot Dam: Orthophotographyand Colorized Slope Model 50 21. LiDAR Point Density versus Interpolation 53 LIST OF TABLES T~k p~ 1. Reported Accuracies of 2006 and 2007 LiDAR 24 2. Results of LiDAR and Field Elevation Comparison 38 3. Results ofLiDAR and Field Slope Comparison (5, 10,20 meters) 45 4. Results of Reach 1 Slope Comparison 46 5. Water Surface Roughness Results for Reach 1,2, and 3 48 6. Results of Reach 1 Water Surface Roughness Comparison 49 7. Subset of Reach 3 Water Surface Roughness Analysis Near Marmot Dam 50 x 1 CHAPTER I INTRODUCTION LiDAR (Light Detection and Ranging) has become a common tool for mapping and documenting floodplain environments by supplying individual point elevations and accurate Digital Terrain Models (DTM) (Bowen & Waltermire, 2002; Gilvear et aI., 2004; Glenn et aI., 2005; Magid et aI., 2005; Thoma, 2005; Smith et aI., 2006; Gangodagamage et aI., 2007). Active channel characteristics that have been extracted using LiDAR include bank profiles, longitudinal profiles (Magid et aI., 2005; Cavalli et aI., 2007) and transverse profiles of gullies under forest canopies (James et aI., 2007). To date, however, no one has tested if LiDAR returns from water surfaces can be used to measure local water surface slopes within the active channel. Much of the reason that researchers have not attempted to measure water surface slopes with LiDAR is because most LiDAR pulses are absorbed or not returned from the water surface. However, where the angle of incidence is close to nadir (i.e. the LiDAR pulse is fired near perpendicular to water surface plane), light is reflected and provides elevations off the water surface (Figure 1, Maslov et aI., 2000). Where LiDAR pulses glance the water surface at angles of incidence greater than 53 degrees, a LiDAR pulse is 2 more often lost to refraction (Figure 2) (Jenkins, 1957). In broken water surface conditions the water surface plane is angled, which produces perpendicular angles of incidence allowing for greater chance of return (Maslov et al. 2000). Su et al. (2007) documented this concept by examining LiDAR returns off disturbed surfaces in a controlled lab setting (Figure 3). LiDAR returns off the water surface potentially provide accurate surface elevations that can be used to calculate surface slopes. 1.0 08 ~ 0.6 o t5 ~ E .2 ~ 04 02 00 000 __d=2° d=10 ° --d=200 --d=300 d=40o d=50o I I 2000 4000 60.00 sensing angle, degree I 8000 Figure 1. Return Factor vs. LiDAR Scan Angle. Figure shows relationship between water surface return and scan angle. Return Factor versus sensing angle at different levels of the waving d (d = scan angle). Figure shows the relationship of scan angle of LiDAR to return from a water surface. Return factor is greatest at low scan angles relative to the nadir region of scan. (Maslov, D. V. et. al. (2000). A Shore-based LiDAR for Coastal Seawater Monitoring. Proceedings ofEARSeL-SIGWorkshop, Figure 1, pg. 47). 3 reflected\\ :.;/ incident 1 I 1 . '\ I lAIR \ •••••••• ••••••••••••• •••••• ••••••••••••••••••••• • •• eo ••••••••••• o •••••••••••• _0 •••••••••• 0 ••• .•.•.•.•.•.•00 ,••••• ' 0•••• 0 ••••••••••• 0 ••I' .•.•.•.•.•.,................. .".0 ••••••••••••• , •••••••••••• , ••••••••••0••••. .....................................~ . ••••••••••••••••••••••••••••••••••••• • •••••••••••••••••••••••••• 0 •••••••••••••••••••• 0 ••••• 0 •• ~~~)}))}))})))))))))\..)}))?()))))))))))))))))j((~j< Figure 2. Angle of Incidence. Figure displays concept of reflection and refraction of light according to angle of incidence. The intensity of light is greater as the angle of incidence approaches nadir. (Jenkins, F.A., White, RE. "Fundamentals of Optics". McGraw-Hili, 1957, Chapter 25) 09 08 0.7 0.6 0.5 0.4 0.3 0.2 0.1 r - 0.\ O,j/6Y3- -500 17.5 35 52.5 70 horizonral scanning dislancC(lllm) 0.9 0.8 0.7 06 0.5 0.4 0.3 0.2 0.1 a b Figure 3. Wave Action Relationship to LiDAR Echo. "LiDAR measurements of wake profiles generated by propeller at 6000 rpm (a) and 8000 rpm (b). Su's work definitively showed LiDAR's ability to measure water surfaces, and the relationship of wave action to capability of echo. From Su (2007) figure 5, p.844 . This study examines whether LiDAR can accurately measure water surface elevations and slopes. In order to address this topic, I assess the vertical accuracy of LiDAR and the effects of water surface roughness on LiDAR within the active channel. Findings shed light on the utility of LiDAR for measuring water surface slopes in different stream environments and methodological constraints to using LiDAR for this purpose. 4 5 CHAPTER II BACKGROlJND Water Surface Slope Water surface slope is a significant component to many equations for modeling hydraulics, sediment transport, and fluvial geomorphic processes (Knighton, 1999, Sing & Zang, in press). Traditional methods for measuring water surface slope include both direct and indirect methods. Direct water surface slope measurements typically use a device such as a total station or theodolite in combination with a stadia rod or drop line to measure water surface elevations (Harrelson, et ai., 1994, Western et ai., 1997). Inaccuracies in measurements stem from surface turbulence that makes it difficult to precisely locate the water surface, especially in fast water where flows pile up against the measuring device (Halwas, 2002). Direct survey methods often require a field team to occupy several known points throughout a reach. This is a time consuming process, especially if one wanted to document water surface slope along large portions of a river. This method can be dangerous in deep or fast water. 6 Indirect methods of water surface slope measurement consist of acquiring approximate water surface elevations using strand lines, water marks, secondary data sources such as contours from topographic maps, or hydraulic modeling to back calculate the water depth (USACE, 1993; Western et aI., 1997). Variable quality of data and modeling errors can lead to inaccuracies using these methods. The use of strand lines and water marks may not necessarily represent the peak flows or the water surface. Contours may be calculated or interpolated from survey points taken outside the channel area. The most commonly used hydraulic models are based on reconstruction of I-dimensional flow within the channel and do not account for channel variability between cross section locations. LiDAR water surface returns have a great deal of promise for improving measurement of water surfaces in several significant ways. LiDAR measurements eliminate hazards associated with surveyors being in the water. LiDAR also captures an immense amount of elevation data over a very short period of time, with hundreds of thousands of pulses collected within a few seconds for a single swath. Within this mass of pulses, hundreds or thousands of measurements off the water's surface may be collected depending on the nature of surface roughness, with broken water surfaces increasing the likelihood of measurements (Figure 3). In addition, most terrestrial LiDAR surveys collect data by flying multiple overlapping flight lines, thus increasing the number of returns in off nadir overlapping areas and the potential for returns from water surfaces. 7 The accuracy of high quality LiDAR measurements is comparable to field techniques. The relative variability of quality LiDAR vertical measurements typically ranges between 0.03-0.05 meters (Leica, 2007), where relative variability is the total range of vertical error within an individual scan on surface of consistent elevation. Lastly, LiDAR has the ability to collect water surface elevations over large stretches of river within a single flight of a few hours. LiDAR Measurements of Active Channel Features Recent studies evaluating the utility of LiDAR in the active channel environment have documented the effectiveness of using LiDAR DTMs to extract bank profiles. Magid et al. (2005) examined long term changes of longitudinal profiles along the Colorado River in the Grand Canyon. The study used historical survey data from 1923 and differenced topographic elevations with LiDAR data flown in 2000. LiDAR with three meter spot spacing was used to estimate water surface profiles based on the LiDAR elevations nearest to the known channel. Cavalli et al. (2007) extracted longitudinal profiles of the exposed bed of the Rio Cordon, Italy using 0.5 meter LiDAR DEM cells. This study successfully attributed LiDAR DEM roughness within the channel to instream habitats. Bowen and Waltermire (2002) found that LiDAR elevations within the floodplain were less accurate than advertised by vendors and sensor manufacturers. Dense vegetation within the riparian area prevented LiDAR pulses from reaching the 8 ground surface resulting in accuracies ranging 1-2 meters. Accuracies within unvegetated areas and flat surfaces met vendor specifications (l5-20cm). James et al. (2007) used LiDAR at 3 meter spot spacing to map transverse profiles of gullies under forest canopies. Results from this study showed that gully morphologies were underestimated by LiDAR data, possibly due to low density point spacing and biased filtering of the bare earth model. Today, point densities of 4-8 points/m2 are common and would likely alleviate some of the troubles found in this study. Additional studies have used LiDAR to extract geomorphic data from channel areas. Schumann et al. (2008) compared a variety of remotely sensed elevation models for floodplain mapping. The study used 2 meter LiDAR DEMs as topographic base data for floodplain modeling, and found that modeled flood stages based on the LiDAR DEM were accurate to within 0.35m. Ruesser and Bierman (2007) used high resolution LiDAR data to calculate erosion fluxes between strath terraces based on elevation. Gangodagamage et al. (2007) used LiDAR to extract river corridor width series, which help to quantify processes involved in valley formation. This study used a fixed water surface elevation and did not attempt to demonstrate the accuracy of LiDAR derived water surfaces. Green LiDAR also has been used to examine riverine environments. Green LiDAR functions much like terrestrial LiDAR (which uses an infrared laser) except that green LiDAR systems use green light that has the ability to penetrate the water surface and measure the elevation of the channel bed. Green LiDAR is far less common than terrestrial LiDAR and the majority of studies have been centered on studies of ocean shorelines. Wang and Philpot (2007) assessed attenuation parameters for measuring bathymetry in near shore shallow water, concluding that quality bathymetric models can be achieved through a number of post-processing steps. Hilldale and Raft (2007) assessed the accuracy and precision of bathymetric LiDAR and concluded that although the resulting models were informative, bathymetric LiDAR was less precise than traditional survey methods. In general, it is often difficult to assess the accuracy of bathymetric LiDAR given issues related to access of the channel bed at time of flight. 9 10 CHAPTER III STUDY AREA The study area is the Sandy River, Oregon, which flows from the western slopes ofMount Hood northwest to the Columbia River (Figure 4). Recent LiDAR data and aerial photography capture the variety of water surface characteristics in the Sandy River, which range from shooting flow to wide pool-riffle formations. The recent removal of the large run-of-river Marmot Dam upstream of the analysis sites has also generated interest in the river's hydraulics and geomorphology. 11 545000 ,·......,c' 550000 556000 560000 Washington, I 565000 -. Portland Sandy River .Eugene Oregon 570000 ooo '~" ooo ~ ooo~ • Gresham (""IIIII/hill /flIt'r Oregon Clack. fna County Marmot Dam IHillshaded area represents 2006 LiDAR extent. Ol1hophotography was collected only along the Sandy River channel within the LiDAR extent. 10 KiiomElt:IS t---+---+-~I--+--+----t-+--+---+----jl 545000 550000 555000 560000 565000 570000 Figure 4. Site Map. Site area map showing location of analysis reaches within the 2006 and 2007 LiDAR coverage areas. Olihophotography was also collected for the 2006 study, but was collected only along the Sandy River channel. 12 Floodplain longitudinal slopes along the Sandy River average 0.02 and reach a maximum of 0.04. The Sandy River has closely spaced pool-riffles and rapids in the upper reaches, transitioning to longer sequenced pool-riffle morphology in the middle and lower reaches. The Sandy River bed is dominated by sand. Cobbles and small boulders are present mostly in areas of riffles and rapids. Much of the channel is incised with steep slopes along the channel boundaries. The flow regime is typical of Pacific Northwest streams, with peak flows in the winter months ofNovember through February and in late spring with snowmelt runoff (Figure 5). Low flows occur between late September and early October. The average peak annual flow at the Sandy River station below Bull Run River (USGS 14142500) is 106cms. Average annual low flow for the same gauge is 13.9cms. 13 USGS 14142500 SRNDY RIVER BL~ BULL RUN RIVER, NR BULL RUN, OR 200 k.===_~~~=~~~=.......==",,=~-........==~ ~....J Jan 01Feb Ollar 01Rpr O:t1ay 01Jun 01Jul 01Rug OJSep 010ct 01Nov O:IJec 01 2006 2006 2006 2006 2006 2006 2006 2006 2006 2006 2006 2006 \ 11 ~I\\ ,1\ 1\ j\ 1"J'fn I\. I, ) \ , ,;' ) I I" 'I'•., I I' I' ] 30000 ~~-~----~-------------~-------, o ~ 20000 ~ 8'-. 10000 ~ Ql Ql ~ U '001 ~ ::::J U, Ql to 1000 to .= u Co? '001 Cl )- .....J. a: Cl Hedian daily statistic <59 years) Daily nean discharge --- Estinated daily nean discharge Period of approved data Period of provisional data Figure 5, Annual Hydrograph of Sandy River. US Geological Survey gaging station annual hydrograph of Sandy River, Oregon at Bull Run River. Data from http://waterdata.usgs.gov/or/nwis/annual/ Vegetation is mostly a mixture of Douglas fir and western red hemlock (Figure 6). Other vegetation includes palustrine forest found in the upper portions of the study area, and agricultural lands found in the middle and lower portions. Douglas fir and western red hemlock make up 87% of vegetated areas, palustrine forest 5%, and agricultural lands 5%, the remaining 3% is open water associated with the channel and reservoirs (Oregon GAP Analysis Program, 2002). The city of Troutdale, OR abuts the lower reaches of the Sandy River. Along this stretch of river Himalayan blackberry, an invasive species, dominates the western banks (Figure 7). The presence of Himalayan blackberry is significant because LiDAR has trouble penetrating through the dense clusters of vines. When this blackberry is close to the water's edge it is difficult to accurately define the channel boundary. 14 15 545000 550000 555000 560000 565000 570000 Reach 3 10 !'<I':'ll1et-ars. I Oregon GAP Vegetation Washington 0 g 0 Ii: ~ Reach 1 I '~" ,. "~JO • Oregon Trout ale 0 0 0 8 00 '5"1 ~ g g '------' § I og l': 51 Agriculture Douglas Fir-W. Hemlock-W. Red Cedar Forest Grass-shrub-saplillg/Regeneratillg Forest Mixed Conifer/Mixed Deciduous Forest Open Water Palustrine Forest Red Alder-Big Leaf Maple Forest Urban oo o o~ 545000 550000 555000 560000 565000 570000 Figure 6. Oregon GAP Vegetation within Study Area. 1999 Oregon GAP Analysis data for Sandy River area. Map shows how the Sandy River area is dominated by Douglas fir forest with areas of palustrine forest and agricultural lands (Oregon Natural Heritage Program, 1999). 16 Figure 7. Photo of Himalayan Blackberry on Sandy River. Himalayan blackberry near mouth of the Sandy River March, 25th 2007. Photo by John English. This study focuses on three reaches of channel that represent a range of water surface conditions along the river. Reach 1 is a I80-m long pool-riffle reach located 3.7 river kilometers upstream from the mouth, and is where we collected field data shortly after the 2007 LiDAR flight (Figure 8a). The bed is sandy in this reach and can change dramatically during high flows. The bank full width of Reach 1 is approximately 108 meters at its widest point. At the downstream end of the riffle, the channel is constricted 17 by riprap placed along the banks as the river flows under a bridge. Vegetation comprises deciduous and conifer trees such as Douglas fir, hemlock, and cottonwoods. Blackberry is present along the channel, but is not so dense that it obscures the active channel boundary. 18 b. Figure 8. Reach 1 Site Area Map with Photo. Reach 1 site area. Top figure (a) shows approximate width at bank full and length of field data collections. Yellow circles represent points along stream margins where water surface elevations were surveyed. Bottom photo (b) looks downstream from total station location. 19 Reach 2 (Figure 9) is located approximately 23.5 kIn upstream from the mouth of the Sandy River and is 1,815 meters in length. The widest portion of channel at approximate bank full is 116m. The channel consists of a large meander with sinuosity of 1.38 and consists of six riffles and five pools spaced at regular intervals. The substrate consists of sands with small boulders and large cobbles dominating riffle areas. Cobbles and boulders have likely been introduced to the channel as a result of mass wasting. Douglas fir dominates along banks. 20 oJ> 0° 200 MetersO 0 ~~~~~~I O~~~OOO~ Figure 9. Reach 2 Site Area Map. Site map of Reach 2. Reach 2 contains 359 cross sections derived from LiDAR and 3,456 sample points. Inset map shows cross section sample locations derived from LiDAR and smooth/rough water surface delineations used in analysis. 21 Reach 3 is located 40.7km upstream from the mouth of the Sandy and is 2,815 meters in length (Figure 10). The widest portion of this section at approximate banle full is 88 meters. The upstream extent of the channel includes the supercritical flow of Marmot Dam. The channel is incised and relatively straight with a sinuosity of 1.08. Fine sands dominate the channel bed with some boulders likely present from mass wasting along valley walls. As with Reach 2, Douglas fir dominates bank vegetation along. 200 40) Inset mAp displays UDAR point I densily alol1g willl cross seellon Sanlpleing dala LiDAR cross section SAmple locations were used to eX1mcl poinl density values. 503 fOC I 000 '.1..Hrs 1-.,...--,.-+--=1..,=-,---4I--+-1---11 . Reach 3 Figure 10. Reach 3 Site Area Map. Site map of Reach 3. Inset map shows point LiDAR water surface points. Reach 3 contains 550 cross sections and 3,348 sample points. Visual examination of this map allows one to see how point density varies within the active channel. 22 CHAPTER IV METHODS Overview LiDAR data and orthophotography were collected in 2006 and additional LiDAR data were collected over the same area in 2007. Field measurements were obtained five days after the 2007 LiDAR flight in order to compare field measurements of water surface slope to LiDAR-based measurements. Time of flight field measurements of water surface elevations were not obtained for the 2006 flight, but the coincident collection of LiDAR data and orthophotos provide a basis for evaluating variability of LiDAR-based slopes over different channel types as identified from aerial photos. Following sections provide more detail regarding these methods. 23 LiDAR Data and Image Acquisition All LiDAR data were collected using a Leica ALS50 Phase II LiDAR system mounted on a Cessna Caravan C208 (see Table 1 for LiDAR acquisition specifications). The 2006 LiDAR data were collected October 2211d and encompassed 13,780 hectares of high resolution (2':4 points/m2 ) LiDAR data from the mouth of the Sandy River to Marmot Dam. Fifteen centimeter ground resolution orthophotography was collected September 26th , 2006 along the riparian corridor of the Sandy River from its mouth to just above the former site ofMarmot dam (Figure 4). The 2007 LiDAR were collected on October 8th and covered the same extent as the 2006 flight, but did not include orthophotography. Data included filtered XYZ ASCII point data, LiDAR DEMs as ESRI formatted grids at 0.5 meter cell size. Data were collected at 2':8 points per m2 providing a data set with significantly higher point density than the 2006 LiDAR data. The 2006 LiDAR data were collected in one continuous flight. 2006 orthophotography was collected using an RC30 camera system. Data were delivered in RGB geoTIFF format. LiDAR data were calibrated by the contractor to correct for IMU position errors (pitch, roll, heading, and mirror scale). Quality control points were collected along roads and other permanent flat features for absolute vertical correction of data. Horizontal accuracy ofLiDAR data is governed by flying height above ground with horizontal accuracy being equal to 1I3300th of flight altitude (meters) (Leica, 2007). 24 Table 1. Reported Accuracies of 2006 and 2007 LiDAR. Reported Accuracies and conditions for 2006 and 2007 LiDAR data. (Watershed Sciences PGE LiDAR Delivery Report, 2006, Watershed Sciences DOGAMI LiDAR Delivery Report, 2007). Relative Accuracy is a measure of flight line offsets resulting from sensor calibration. 2006 LiDAR 2007 LiDAR Flying height above ground level meters (AGL) 1100 1000 Absolute Vertical Accuracy in meters 0.063 0.034 Relative Accuracy in meters (calibration) 0.058 0.054 Horizontal Accuracy (l/3300th * AGL) meters 0.37 0.33 Discharge @ time of flight (cms) 13.05 20.8 - 21.8 LiDAR data collection over the Reach 1 field survey location was obtained in a single flight on October 8, 2007 between 1:30 and 6:00 pm. During the LiDAR flight, ground quality control data were collected along roads and other permanent flat surfaces within the collection area. These data were used to adjust for absolute vertical accuracy. Field Data Acquisition A river survey crew was dispatched at the soonest possible date (October 13, 2007) after the 2007 flight to collect ground truth data within the Reach 1. The initial aim was to survey water surface elevations at cross sections of the channel, but the survey was limited to near shore measurements due to high velocity conditions. We collected 187 measurements of bed elevation and depth one to fifteen meters from banks along both sides of the channel (Figure 8a) using standard total station longitudinal profile 25 survey methods (Harrelson, 1994). Seventy-six and 98 measurements were collected along the east and west banks, respectively, at intervals of approximately 1 to 2 meters. Thirteen additional measurements were collected along the east bank at approximately ten meter intervals. Depth measurements were added to bed elevations to derive water surface elevations. Discharge during the survey ranged between 22.5 and 22.7 cms during the survey of the east bank and remained steady at 22.5 cms during the survey of the west bank (USGS station 14142500). LiDAR Processing The goal ofLiDAR processing for this project was to classify LiDAR point data within the active channel as water and output this subset data for further analysis. The LiDAR imagery was first clipped to the active channel using a boundary digitized from the 2006 high resolution orthophotography. LiDAR point data were then reclassified to remove bars, banks, and overhanging vegetation (Figure 11). 26 Figure 11. LiDAR Point Filtering Processing Step. LiDAR processing steps. Top image shows entire LiDAR point cloud clipped to active channel boundary. Lower image shows the final processed LiDAR points representing only those points that reflect off the water surface. All bars and overhanging vegetation have been removed as well. 27 Water points were classified using the ground classification algorithm in Terrascan© (Soininen, 2005) to separate water surface returns from those off of vegetation or other surfaces elevated above the ground. The classification routine uses a proprietary mathematical model to accomplish this task. Once the ground classification was finished, classified points were visually inspected to add or remove false positives and remove in-channel features such as bar islands. A total of 11,593 of 1,854,219 LiDAR points were classified as water. Points classified as water were output as comma delimited x,y,z ASCII text files (XYZ), then converted to a 0.5 meter linearly interpolated ESRI formatted grid using ESRI geoprocessing model script. Calculation of Water Surface Slopes Water surface slopes were calculated using the rise over run dimensionless slope equation where the rise is the vertical difference between upstream and downstream water surface elevations and run is the longitudinal distance between elevation locations. LiDAR data is typically used in grid format. For this reason grid data were used for calculation of water surface slopes. We used linear interpolation to grid the LiDAR point data as this is the standard method used by the LiDAR contractor. In order to compare the LiDAR and field data it was also necessary to interpolate field 28 measurements to create a water surface for the entire stream. The field data-based DEM was created using kriging interpolation within ArcGIS Desktop Spatial Analyst (Figure 12). No quantitative analysis was performed to evaluate the interpolation method of the field-based water surface. The kriging interpolation was chosen because it producex the smoothest water surface based on visual inspection when compared to linear and natural neighbor interpolations, which generated irregular fluctuations that were unrealistic for a water surface. The kriged surface provided a water surface elevation model for comparative analysis with LiDAR. 29 Figure 12. Field DEM Interpolated using Kriging. Field DEM interpolated from field survey points using kriging method found in ArcGIS Spatial Analyst. DEM has been hiIlshaded to show surface characteristics. The very small differences in water surface elevations generate only slight variations in the hillshadeing. To compare LiDAR and field-based water surface slopes, water surface elevations from the LiDAR and field-based DEMS were extracted at the same locations along Reach I. To accomplish this, 37 cross sections were manually constructed at approximately Sm spacings (Figure 13). Cross sections comparisons were used rather than point-to-point comparisons between streamside field and LiDAR data points because the cross sections provide water surface slopes that are more representative of the entire channel. The Sm interval spacing was considered to be a sufficient for fine resolution slope extraction. Because cross section center points were used to calculate the longitudinal distance and because the stream was sinuous, the projection of the cross sections from the center line to the banks led to stream side distances between cross sections that differed from Sm. 30 31 Smooth 125 Meters I 100 I 75 I 50 I 25 I Cross Sections Cross Section Data Roughness Delineation Cross Section Sample Locations _ Rough oI ~ each 1 Figure 13. Reach 1 LiDAR Cross Sections and Sample Point Locations. Reach I LiDAR-derived cross section sample locations and areas of smooth and rough water surface delineations. 37 cross section and 444 sample points lie within Reach 1. 32 Cross sections were extracted using a custom ArcObjects VBA script (Appendix A). This script extracted 1 cell nearest neighbor elevations along the transverse cross sections at 5 meter intervals creating 444 cross section sample locations (Figure 13). Cross section averages were calculated using field-based and LiDAR-based elevation water surface grids. The average cross sectional elevation value for field and LiDAR data were then exported to Excel files, merged with longitudinal distance between cross section, and used to calculate field survey-based and LiDAR-based slopes between cross sections. Reaches 2 and 3, for which only LiDAR data were available, were sampled using the same cross sectional approach used in Reach 1. The data extracted from these reaches were used to characterize how LiDAR-based elevations, slopes and point densities interact with varying water surface roughness. Within Reach 2, 359 cross sections were drawn and elevations were sampled every five meters along each cross section creating 3,456 cross section sample locations (Figure 9). Reach 3 contained 550 cross sections and 3,348 cross section sample locations (Figure 10). Slopes were calculated between each cross section. 33 Evaluating LiDAR Slope Accuracies and Controls The accuracy of elevation data is the major control on slope accuracy, so a comparative analysis was performed using field survey and LiDAR elevations. First, field-based and LiDAR slopes were calculated at distance intervals of five, ten and twenty meters using average cross section elevations to test the sensitivity of the slopes to vertical inaccuracies in the LiDAR data. The field and LiDAR elevations were differenced using the same points used to create average cross section elevations. Differences were plotted in the form of histogram and cumulative frequency plot after transforming them into absolute values. Descriptive statistics were calculated to examine the range, minimum, maximum, and mean offset between data sets. Finally LiDAR and field-based values were compared using regression analysis. This study also examined the effects of water surface roughness on LiDAR elevation measurements, LiDAR point density, and LiDAR derived water surface slopes. Each reach was divided into smooth and rough sections based on visual analysis of the orthophoto data. One-meter resolution slope rasters were created from the LiDAR water surface grids using ArcGIS Spatial Analyst. One meter resolution point density grids were created from LiDAR point data (ArcGIS Spatial Analyst). Using the cross section sample points, values for water surface type, elevation, slope, and point density were extracted within each reach. Point sample data were transferred to tabular format, and average values were generated for each cross section. These tables were used to calculate 34 descriptive statistics associated with water surfaces such as elevation variance, average slope variance, average point density, and average slope. It is assumed in this study that smooth water surfaces are associated with pools and thus ought to have relatively low slopes. Conversely rough water surfaces are assumed to be representative of riffles and rapids, and thus ought to have relatively steeper slopes. Reach 1 contains field data, so slopes from LiDAR and field data were compared with respect to water surface conditions as determined from the aerial photos. 35 CHAPTER V RESULTS Results of this study encompass three analyses. Elevation analysis describes the statistical difference between LiDAR and field-based water surface elevations for Reach 1. Slope analysis compares LiDAR derived and field-based slopes calculated at 5, 10, and 20m longitudinal distances. These analyses aim to quantify both slope accuracy and slope sensitivity. Lastly, water surface analysis examines the relationship between LiDAR measured water surface slopes, point density, and water surface roughness. Comparison of Absolute Elevations from Field and LiDAR Data in Reach 1 The difference between water surface elevations from LiDAR affects the numerator within the rise over run equation, which in tum affects slope. This elevation analysis evaluation quantifies differences between field and LiDAR data. LiDAR-based cross section elevations were differenced from field-based cross section elevations. Difference values were examined through statistical analysis. 36 In terms of absolute elevations relative to sea level, the majority of LiDAR-based water surface elevations were lower than field-based elevations, although the LiDAR elevations were higher in the upper portion ofReach 1. Differences ranged between -0.04 and 0.05m with a mean absolute difference between field and LiDAR elevations of 0.02m (Figure 14 and Table 2). The range of differences is within the expected relative accuracies of LiDAR claimed by the LiDAR provider. Elevations for field and LiDAR data are significantly correlated with an R2 of 0.94 (Figure 15). The negative offset was expected given that discharge at time of LiDAR acquisition was lower than discharge at time of field data acquisition. Discharge during field acquisition ranged between 22.5 and 22.7 cfs, while discharge during LiDAR acquisition was between 20.8 and 21.8cfs. The portion of Reach 1 where LiDAR water surface measurements were higher than field measurements may be related to difference in discharge or change in bed configuration. Overall results showed that LiDAR data and field-based water surface measurements are comparable. 37 Distribution of Elevation Differences Between Field and LiDAR Water Surfaces 10 9 8 7 >. 6 u r:: ell 5 :l C'" ~ 4 u.. 3 2 0+---+ -0.05 -0.04 -0.03 -0.02 -0.01 0 0.01 0.02 0.03 0.04 0.05 More Elevation Difference, Field - L1DAR (m) Figure 14. Differences Between LiDAR and Field Based Elevations. Elevation difference statistics between cross sections derived from field and LiDAR elevation data. Positive differences indicate that field-based elevations were higher than LiDAR; negative differences indicate LiDAR elevations were higher. Values on x axis represent minimum difference within range. For example, the 0.01 category includes values ranging from 0.01 to 0.0199. y-1.18x-1.03 .... R2 =0.94 ""..,; I •• ./... ./ .- ./ • ./ • ./. /""I ./iI ../. _._~. -? , 38 Table 2. Results of LiDAR and Field Elevation Comparison. Descriptive and regression statistics for absolute difference lField - LiDARI values between cross section elevations. All units in meters. Sample size is 37. Mean 0.028 Median 0.030 Standard Deviation 0.013 Kurtosis -0.640 Skewness -0.484 Range of difference 0.093 Minimum difference 0.002 Absolute maximum difference 0.047 Confidence Level(95.0%) (m) 0.004 Elevation Comparison of Field and LiDAR Water Surface Elevations 5.72 5.70 ~_ 5.68 g 5.66 :0:; I1l 5.64 > iii 5.62 ell 5.60 () ~ 5.58 ~ 5.56 ~ 5.54 1\1 5.52 ~ IX 5.50 <C 5.48 o :J 5.46 5.44 5.42 5.46 5.48 5.50 5.52 5.54 5.56 5.58 5.60 5.62 5.64 5.66 5.68 5.70 Field Water Surface Elevation (m) Figure 15. Regression of LiDAR and Field Cross Section Elevations. Regression of field-based (x) and LiDAR-based (y) cross section elevations. 39 Comparison of longitudinal profiles offield and LiDAR water surfaces shows a clear relationship in overall shape (Figure 16), capturing similar trends in longitudinal profiles. Figure 16 shows field and LiDAR profiles become more similar in shape as distance between cross sections increases. In terms of overall shape, the greatest differences occur in the upper 30 m, where LiDAR-based profiles demonstrate a higher slope than do field-based measurements. Because of the five day lag between LiDAR and field measurements in this mobile bed stream, it is impossible to know the degree to which this difference represents error in measurements or real change in the system. 40 5 meter Longitudinal Profile Comparison 20 40 60 80 100 120 140 160 180 5.75 .s 5.70 ~" _ • •• • :. 5 <reter Field Profile II:: 5.65 ...- .=....:....:l..,... H.T• tI.:!..~.....~.Io-,•..-..;.....-.------j. 5rreterL,DARprof,lel- ..0.._. 5.60 .. • •• ~ 5.55 -1------------ .~•.~•.-.-.-------- ~ 5.50 +---------------"''-.--'~~ ~.. ,~ "yT1I:!'-'--- W 5.45 -1---------------.-::..---'.1-.........-- ...:I:C"IL'J-"---- 5.40 -t------,----,---------,----,------,----,---------,----,---------, o Longitudinal Distance Down Stream (m) A 10 meter Longitudinal Profile Comparison 5.75 5.70 . • [,.10 rreler Field Profile! I: I 5.65 • • , . • • • 10 rreter LiDAR Profile • • • I:: 5.60 • • 0 :;:; • • >Cll 5.55 • • ~ • • w 5.50 • • • • • • • • • 5.45 5.40 0 20 40 60 80 100 120 140 160 180 Longitudinal Distance Down Stream (m) B 20 meter Longitudinal Profile Comparison 5.75 5.70 • ,. 20 <reter Field Profile .s 5.65 • . • • • 20 rreler LiDARProfile • I:: 5.60 • 0 :;:; >Cll 5.55 •• Q) W 5.50 •• • , 5.45 . 5.40 0 20 40 60 80 100 120 140 160 180 Longitudinal Distance Down Stream (m) C Figure 16. Comparison of LiDAR and Field Longitudinal Profiles (5, 10, 20 meters). Longitudinal profiles of a) 5 meter, b) 10 meter, and c) 20 meter cross section elevations. 41 Slope Comparisons Slope in this study is calculated as the dimensionless ratio of rise over run. As noted in the Methods section, slopes were calculated over three different horizontal intervals to test the sensitivity of the LiDAR's internal relative accuracy. Differences in Sm LiDAR and field-based slopes derived from cross sections reveal substantial scatter (Figure l7a), although they clearly covary. Ten meter interval slopes show a stronger relationship (Figure 17b), while slopes based on cross sections spaced 20 m apart have the strongest relationship (Figure l7c). The slope associated with regression of field and LiDAR elevation data is not approximately 1 as one might expect. This is because LiDAR elevations are higher than field elevations at the upstream end of the reach, and lower at the downstream end. 42 5m Slope Comparison -c: ~ -0:: Q) (/l ~ ~.01 Q) C. .2 en 0:: « 0 ::i A -c: ~ 0:: --Q) (/l i2 -0.01 Q) C. 0 en 0:: « 0 ::i B 0.004 = 0.58x - 0.001 R2 = 0.38 ~.008 -0.008 Field Slope (Rise/Run) 10 meter Slope Comparison 0.004 y = 0.63x - 0.001 R2 = 0.51 -0.008 -0.008 Field Slope (Rise/Run) 20 meter Slope Comparison • 0.004 0.002 0.004 C :::l -0:: Q) (/l i2 ~.01 -Q) c. o Ci5 0:: « o~ 0.004 =0.66x - 0.001 R2 = 0.80 ~.008 ~.006 -0.008 Field Slope (Rise/Run) 0.002 0.004 C Figure 17. Regression of Field and LiDAR Based Slopes (5,10,20 meters). Scatter plots showing comparisons between slope values calculated at distance intervals of a) 5 meters, b) 10 meters, and c) 20 meters. 43 Figure 18 shows how the range of differences between LiDAR and field-based water surface slopes decrease as longitudinal distance increases. Five meter slope differences ranged between -0.004 and 0.004 (Figure 18a). Ten meter slope differences ranged between -0.002 and 0.003 (Figure 18b). Twenty meter slope differences ranged between 0 and 0.002 (Figure 18c). 44 Differences of Slope at 5m Between Field and LiDAR 10 » 8 0c Ql 6 :J 0" 4 .Q..l u. 2 0 SIll>< SIl"> SIll\- ~<::J <;:><::J <;:><::J SIl" ~ SIl" SIll\- SIl"> SIll>< ~/l, r;:,<::J ~'::; ~'::; ~'::; ~'::; ~o Slope Difference (Field-LiDAR) A Differences of Slope at 10m Between Field and L1DAR 7 6 ~ 5 lii 4 :J 0" 3 ~ u. 2 1 o +---+--~--;..J SIll>< ~<::J Slope Difference (Field-LiDAR) B Differences of Slope at 20m Between Field and LiDAR 4 ~~I\- ~~" ~ ~~" ~~I\- ~~"> ~~I>< o"/l, <;:>.~. ~.~.~.~. ~ Slope Difference (Field-LiDAR) o +---+--+--+--t- SIll>< SIl"> <;:><::J <;:><::J ~ 3 c Ql :J 2 0" ~ U. C Figure 18. Differences Between LiDAR and Field Based Slopes (5, 10,20 meters). Histogram charts showing difference values between field and LiDAR derived slopes at a) 5 meter slope distances, b) 10 meter slope distances, and c) 20 meter slope distances. 45 The mean difference between slopes decreases from 0.0017 to 0.0007 as slope distance interval is increased. Maximum slope difference and standard deviation of offsets decrease from 0.001 to 0.0005 and 0.0047 to 0.0014 respectively. Regression analysis of these data show a significant relationship for all three comparisons, and adjusted R2 increased from 0.357 to 0.763 with slope distance interval (Table 3). Table 3. Results of LiDAR and Field Slope Comparison (5, 10,20 meters). Descriptive and regression statistics for offsets between field and LiDAR derived slope values (Field minus LiDAR). Slope values are dimensionless rise / run. All data is significant at 0.01. Distance Interval 5m 10m 20m Mean 0.0017 0.0012 0.0007 Standard Deviation 0.0010 0.0007 0.0005 Range of Difference 0.0080 0.0047 0.0024 Minimum difference 0.0000 0.0000 0.0001 Maximum difference 0.0047 0.0026 0.0015 Count 36 16 8 Adjusted R squared 0.36 0.47 0.76 Water surface slope for the entire length of Reach 1 (l59.32m) was compared and yielded a difference of 0.0005. This difference is smaller (by 0.0002) than the difference between 20 meter slope (Table 4). Slope was calculated by differencing the most upstream and downstream cross sections and dividing by total length of reach. Differences between LiDAR and field-based slopes may represent real change due to the five day lag between data sets and difference in discharge. 46 Table 4. Results of Reach 1 Slope Comparison. Comparison of slopes calculated using the farthest upstream and downstream cross section elevation values. Slope values have dimensionless units stemming from rise over run. Upper Lower Reach Elevation (m) Elevation (m) Len2th (m) Slope Field 5.652 5.491 159.32 -0.0010 LiDAR 5.697 5.455 159.32 -0.0015 Surface Roughness Analysis Water surface condition was characterized as smooth or rough based on 2006 aerial photography (Figure 19). Surface roughness was examined to understand its effect on LiDAR data within the active channel, as well as LiDAR's ability to potentially capture difference in water surface turbulence. Table 5 shows statistics with relation to water surface condition for all three reaches. 47 Figure 19. Relationship of Water Surfaces to LiDAR Point Density. 2006 aerial photos were used to delineate rough and smooth water surfaces. Image on left shows a transition between rough water surface (seen as white water) and smooth water surface (seen as upstream pool). Image on right shows LiDAR point density in points per square meter. In all reaches point density, variance of elevations, and water surface slopes were significantly higher in rough surface conditions. These results indicate that LiDAR point density is directly related to the roughness of a water surface and that is capturing the rough water characteristics one would expect in areas where turbulence generates surface waves. 48 Table 5. Water Surface Roughness Results for Reach 1,2, and 3. Water surface statistical output for rough and smooth water surface of Reaches 1, 2, and 3. Results within table represent average values for each Reach. Slope values have dimensionless units from rise over run equation derived from ESRI generated slope grid. Point density values based on points/m2 • Elevation variance in meters. Reach 1 Reach 2 Reach 3 Rou~h water No. of Sample Points 153 1981 1968 Avg Slope -0.013 -0.011 -0.007 Point Density (pts/mL ) 1.195 1.002 1.217 Elevation Variance (m) 0.003 0.018 0.041 Smooth water No. of Sample Points 290 1474 1378 Avg Slope 0.0075 -0.0006 -0.0033 Point Density (pts/mL ) 0.149 0.550 0.480 Elevation Variance (m) 0.001 0.0077 0.024 Within Reach 1, cross section elevations were separated into rough and smooth water conditions and slopes were calculated using field and LiDAR data sets (Table 6). Again, results showed that rough water surfaces have greater slopes than smooth water surfaces. The smooth water surface of Reach 1 yielded a larger discrepancy between field and LiDAR derived slopes compared to rough water surface. This is because small differences between LiDAR and field elevations generate larger proportional error in the rise / run equation when total elevation differences between upstream and downstream are small. 49 Table 6. Results of Reach 1 Water Surface Roughness Comparison. Reach 1 water surface roughness slope analysis. Reach 1 was divided into smooth and rough water surfaces based upon visual characteristics present in aerial photography. Slopes were calculated for each area and compared with field data to examine accuracy. Surface Reach Upper Lower Slope Type Lenl!th (m) Elevation (m) Elevation (m) Slope Difference Field Smooth 83.11 5.652 5.642 -0.0001 N/A LiDAR Smooth 83.11 5.697 5.612 -0.0010 0.0009 Field Rough 71.73 5.635 5.491 -0.0020 N/A LiDAR Rough 71.73 5.592 5.455 -0.0019 -0.0001 Prior to collections of the 2007 data, Reach 3 contained the former Marmot Dam that was dismantled on October 19th , 2007 (Figure 20). The areas at and directly below the dam are rough water surfaces. The super critical flow at the dam yielded a slope of - 0.896 (Table 7). The run below the dam contained low slope values of less than -0.002. Both the dam fall and adjacent run yielded high point densities of greater than 2 points per square meter. 50 Cross Sections o Cross Section Sample Locations L1DAR derived Slope Model Value Higll 178814133 25 50 75 100 125 150 ~.',eters I I I I I I La,·, 0003936 Figure 20. Marmot Dam: Orthophotography and Colorized Slope Model. Mannot Dam at far upstream portion of Reach 3. Image on left shows dam site in 2006 orthophotography. Image on right shows the increase in slope associated with the dam. Marmot Dam was removed Oct. 19th , 2007. Table 7. Subset of Reach 3 Water Surface Roughness Analysis Near Marmot Dam. Subset of Reach 3 immediately surrounding Marmot Dam roughness analysis containing values for Mannot Dam. The roughness results fell within expectations showing increases in slope at the dam fall and high point densities at the dam fall and immediate down stream run. Habitat Type Avg Slope Point Density Point Density Variance Dam Fall -0.896 2.284 1.003 Dam Run -0.001 2.085 5.320 51 CHAPTER VI DISCUSSION The elevation analysis portion of this study shows that LiDAR can provide water surface profiles and slopes that are comparable to field-based data. The differences between LiDAR and field based measurements can be attributed to three potential sources. The first is the relative accuracy of the LiDAR data which has been reported between O.05m and O.06m by the vendor. The second source can be associated with the accuracy of field based measurements which are similar to the relative accuracy of the LiDAR (O.03m-O.05m). Lastly, the discharge differed between field data collection and LiDAR collection by O.02cms. It is possible that much of the O.05m difference observed through most of the Reach 1 profile (Figure 16) could be attributed to the difference in discharge and changes in bed configuration, but without further evidence, the degree of difference due to error or real change cannot be identified. Even if one attributes all the difference to error in LiDAR measurements, the overall correspondence ofLiDAR and field measurement (Figure 15 and 16) indicates that LiDAR-based surveys are useful for many hydrologic applications. 52 In the upper portion of the reach, the profiles display LiDAR elevations that are higher than the field data elevations, whereas the reverse is true at the base of the reach. This could be a function of difference in discharge between datasets, change in bed configuration, or an artifact of low point density. Low density of points forces greater lengths of interpolation between LiDAR points leading to a coarse DEM (Figure 21). Overall, the analysis Reach 1 profile indicates that LiDAR was able to match the fieldbased elevation measurements within ±O.05m. 53 Rough & Smooth Wa~t:e:-r~S~u=rf;:a~c:e:s~rz~~J,;~~ Grid Interpolation in Low Point Density Figure 21. LiDAR Point Density versus Interpolation. Side by side image showing long lines of interpolation associated with smooth water surfaces (right image). Smooth water surfaces tend to have low LiDAR point density. The image on the right shows a hillshade ofthe LiDAR DEM. The DEM has been visualized using a 2 standard deviation stretch to highlight long lines of interpolation. The comparability of LiDAR and field-based slopes showed a significant trend with increasing downstream distances between cross sections. Adjusted R2 values increased from 0.36 to 0.76 and the range of difference between field and LiDAR based slopes decreased from 0.0047 to 0.00 14 as longitudinal distance increased from 5 to 20- 54 m. This suggests that the 0.05m of expected variation of LiDAR derived water surface elevation has less effect on water surface slope accuracy as distance between elevation measurements points increases. Likewise, slopes accuracies along rivers with low gradients will improve as the longitudinal distance between elevation points increases. Overall, data has shown that LiDAR can measure water surface slopes with mean difference relative to field measurements of 0.017, 0.012, and 0.007 at horizontal distances of 5, 10, and 20 meters respectively. Although the discrepancy between field and LiDAR-based slopes is greatest at 5-m intervals, the overall slopes (Fig 17) and longitudinal profiles (Fig 16) even at this distance generally correspond. The use of a 5m interval water surface slope as a basis for comparison is really a worst case example, as water surface slopes are usually measured over longer reach scale distances where the discrepancy between LiDAR and field-based measurements is lower. The continuous channel coverage and accuracies derived from LiDAR represent a new level of accuracy and precision in terms of spatial extent and resolution of water surface slope measurements. Analysis of surface roughness found that rough water surfaces had significantly higher point densities than smooth water surfaces. Rough water surfaces averaged at least 1 point/m2 , while smooth water surfaces averaged less than 1 point/2m2 • Longitudinal profiles of Reach 1 indicate the most accurate water surface measurements occur in areas of higher point density (Fig. 16). Future applications that attempt to use 55 LiDAR to measure water surface slope ought to sample DEM elevations from high point density areas of channel. Water surface analysis also showed trends relating water surface roughness and slope. Rough water surfaces for all three analysis reaches averaged larger average slope values than smooth water surfaces. This is because rough water surfaces are commonly associated with steps, riffles, and rapids. All three of these habitat types are areas have higher slopes than smooth water habitats. Smooth water surfaces are commonly associated with pools or glides, which would be areas of lower slope. Future research should examine the potential for using LiDAR to characterize stream habitats based on in-stream point density and slope. This study is not without its limitations. The field area used to test the accuracy of LiDAR is only representative of a small portion of the Sandy River. Comparisons of field and LiDAR data would be improved by having mid-channel field data. One might also question the use of field based water surface slopes as control for measuring "accuracy". Water surface slope is difficult to measure for reasons stated earlier in this paper. One might make the argument that there is no real way to truly measure LiDAR accuracy of water surface slope, and that LiDAR and field based measurements are simply comparable. In this context, LiDAR holds an advantage over field based measurements given its ability to measure large sections of river in a single day. LiDAR has a distinct advantage over traditional methods of measurement in that measurements are returned from the water surface, and consequently not subject to errors 56 associated with variability of surface turbulence piling up against the measuring device. LiDAR can also capture long stretches of channel within a few seconds reducing the influence of changes in discharge. LiDAR data in general does have its limitations. LiDAR data are only as accurate as the instrumentation and vendor capabilities. LiDAR must be corrected for calibrations and GPS drift to create a reliable data set, and not all LiDAR vendors produce the same level of quality. LiDAR data may be more accurate in some river reaches than others. The study reaches of this study contained well defined open channels, which made identifying LiDAR returns off the water surface possible. Both LiDAR data sets were collected at low flows. Flows that are too low or channels that are too narrow may limit ability to extract water surface elevations because of protruding boulders or dense vegetation that hinders accurate measurements. In some cases vegetation within and adjacent to the channel may interfere with LiDAR's ability to reach the water surface. Researchers should consider flow, channel morphology, and biota when obtaining water surface slopes from LiDAR. 57 CHAPTER VII CONCLUSION This paper examined the ability of LiDAR data to accurately measure water surface slopes. This study has shown that LiDAR data provides sufficiently accurate elevation measurements within the active channel to accurately measure water surface slopes. Measurement of water surface slope with LiDAR provides researchers a tool which is both more efficient and cost effective in comparison with traditional field-based survey methods. Additionally, analysis showed that LiDAR point density is significantly higher in rough surface conditions. Water surface elevations should be gathered from high point density areas as low point density may hinder elevation accuracy. Channel morphology, gradient, flow, and biota should be considered when extracting water surface slopes as these attributes influence water surface measurement. Further study should examine accuracy of LiDAR derived water surface slopes in channel morphologies other than those in this study. Overall, the recognition that LiDAR can accurately measure water surface slopes allows researchers an unprecedented ability to study hydraulic processes for large stretches of river. Common: APPENDIX ARCGIS VBA SCRIPT CODE 58 Public g---.pStrmLayer As ILayer ' stream centerline layer selected by user (for step 1) Public g_StrearnLength As Double ' stream centerline length (for step 1) Public g_InputDistance As Integer 'As Double 'distance entered by user (for step 1) Public g_NumSegments As Integer I number of sample points entered by user (for step 1) Public gyPointLayer As ILayer I point layer created from stream centerline (for step 1) Public g]ntShpF1Name As String I point layer pathname (for step 1) Public gyMouseCursor As IMouseCursor 'mouse cursor Public g_LinearConverson As Double I linear conversion factor Public gyDEMLayer As IRasterLayer I DEM layer (for steps 3 and 4) Public g_DEMConvertUnits As Double I DEM vertical units conversion factor (for steps 3 and 4) Public g_MaxSearchDistance As Double 'maximum search distance (for step 4) Public L NumDirections As Integer I number of directions to search in (for step 4) Public g_SampleDistance As Double 'sample distance (for step 5) Public g_SampleNumber As Double ' total sample points (for step 5) Public g_VegBeginPoint As Boolean I where to start the calucaltion (for step 5) Public g_VegCaclMethod As Boolean 'which method for Vegetation Calculation (for step 5) Public gyContribLayer As ILayer ' contributing point layer (for step 6) Public gyReceivLayer As ILayer 'receiving point layer (for step 6) Public gyOutputLayerName As String I output shapefile (for step 6) Function VerifyField(fLayer As ILayer, fldName As String) As Boolean I verify that topo fields are in the stream centerline point layer Dim pFields As IFields Dim pField As IField Dim pFeatLayer As IFeatureLayer Dim pFeatClass As IFeatureClass Set pFeatLayer = fLayer Set pFeatClass = pFeatLayer.FeatureClass Set pFields = pFeatClass.Fields For i = 0 To pFields.FieldCount - 1 Set pField = pFields.Field(i) 'MsgBox pField.Name IfpField.Name = fldName Then VerifyField = True Exit Function End If Next VerifyField = False End Function Function Ca1cPointLatLong(inPnt As IPoint, inLayer As ILayer) As IPoint , in point layer Dim pFLayer As IFeatureLayer Set pFLayer = inLayer , spatial reference environment Dim pInSpatialRef As ISpatialReference Dim pOutSpatialRef As ISpatialReference Dim pGeoTrans As IGeoTransformation Dim pInGeoDataset As IGeoDataset Set pInGeoDataset = pFLayer Dim pSpatRefFact As ISpatialReferenceFactory , get map units of shapefile spatial reference Dim pPCS As IProjectedCoordinateSystem Set pPCS = pInGeoDataset.SpatialReference 'set spatial reference environment Set pSpatRefFact = New SpatialReferenceEnvironment Set pInSpatialRef= pInGeoDataset.SpatialReference 'MsgBox pInSpatialRef.Name Set pOutSpatialRef= pSpatRefFact.CreateGeographicCoordinateSystem(esriSRGeoCS_WGS1984) Set pGeoTrans = pSpatRefFact.CreateGeoTransformation(esriSRGeoTransformation_NADI983_To_WGS1984_1) Dim pOutGeom As IGeometry2 Set Ca1cPointLatLong = New Point Set CalcPointLatLong.SpatialReference = pInSpatialRef Ca1cPointLatLong.PutCoords inPnt.X, inPnt.Y Set pOutGeom = Ca1cPointLatLong pOutGeom.ProjectEx pOutSpatialRef, esriTransformForward, pGeoTrans, 0, 0, ° 'MsgBox inPnt.X &" "& inPnt.Y & vbCrLf& Ca1cPointLatLong.X &" "& Ca1cPointLatLong.Y End Function Sub OpenGxDialogO Dim pGxdial As IGxDialog Set pGxdial = New GxDialog pGxdial.ButtonCaption = "OK" pGxdial.Title = "Create Stream Centerline Point Shapefile" pGxdial.RememberLocation = True Dim pShapeFileObj As IGxObject Dim pGxFilter As IGxObjectFilter Set pGxFilter = New GxFilterShapefiles 'e.g shp Set pGxdial.ObjectFilter = pGxFilter If pGxdial.DoModaISave(ThisDocument.Parent.hWnd) Then Dim pLocation As IGxFile Dim fn As String 59 Set pLocation = pGxdial.FinalLocation fn = pGxdial.Name End If If Not pLocation Is Nothing Then LPntShpFlName = pLocation.Path & "\" & fn frmlB.tbxShpFileName.Text = g]ntShpFlName frmlB.cmdOK.Enabled = True End If End Sub Function GetAngle(pPolyline As IPolyline, dAlong As Double) As Double Dim pi As Double pi = 4 * Atn(l) Dim dAngle As Double Dim pLine As ILine Set pLine = New Line pPolyline.QueryTangent esriNoExtension, dAlong, False, 1, pLine , convert from radians to degrees dAngle = (180 * pLine.Angle) / pi I adjust angles , ESRI defines 0 degrees as the positive X-axis, increasing counter-clockwise I Ecology references 0 degrees as North, increasing clockwise If dAngle <= 90 Then GetAngle = 90 - dAngle Else GetAngle = 360 - (dAngle - 90) End If End Function Function FeatureExists(strFeatureFileName As String) As Boolean On Error GoTo ErrHandler: Dim pWSF As IWorkspaceFactory Set pWSF = New ShapefileWorkspaceFactory Dim pFeatWS As IFeatureWorksiJace Dim pFeatDS As IFeatureClass Dim strWorkspace As String Dim strFeatDS As String strWorkspace = SplitWorkspaceName(strFeatureFileName) & "\" strFeatDS = SplitFileName(strFeatureFileName) If PWSF.IsWorkspace(strWorkspace) Then Set pFeatWS = pWSF.OpenFromFile(strWorkspace, 0) Set pFeatDS = pFeatWS.OpenFeatureClass(strFeatDS) End If 60 FeatureExists = (Not pFeatDS Is Nothing) Set pWSF =Nothing Set pFeatWS = Nothing Set pFeatDS = Nothing Exit Function ErrHandler: FeatureExists = False End Function 'Returns a Workspace given for example C: \temp\dataset returns C:\temp Function SplitWorkspaceName(sWholeName As String) As String On Error GoTo ERH Dim pos As Integer pos = InStrRev(sWholeName, "\") If pos > 0 Then SplitWorkspaceName = Mid(sWholeName, 1, pos - 1) Else Exit Function End If Exit Function ERH: MsgBox "Workspace Split" & Err.Description End Function 'Returns a filename given for example C:\temp\dataset returns dataset Function SplitFileName(sWholeName As String) As String On Error GoTo ERH Dim pos As Integer Dim sT, sName As String pos = InStrRev(sWholeName, "\") Ifpos > 0 Then sT = Mid(sWholeName, 1, pos - 1) Ifpos = Len(sWholeName) Then Exit Function End If sName = Mid(sWholeName, pos + 1, Len(sWholeName) - Len(sT)) pos = InStr(sName, ".") If pos > 0 Then SplitFileName = Mid(sName, 1, pos - 1) Else SplitFileName = sName End If End If Exit Function ERH: 61 • MsgBox "Workspace Split:" & Err.Description End Function Public Sub BusyMouse(bolBusy As Boolean) 'Subroutine to change mouse cursor If g---'pMouseCursor Is Nothing Then Set g---'pMouseCursor = New MouseCursor End If IfbolBusy Then g---'pMouseCursor.SetCursor 2 Else g---'pMouseCursor.SetCursor 0 End If End Sub Function MakeColor(lRGB As Long) As IRgbColor Set MakeColor =New RgbColor MakeColor.RGB = lRGB End Function Function MakeDecoElement(pMarkerSym As IMarkerSymbol, _ dPos As Double)_ As ISimpleLineDecorationElement Set MakeDecoElement
这个错误提示意味着在输入的结尾处缺少了应有的声明或语句。可能的原因有几种。首先,可能是由于缺少括号导致的。例如,在代码中可能缺少了一个右大括号。其次,可能是由于某个函数或变量在使用之前没有进行声明。此外,也有可能是由于某些函数的头文件没有包含或者自定义的函数名与库文件中的函数名冲突所导致的。请检查你的代码,确保所有的括号都是成对出现的,并且所有的函数和变量都进行了正确的声明。 #### 引用[.reference_title] - *1* [error: expected declaration or statement at end of input](https://blog.csdn.net/xjf_831215/article/details/96849564)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* [c/c++: error: expected declaration or statement at end of input](https://blog.csdn.net/qq_36428903/article/details/121247913)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item] - *3* [C语言错误:expected declaration or statement at end of input、编写函数求100万以内的素数](https://blog.csdn.net/arieszsw/article/details/106735837)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值