Skip to content

Conversation

@Qwerios
Copy link
Contributor

@Qwerios Qwerios commented Oct 28, 2025

This adds a small number of additional details for the scale measurement. Specifically:

  • haul zone information
  • a haul reference number
  • a product description

@Qwerios
Copy link
Contributor Author

Qwerios commented Oct 28, 2025

An example scale entry:

 {
  "journal_id": "64b6785b-da15-46f9-915d-b7ac4a55e98b",
  "entry_id": "1701addd-90fe-4b46-bb98-2bd2b327b85c",
  "entry_type": "device-measurement",
  "entry_datetime": "2025-04-15T00:00:00Z",
  "revision": "2025-04-15T00:00:00Z",
  "immutable": false,
  "device_id": "DEVICE_ID_STRING",
  "value": {
    "type": "SCALE",
    "scale": {
      "tow": {
        "activity_date_start": "2025-04-15T15:00:00Z",
        "activity_date_end": "2025-04-15T15:00:00Z",
        "sequence_number": 1,
        "reference": "HAUL_REF_001",
        "location_start": {
          "latitude": 54.1234,
          "longitude": 3.1234
        },
        "zone": {
          "economical_zone": "NLD",
          "fao_area": "27.4.c",
          "fao_subarea": "4",
          "fao_division": "c",
          "ices_rectangle": "35F6",
          "effort_zone": "A",
          "regional_body": "NEAFC"
        },
        "fishing_gear": {
          "code": "DRB",
          "mesh_size": 80
        }
      },
      "category": "FISH",
      "product": "COD",
      "product_description": "Unsorted cod bits",
      "processed": {
        "fish_presentation": "WHL",
        "fish_state": "FRO",
        "package_type": "CT",
        "number_of_packages": 4,
        "average_package_weight": 250,
        "package_labels": [
          "LABEL1",
          "LABEL2"
        ],
        "fish_freshness": "A",
        "conversion_factor": 1
      },
      "weight": 1000
    }
  }
}

EDIT: Updated to re-use tow schema

@Qwerios Qwerios force-pushed the feature/scale-extensions branch from 1266500 to c87783e Compare November 27, 2025 09:07
test(device-measurement): added scale
test(zone+scale): added additional properties
chore(docs): generate
chore(types): generate
feat(scale-measurement): added gear and position

fix(scale): use existing tow schema

fix(tow): added sequence nr and reference
@Qwerios Qwerios force-pushed the feature/scale-extensions branch from c87783e to c4d9c3e Compare November 27, 2025 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants