Skip to content

Disable the AHRS output for a number of days into the future #188

@MaxBaex

Description

@MaxBaex

Full AHRS output is not allowed during competitions. The Sensor provides a configuration option to disable or enable this via a parameter in the configuration file on the sensors sd card.

A more convenient method via the Larus frontend is desired. The Sensor should therefor provide a feature to switch off the Pitch and Roll output from the AHRS Data for X-Days. It shall not be possible to enable AHRS before the X-Days elapsed.

The log file on the SD card shall contain one of the following strings (Timestamps in ISO 8601 Format):

  • AHRS output disabled until 2024-10-28T08:00Z
  • AHRS output active

The X-Days shall be settable via

  • CAN-Message.
  • Via the configuration file on the uSD Card

The sensor shall process such a message with the current GNSS time and calculate the date and time until the AHRS output is switched off. This information shall be stored in the STM32s internal emulated EEPROM.

Ideas for the implementation

  • Use the existing EEPROM Parameter "HORIZON" which is currently 0 (no ahrs) or 1 (ahrs active) and additionally allow other values of this 16 bit field for a "locked until date"

  • bits: yyyyyyymmmmddddd (7 highest bits for year - 2000) (4-bits month), (5-bits day) 2025.06.16 = 0x32D0 (0011001 0110 10000) (0 means deactivated but can be activated, 1 means active, any other bitvalue means deactivated until the current date is > eeprom horizon value.

  • Reading the locked until date 16 bit date information: The Frontend shall read this parameter and display " Competition Mode: AHRS deactivated until 2025.06.16" if the AHRS Blocked bit is set in 0x12a.
    Setting and Extending the locked date

  • The Frontend and Sensor shall be able to extend the lock date by x days.
    The Sensors uSD configuration can as of now not digest datatypes other than floats. So the configuration just provides a field to lock the interface for x days.

  • The number of days shall be limited to e.g. only 21 days in the future (so that the AHRS output can not be deactivated unintentionally for years in the future)

  • The x days are always applied based on the current date

  • The tasks CAN_task_runnable(), NMEA_runnable() need to digest the configuration and limit the data output accordingly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions