read_pose_table

read_pose_table#

rapidtools.data_sources.read_pose_table(sidecar: str | Path, image_directory: str | Path | None = None, default_hfov_deg: float = 73.7, takeoff_elevation_m: float = 0.0) → list[DroneCamera][source]#

Read camera poses from a sidecar table.

For aircraft that do not write DJI-style metadata, or for poses refined by photogrammetry. The table is a CSV with a header row, or a GeoJSON of Point features; column names are matched loosely (image or filename; lon/longitude; lat/latitude; altitude or elevation_m; yaw/heading; pitch; optional roll, focal_px or hfov_deg, width, height). Pitch is 0 at the horizon and -90 straight down.

Parameters:
  • sidecar – Path of the table.

  • image_directory – Folder the image names are relative to; the table’s own folder by default. Image sizes are read from the files when the table has no width and height.

  • default_hfov_deg – Field of view for rows without lens data.

  • takeoff_elevation_m – Added to every altitude in the table.

Returns:

list[DroneCamera] – One camera per usable row.

Example

>>> cameras = read_pose_table('flight/poses.csv')
>>> cameras[0].yaw_deg
135.0