Skip to main content

Sonar Simulation Pipeline

Production-grade marine physics simulation: FLUX opcode engine, geometric ray tracing, multi-agent AUV fleet simulation, mission planning, digital twin, and live dashboard.

pip install sonar-sim-pipeline

Quick Start

from sonar_sim_pipeline import *

# 1. Physics at a single depth
env = compute_physics(25.0, chl=4.0, season="summer", sediment="sand")
print(f"{env['temperature']:.1f}C, {env['sound_speed']:.0f} m/s")

# 2. Dive profile
prof = dive_profile(0, 50, 5)
for p in prof:
    print(f"{p['depth']:5.0f}m | {p['temperature']:5.1f}C | {p['sound_speed']:6.0f}m/s | {p['visibility']:5.1f}m")

# 3. Ray tracing
rt = SonarRayTracer()
ret = rt.compute_return(source_depth=10.0, target_depth=50.0, range=100.0)
print(f"Travel time: {ret['total_travel_time_s']:.4f}s, Loss: {ret['total_loss_db']:.1f}dB")

# 4. Survey mission
planner = MissionPlanner()
mission = planner.lawnmower("kachemak-bay", width=500, height=200, depth=25)
print(f"{len(mission.waypoints)} waypoints, {mission.total_distance():.0f}m total")

# 5. Fleet simulation
from sonar_sim_pipeline import AUVFleetSimulator, FluxPhysics, Formation
sim = AUVFleetSimulator(FluxPhysics())
sim.spawn_fleet(5, depth=20)
sim.formation(Formation.V, spacing=40)
sim.run_for(60)
print(f"Fleet: {sim.fleet_summary()['avg_battery']:.1f}% avg battery")

# 6. Digital twin
from sonar_sim_pipeline import MarineDigitalTwin
twin = MarineDigitalTwin(max_depth=100, chl=4.0)
twin.spawn_fleet(3)
twin.run_fleet(30)
print(twin.summary())

CLI

# Dive profile (CSV)
sonar-env --start 0 --end 100 --step 5

# Survey mission
sonar-survey --type lawnmower --width 500 --height 200 --depth 25

# Ray trace
sonar-ray --source-depth 10 --angle 15 --range 100

# Mission plan
sonar-plan --type spiral --radius 100 --depth 20

API Server

python api_server.py --port 8080
curl localhost:8080/health
curl "localhost:8080/v1/physics?depth=25&season=summer"

Dashboard

Open dashboard.html in any browser — offline FLUX physics, live waterfall, depth profile chart, no dependencies.

Modules

Module Description
physics.py FLUX 9-opcode engine (0xB0-0xB8): absorption, scattering, thermocline, SSP, reflectivity, refraction
mission.py MissionPlanner: lawnmower, spiral, star, perimeter patterns
display.py SonarDisplay: waterfall, ping_table, export_json, survey_summary
fleet_sim.py AUVFleetSimulator: multi-agent formation control with FLUX physics
ct_bridge.py ConstraintSnapper, FLUXCTBridge, CSPTranslator for constraint theory integration
pipeline.py Pipeline orchestrator
digital_twin.py MarineDigitalTwin: what-if queries, thermocline, mission/fleet orchestration
api_server.py 10-endpoint REST API, OpenAPI spec
cli_runner.py CLI for physics, ray, survey, fleet, neural commands

Verified Values

  • 22.0°C @15m (summer thermocline, chl=4.0, sand sediment)
  • 1527 m/s @15m (Mackenzie sound speed model)
  • 0.1386s travel time @100m range (geometric ray tracer, Snell's law)
  • 48m optimal survey depth (constraint snapping)

Registry

  • PyPI: sonar-sim-pipeline
  • Source: github.com/SuperInstance/sonar-vision
  • crates.io: sonar-vision-physics (Rust reference impl)
  • npm: @superinstance/sonar-vision-tool

License

MIT — SuperInstance

Metadata

Release files for sonar-sim-pipeline 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sonar-sim-pipeline 1.0.0
File Size Uploaded Provenance Actions
sonar_sim_pipeline-1.0.0.tar.gz 14.5 kB Without provenance Details for sonar_sim_pipeline-1.0.0.tar.gz

Release files / sonar_sim_pipeline-1.0.0.tar.gz

Download URL sonar_sim_pipeline-1.0.0.tar.gz
Size 14.5 kB
Tags Source
SHA-256 checksum
How to use checksums
0477e72534d1ffd9928f386385d5adf3bb7981178ee04a99815de6a511e2cea6
BLAKE2b-256 checksum
How to use checksums
ba0b9d11014ce53b12fbaf1068cdbea148cf56d6ef2cc5c1f173116d45d6cd30
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Security for sonar-sim-pipeline 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page