Skip to content

Instantly share code, notes, and snippets.

@jmwind
Last active May 7, 2023 21:21
Show Gist options
  • Save jmwind/3c96c1600f05cfbc37cc235de2360419 to your computer and use it in GitHub Desktop.
Save jmwind/3c96c1600f05cfbc37cc235de2360419 to your computer and use it in GitHub Desktop.
metrics api

metrics widget data:

  • name: string (shown in top right corner)
  • unit: angle, knots, feet, meters (shown in a few places and if angle show superscript and otherwise below large metric number)
  • timeScale: scale (in minutes, default to 10 mins max 12 hours)
  • value: number (one decimal place, current value of the metric and the widget will be given a new value often)
  • values (optional): [{value: number, timestamp},...] (values is a list of historical values, the widget is expected to save a value ever 10 seconds and use to show the trends graph to the timescale provided. Max timescale is 12hr, which would mean at most 4320 values will be stored for the historical graph)
  • max value: number (calculated from the values stored)
  • min value: number (calculated from the values stored)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment