1.3.77
 
Loading...
Searching...
No Matches
LiDAR.h File Reference
#include "CollisionDetection.h"
#include "Context.h"
#include "Visualizer.h"
#include "triangulation_cdt.h"
#include <functional>

Go to the source code of this file.

Data Structures

class  HitTable< datatype >
 
struct  HitPoint
 
struct  Triangulation
 
struct  GridCell
 
struct  RisleyPrism
 A single rotating wedge prism in a Risley-prism beam deflector. More...
 
struct  ScanMetadata
 Structure containing metadata for a scan. More...
 
class  LiDARcloud
 Primary class for terrestrial LiDAR scan. More...
 

Enumerations

enum  ScanPattern { SCAN_PATTERN_RASTER = 0 , SCAN_PATTERN_SPINNING_MULTIBEAM = 1 , SCAN_PATTERN_RISLEY_PRISM = 2 }
 Geometric pattern that maps a scan's (row,column) table indices to beam directions. More...
 
enum  ScanMode { SCAN_MODE_STATIC_RASTER = 0 , SCAN_MODE_MOVING_RASTER = 1 , SCAN_MODE_SPINNING = 2 , SCAN_MODE_RISLEY_PRISM = 3 }
 High-level, introspective descriptor of how a scan was acquired. More...
 
enum  ReturnMode { RETURN_MODE_MULTI = 0 , RETURN_MODE_SINGLE = 1 }
 How the analytic-waveform synthetic scanner reports the returns detected along each pulse. More...
 
enum  SingleReturnSelection { SINGLE_RETURN_STRONGEST = 0 , SINGLE_RETURN_FIRST = 1 , SINGLE_RETURN_LAST = 2 , SINGLE_RETURN_STRONGEST_PLUS_LAST = 3 }
 Which return(s) a limited-return instrument reports when a pulse resolves more returns than the return limit. More...
 

Functions

bool sortcol0 (const std::vector< double > &v0, const std::vector< double > &v1)
 
bool sortcol1 (const std::vector< double > &v0, const std::vector< double > &v1)
 

Detailed Description

Primary header file for LiDAR plug-in.

Copyright (C) 2016-2025 Brian Bailey

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Definition in file LiDAR.h.

Enumeration Type Documentation

◆ ReturnMode

enum ReturnMode

How the analytic-waveform synthetic scanner reports the returns detected along each pulse.

Selects how many points a pulse contributes when synthetic-scan waveform processing is active (more than one ray per pulse; see LiDARcloud::syntheticScan). With RETURN_MODE_MULTI every detected return above the detection threshold is reported (discrete multi-return instrument with no return limit). With RETURN_MODE_SINGLE a limited number of returns per pulse is reported - at most ScanMetadata::maxReturns of them (default 1 = classic single-return, 2 = dual-return, N = N-return) - selected by SingleReturnSelection. In single-return mode (maxReturns = 1) two surfaces falling within the pulse range-resolution merge into one blended return at an intermediate range, reproducing the "ghost"/"mixed pixel" point that a real single-return instrument records at an edge. A single ray per pulse always produces an idealized exact intersection regardless of mode.

Enumerator
RETURN_MODE_MULTI 

Report every detected return above the detection threshold (discrete multi-return, no return limit)

RETURN_MODE_SINGLE 

Report at most ScanMetadata::maxReturns detector-selected returns per pulse (see SingleReturnSelection)

Definition at line 254 of file LiDAR.h.

◆ ScanMode

enum ScanMode

High-level, introspective descriptor of how a scan was acquired.

Combines the geometric beam pattern (see ScanPattern) and the platform motion into a single descriptor so a scan can be queried ("how was this acquired?") without reverse-engineering it from ScanMetadata::isMoving, ScanMetadata::scanPattern, and ScanMetadata::phiMax. It is set by the scan-creation entry points and is purely descriptive: the underlying mechanism is still driven by ScanMetadata::scanPattern and ScanMetadata::isMoving.

Enumerator
SCAN_MODE_STATIC_RASTER 

Uniform angular grid acquired from a single fixed origin (static terrestrial / tripod scan)

SCAN_MODE_MOVING_RASTER 

Uniform angular grid acquired while the platform moves along a trajectory (mobile/airborne raster sensor)

SCAN_MODE_SPINNING 

Continuously-spinning multi-channel sensor (always trajectory-driven; a stationary capture is two coincident poses)

SCAN_MODE_RISLEY_PRISM 

Rotating-Risley-prism rosette sensor (Livox-style; always trajectory-driven; a stationary capture is two coincident poses separated in time by the acquisition duration)

Definition at line 232 of file LiDAR.h.

◆ ScanPattern

Geometric pattern that maps a scan's (row,column) table indices to beam directions.

Determines how the (row, column) scan-table indices are converted to beam directions. The default SCAN_PATTERN_RASTER reproduces the original Helios behavior of a uniform angular grid in zenith and azimuth (panoramic terrestrial laser scanner). SCAN_PATTERN_SPINNING_MULTIBEAM models a rotating multi-channel sensor (e.g. Velodyne, Ouster, Hesai) where each table row corresponds to a laser channel fired at a fixed - and generally non-uniformly spaced - zenith angle, while each column is a uniform azimuth step. SCAN_PATTERN_RISLEY_PRISM models a rotating-Risley-prism scanner (the optical mechanism used by Livox rosette-pattern sensors such as the Mid-40/Mid-70/Avia): a single beam is refracted through a stack of continuously rotating wedge prisms, tracing a non-repetitive rosette inside a circular field of view. It is non-separable - each column is one pulse whose direction comes from the prism optics at that pulse's time, not from a row x column angular grid - so it is stored as an Ntheta=1 (single-row) table and is always trajectory-driven. The raster and spinning patterns share the same Ntheta x Nphi table storage, so all downstream processing (ray tracing, hit tables, leaf-area and leaf-angle inversion) is common to both.

Enumerator
SCAN_PATTERN_RASTER 

Uniform angular grid: zenith uniformly spaced over [thetaMin, thetaMax], azimuth over [phiMin, phiMax].

SCAN_PATTERN_SPINNING_MULTIBEAM 

Rotating multi-channel sensor: each row is a laser channel at a fixed zenith angle (see ScanMetadata::beamZenithAngles), each column a uniform azimuth step.

SCAN_PATTERN_RISLEY_PRISM 

Rotating-Risley-prism scanner (Livox-style rosette): each column is one pulse whose body-frame direction is computed by refracting the beam through the rotating prisms (see ScanMetadata::risley_prisms) at that pulse's time. Stored as a single-row (Ntheta=1) table; always trajectory-driven.

Definition at line 215 of file LiDAR.h.

◆ SingleReturnSelection

Which return(s) a limited-return instrument reports when a pulse resolves more returns than the return limit.

Used only when ReturnMode is RETURN_MODE_SINGLE. When a pulse produces more returns than ScanMetadata::maxReturns, this policy selects which subset to keep (the kept subset is always reported nearest-first). Mirrors the configurable first/last/strongest selection of real discrete-return scanners. SINGLE_RETURN_STRONGEST, SINGLE_RETURN_FIRST and SINGLE_RETURN_LAST each keep the top ScanMetadata::maxReturns returns by a single key; SINGLE_RETURN_STRONGEST_PLUS_LAST instead keeps the strongest-plus-last pair (1 or 2 returns) and ignores ScanMetadata::maxReturns.

Enumerator
SINGLE_RETURN_STRONGEST 

Keep the return(s) with the largest intensity (echo amplitude)

SINGLE_RETURN_FIRST 

Keep the nearest return(s) (smallest range)

SINGLE_RETURN_LAST 

Keep the farthest return(s) (largest range)

SINGLE_RETURN_STRONGEST_PLUS_LAST 

Dual return: keep the strongest return AND the last (farthest) return of the pulse, deduplicated to one when they are the same return. Models the "strongest + last" dual-return mode of real discrete-return scanners. Intrinsically yields 1 or 2 returns and ignores ScanMetadata::maxReturns.

Definition at line 268 of file LiDAR.h.

Function Documentation

◆ sortcol0()

bool sortcol0 ( const std::vector< double > &  v0,
const std::vector< double > &  v1 
)

Definition at line 2227 of file LiDAR.cpp.

◆ sortcol1()

bool sortcol1 ( const std::vector< double > &  v0,
const std::vector< double > &  v1 
)

Definition at line 2231 of file LiDAR.cpp.