Skip to main content

Domain-driven mission planning for autonomous drone operations, powered by MAVLink-compatible workflows and dual-backend persistence

Project description

tiferet-mission

Domain-driven mission planning for autonomous drone operations, powered by MAVLink-compatible workflows and dual-backend persistence.

Overview

tiferet-mission is a Tiferet extension package that provides a complete Domain-Driven Design (DDD) layer for drone mission planning. It models MAVLink-style mission plans as first-class domain objects with lifecycle management, device assignment validation, and dual-backend persistence (SQLite and HDF5).

Installation

# Core (SQLite backend)
pip install tiferet-mission

# With HDF5 support
pip install tiferet-mission[h5]

Quick Start

from tiferet.events import DomainEvent
from tiferet_mission.events import CreateMission, AddMissionItem, ValidateMission
from tiferet_mission.repos.sqlite import MissionSqliteRepository

# Initialize the SQLite repository
mission_service = MissionSqliteRepository(db_path='missions.db')

# Create a mission
mission = DomainEvent.handle(
    CreateMission,
    dependencies={'mission_service': mission_service},
    name='Survey Alpha',
    drone_type='copter',
)

# Add waypoints
for cmd, kwargs in [
    ('NAV_TAKEOFF', {'altitude': 10.0}),
    ('NAV_WAYPOINT', {'latitude': 35.123, 'longitude': -120.456, 'altitude': 50.0}),
    ('NAV_RETURN_TO_LAUNCH', {}),
]:
    DomainEvent.handle(
        AddMissionItem,
        dependencies={'mission_service': mission_service},
        id=mission.id, command=cmd, **kwargs,
    )

# Validate the mission
validated = DomainEvent.handle(
    ValidateMission,
    dependencies={'mission_service': mission_service},
    id=mission.id,
)
print(f'Mission "{validated.name}" status: {validated.status}')  # validated

Architecture

tiferet_mission/
├── assets/           Error code constants
├── domain/           DomainObject subclasses (Mission, MissionItem, DeviceAssignment)
├── events/           DomainEvent subclasses (11 mission lifecycle events)
├── interfaces/       Service contracts (MissionService, DeviceRegistryService)
├── mappers/          Aggregates + SQL TransferObjects + H5 TableObjects/NodeObjects
├── repos/            SQLite repository implementation
└── tests/            Unit + integration tests

Features

Domain Objects

  • Mission — ordered collection of mission items with lifecycle status and device reference
  • MissionItem — MAVLink-compatible command (NAV/DO/CONDITION) with auto-derived metadata
  • DeviceAssignment — audit record linking a device to a mission

Domain Events (11)

  • CRUD: CreateMission, GetMission, ListMissions, DeleteMission
  • Items: AddMissionItem, RemoveMissionItem, ReorderMissionItems
  • Device: AssignDevice (with type validation), UnassignDevice
  • Lifecycle: ValidateMission, UpdateMissionStatus

MAVLink Compatibility

  • 20+ MAV_CMD commands mapped (NAV_WAYPOINT, NAV_TAKEOFF, NAV_LAND, DO_CHANGE_SPEED, etc.)
  • Mission items mirror the MISSION_ITEM_INT message structure
  • Extensible command reference table

Dual-Backend Persistence

  • SQLite — relational storage via MissionSqliteRepository
  • HDF5 — columnar storage via H5 transfer objects (requires [h5] extra)
  • Both implement the same MissionService interface — switching is a config change

Device Type Validation

  • DeviceRegistryService — read-only interface for querying external device registries
  • AssignDevice event validates drone type compatibility before assignment

Dependencies

  • tiferet >= 2.0.0b1 (core framework)
  • tiferet-h5 >= 0.1.0 + tables >= 3.10.0 (optional, for HDF5 backend)

Documentation

License

BSD 3-Clause. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tiferet_mission-0.1.0a1.tar.gz (27.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tiferet_mission-0.1.0a1-py3-none-any.whl (37.2 kB view details)

Uploaded Python 3

File details

Details for the file tiferet_mission-0.1.0a1.tar.gz.

File metadata

  • Download URL: tiferet_mission-0.1.0a1.tar.gz
  • Upload date:
  • Size: 27.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tiferet_mission-0.1.0a1.tar.gz
Algorithm Hash digest
SHA256 98deaabb24216900cdf2430998b26ede28f92b4c4778d8437783c5827d76e644
MD5 0e6e006f15cc75238d7fa58f905b70d2
BLAKE2b-256 4282551d234727791583ff29288b592b7ac26a92216ed50cdc1023c6fb84da8a

See more details on using hashes here.

Provenance

The following attestation bundles were made for tiferet_mission-0.1.0a1.tar.gz:

Publisher: python-publish.yml on greatstrength/tiferet-mission

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tiferet_mission-0.1.0a1-py3-none-any.whl.

File metadata

File hashes

Hashes for tiferet_mission-0.1.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 538a5ac4145a3cbc93d0ada2e6fbb72c50e6ed4e012da5fb7431141fa4687057
MD5 8182ba06d6be6bc8359e75f8660ad1c8
BLAKE2b-256 93527b378afcbc65358c1332b13a3c1764a0448cbef85bbef7d9ccb09d7a4d57

See more details on using hashes here.

Provenance

The following attestation bundles were made for tiferet_mission-0.1.0a1-py3-none-any.whl:

Publisher: python-publish.yml on greatstrength/tiferet-mission

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page