Illustrated C/C++ source sheets, symbol index, API relationship graph, compiler console and debug trace

LIVE AI / FLEXIBLE SENSING / FLIGHT CONTEXT

Sensoraia API

Live AI and sensing, connected to the flight.
See, listen, inspect and return supported results while airborne.

Loading...
Searching...
No Matches
survey.cpp File Reference

Command-line entry point for completed-session PANGEA mapping. More...

#include "application_runtime.h"
#include "version.h"
#include "map_config.h"
#include "ortho_map.h"
#include "map_exif.h"
#include "map_writer.h"
#include "map_progress.h"
#include "jpeg_encoder.h"
#include "map_resources.h"
#include <atomic>
#include <chrono>
#include <thread>
#include <functional>
#include <cstring>
#include <sys/file.h>
#include <sys/types.h>
#include <unistd.h>
#include <signal.h>
#include <fcntl.h>
#include "map_pipeline.h"
#include "xyz_export.h"
#include "great_session.h"
Include dependency graph for survey.cpp:

Go to the source code of this file.

Typedefs

using Clock = std::chrono::steady_clock

Functions

static double processCpuSeconds ()
 Read cumulative CPU time across the mapping process's threads.
static bool isStopping ()
 Check cancellation at a cooperative mapping boundary.
static void signalHandler (int sig)
 Record a stop request without performing cleanup in signal context.
static fs::path executablePath ()
 Resolve the running executable independently of the launch directory.
static fs::path defaultIni ()
 Locate the default configuration alongside the executable.
static double seconds (Clock::duration duration)
 Convert a monotonic interval without truncating fractional seconds.
static std::string sessionName ()
 Create a readable, millisecond-resolution session label.
static void checkInputs (const pangea_survey::MapConfig &config)
 Validate a source session and print its output layout offline.
int pangeaSurveyMain (int argc, char **argv)

Variables

static std::atomic< sig_atomic_t > stopping {0}
static std::unique_ptr< pangea_survey::MapResources > resources
static fs::path activePauseFile
static int liveCpuPercent = 0
static double liveCpuStarted = 0
static Clock::time_point liveStarted

Detailed Description

Command-line entry point for completed-session PANGEA mapping.

Survey processing consumes saved photos and validated session metadata; it is not part of the camera trigger path. Separate per-user locks exclude both another survey and the live PANGEA worker so two independent consumers cannot compete for memory or checkpoint files.

Definition in file survey.cpp.

Typedef Documentation

◆ Clock

using Clock = std::chrono::steady_clock

Definition at line 46 of file survey.cpp.

Function Documentation

◆ checkInputs()

void checkInputs ( const pangea_survey::MapConfig & config)
static

Validate a source session and print its output layout offline.

Parameters
configRequested map and source configuration.

For XYZ output, validate the internal render grid separately from the published tile plan; they need not share pixel dimensions.

Exceptions
std::runtime_errorIf source admission or layout validation fails.

Definition at line 188 of file survey.cpp.

◆ defaultIni()

fs::path defaultIni ( )
static

Locate the default configuration alongside the executable.

Returns
Candidate path; does not check whether the INI exists.

Definition at line 96 of file survey.cpp.

◆ executablePath()

fs::path executablePath ( )
static

Resolve the running executable independently of the launch directory.

Returns
Canonical Linux executable path.
Exceptions
std::filesystem::filesystem_errorIf procfs resolution fails.

Definition at line 91 of file survey.cpp.

◆ isStopping()

bool isStopping ( )
static

Check cancellation at a cooperative mapping boundary.

Returns
True when a stop signal has been recorded.

Wait out operator pauses and throttle against cumulative CPU time. Poll in short sleeps so cancellation remains responsive while paused.

Definition at line 68 of file survey.cpp.

◆ pangeaSurveyMain()

int pangeaSurveyMain ( int argc,
char ** argv )

Parse worker options, install signal/resource policy, and run one map session.

Parameters
argcArgument count.
argvInput/output paths and optional watch, camera, and resource settings.
Returns
Zero on successful completion, otherwise one with a diagnostic.

Definition at line 204 of file survey.cpp.

◆ processCpuSeconds()

double processCpuSeconds ( )
static

Read cumulative CPU time across the mapping process's threads.

Returns
CPU seconds, independent of elapsed wall time.
Exceptions
std::runtime_errorIf the process CPU clock cannot be read.

Definition at line 58 of file survey.cpp.

◆ seconds()

double seconds ( Clock::duration duration)
static

Convert a monotonic interval without truncating fractional seconds.

Parameters
durationClock interval.
Returns
Interval in seconds.

Definition at line 100 of file survey.cpp.

◆ sessionName()

std::string sessionName ( )
static

Create a readable, millisecond-resolution session label.

Returns
Local wall-clock label, not a uniqueness guarantee.

Definition at line 103 of file survey.cpp.

◆ signalHandler()

void signalHandler ( int sig)
static

Record a stop request without performing cleanup in signal context.

Parameters
sigSignal number; all registered stop signals have the same effect.

Definition at line 84 of file survey.cpp.

Variable Documentation

◆ activePauseFile

fs::path activePauseFile
static

Definition at line 51 of file survey.cpp.

◆ liveCpuPercent

int liveCpuPercent = 0
static

Definition at line 52 of file survey.cpp.

◆ liveCpuStarted

double liveCpuStarted = 0
static

Definition at line 53 of file survey.cpp.

◆ liveStarted

Clock::time_point liveStarted
static

Definition at line 54 of file survey.cpp.

◆ resources

std::unique_ptr<pangea_survey::MapResources> resources
static

Definition at line 50 of file survey.cpp.

◆ stopping

std::atomic<sig_atomic_t> stopping {0}
static

Definition at line 47 of file survey.cpp.