File size: 493 Bytes
6a6918c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from pydantic import BaseModel
from datetime import datetime
from typing import Optional

class MeasurementMetadata(BaseModel):
    """Schema for the metadata received with the image."""
    ship_id: str
    timestamp: datetime
    latitude: float
    longitude: float
    camera_id: Optional[str] = None

class MeasurementResult(BaseModel):
    """Schema for the results from the measurement service."""
    draft_measurement: float # The measured draft in meters
    confidence_score: float