Skip to content

[3] [TASK] [Backend] [Validation] Implement TelemetryValidator for semantic validation #123

@R4R35

Description

@R4R35

Description


Create a TelemetryValidator component that performs semantic validation on incoming pings after structural validation passes. This drops pings that are structurally valid but logically impossible (e.g. coordinates in the ocean, future timestamps).

Scope


  • Create TelemetryValidator as a @Component
  • Validate lat is between -90 and 90
  • Validate lng is between -180 and 180
  • Validate accuracyMeters is positive
  • Validate timestamp is not in the future
  • Integrate validator in TelemetryService before saving

Done When


  • Pings with invalid coordinates are rejected and logged
  • Pings with future timestamps are rejected and logged
  • Valid pings are still saved correctly to MongoDB

Priority


  • 🔴 High

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions