bcfreeflight
    Preparing search index...

    Class WeatherService

    Service for weather-related operations.

    Index

    Constructors

    Methods

    • Gets weather data for a specific device, either the most recent record or records for a specific date. The data is transformed into a simplified WeatherResult format that contains only deviceId and data.

      Parameters

      • deviceId: string

        The ID of the device to retrieve weather data for.

      • OptionallocalDate: string

        Optional. The local date to retrieve weather data for in MM-DD-YYYY format.

      Returns Promise<WeatherResult[]>

      A promise that resolves to an array of weather results. If a localDate is provided, returns all records for that date. Otherwise, returns only the most recent record.

    • Processes and computes averages based on a predefined dataset or input. Performs necessary calculations asynchronously.

      Returns Promise<void>

      A promise that resolves when the processing is complete.

    • Saves weather data to the database or designated storage system.

      Parameters

      Returns Promise<void>

      A promise that resolves to a confirmation object containing details of the saved data.