{"action":"created","issue":{"url":"https://api.github.com/repos/ArduPilot/apm_planner/issues/1089","repository_url":"https://api.github.com/repos/ArduPilot/apm_planner","labels_url":"https://api.github.com/repos/ArduPilot/apm_planner/issues/1089/labels{/name}","comments_url":"https://api.github.com/repos/ArduPilot/apm_planner/issues/1089/comments","events_url":"https://api.github.com/repos/ArduPilot/apm_planner/issues/1089/events","html_url":"https://github.com/ArduPilot/apm_planner/issues/1089","id":291034754,"number":1089,"title":"Add support for using unit information from dataflash logs","user":{"login":"peterbarker","id":7077857,"avatar_url":"https://avatars0.githubusercontent.com/u/7077857?v=4","gravatar_id":"","url":"https://api.github.com/users/peterbarker","html_url":"https://github.com/peterbarker","followers_url":"https://api.github.com/users/peterbarker/followers","following_url":"https://api.github.com/users/peterbarker/following{/other_user}","gists_url":"https://api.github.com/users/peterbarker/gists{/gist_id}","starred_url":"https://api.github.com/users/peterbarker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterbarker/subscriptions","organizations_url":"https://api.github.com/users/peterbarker/orgs","repos_url":"https://api.github.com/users/peterbarker/repos","events_url":"https://api.github.com/users/peterbarker/events{/privacy}","received_events_url":"https://api.github.com/users/peterbarker/received_events","type":"User","site_admin":false},"labels":[{"id":35113621,"url":"https://api.github.com/repos/ArduPilot/apm_planner/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":{"login":"Arne-W","id":7621911,"avatar_url":"https://avatars1.githubusercontent.com/u/7621911?v=4","gravatar_id":"","url":"https://api.github.com/users/Arne-W","html_url":"https://github.com/Arne-W","followers_url":"https://api.github.com/users/Arne-W/followers","following_url":"https://api.github.com/users/Arne-W/following{/other_user}","gists_url":"https://api.github.com/users/Arne-W/gists{/gist_id}","starred_url":"https://api.github.com/users/Arne-W/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Arne-W/subscriptions","organizations_url":"https://api.github.com/users/Arne-W/orgs","repos_url":"https://api.github.com/users/Arne-W/repos","events_url":"https://api.github.com/users/Arne-W/events{/privacy}","received_events_url":"https://api.github.com/users/Arne-W/received_events","type":"User","site_admin":false},"assignees":[{"login":"Arne-W","id":7621911,"avatar_url":"https://avatars1.githubusercontent.com/u/7621911?v=4","gravatar_id":"","url":"https://api.github.com/users/Arne-W","html_url":"https://github.com/Arne-W","followers_url":"https://api.github.com/users/Arne-W/followers","following_url":"https://api.github.com/users/Arne-W/following{/other_user}","gists_url":"https://api.github.com/users/Arne-W/gists{/gist_id}","starred_url":"https://api.github.com/users/Arne-W/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Arne-W/subscriptions","organizations_url":"https://api.github.com/users/Arne-W/orgs","repos_url":"https://api.github.com/users/Arne-W/repos","events_url":"https://api.github.com/users/Arne-W/events{/privacy}","received_events_url":"https://api.github.com/users/Arne-W/received_events","type":"User","site_admin":false}],"milestone":null,"comments":8,"created_at":"2018-01-23T23:46:41Z","updated_at":"2018-02-05T06:06:28Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"ArduPilot's dataflash logs now contain unit information for each and every field.\r\n\r\nThere are several new messages involved in this - but they act in the same way as `FMT` messages, being basic \"header information\".\r\n\r\nThe new `UNIT` message defines a mapping between a character and a unit.  These units are, for the most part, SI units - `volts`, `seconds`, `Hz` - and derived units such as `m/s`, however there are some \"special case\" units like `satellites` and `deglatitude`.  It is expected that a GCS be able to convert these into units presentable to a user (perhaps according to their preference), so for example temperature in Fahrenheit in Liberia.\r\n\r\nThe new `MULT` message defines a mapping mapping between a character and a multiplier.  So, for example, `2` indicates a multiplier of `100`.  These are used where the natural presentation of a time series in a log is not in the base SI unit - the obvious example being `TimeUS` - a time in microseconds since boot.\r\n\r\nThe new `FMTU` message provides the unit for each field present in the corresponding FMT message.  `FmtType` gives the `FMT` number, and the other two fields present both the unit and multiplier for the corresponding (by offset) field in the `FMT` message.  For example, almost every message we emit starts with a `TimeUS` field, a time since system boot in microseconds.  The `FMTU` message for each of these would have `s` in `UnitIds[0]` and `F` in `MultIds` (i.e. `10^-6`).  `F` is a reference into the table formed by `MULT` and `s` is a reference into the table formed by `UNIT`\r\n\r\n```\r\n2018-01-24 10:13:34.20: FMTU {TimeUS : 1687658, FmtType : 229, UnitIds : s--, MultIds : F--}\r\n```\r\n\r\nPossible uses include presenting fields in locale-specific forms, labelling graph axes, and possibly determining which time series might be presented on the same axis (given they have the same unit and a similar multiplier).  In tools where formulae can be used to present derived values it would be possible to enforce unit-correctness - only subtracting seconds from seconds and metres from metres, for example, and where the language permits adding units generally to values it would be possible to enforce comparisons only against like-units.\r\n"},"comment":{"url":"https://api.github.com/repos/ArduPilot/apm_planner/issues/comments/362990176","html_url":"https://github.com/ArduPilot/apm_planner/issues/1089#issuecomment-362990176","issue_url":"https://api.github.com/repos/ArduPilot/apm_planner/issues/1089","id":362990176,"user":{"login":"meee1","id":511568,"avatar_url":"https://avatars1.githubusercontent.com/u/511568?v=4","gravatar_id":"","url":"https://api.github.com/users/meee1","html_url":"https://github.com/meee1","followers_url":"https://api.github.com/users/meee1/followers","following_url":"https://api.github.com/users/meee1/following{/other_user}","gists_url":"https://api.github.com/users/meee1/gists{/gist_id}","starred_url":"https://api.github.com/users/meee1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meee1/subscriptions","organizations_url":"https://api.github.com/users/meee1/orgs","repos_url":"https://api.github.com/users/meee1/repos","events_url":"https://api.github.com/users/meee1/events{/privacy}","received_events_url":"https://api.github.com/users/meee1/received_events","type":"User","site_admin":false},"created_at":"2018-02-05T06:06:28Z","updated_at":"2018-02-05T06:06:28Z","author_association":"NONE","body":"there are 5 types that needs to not be double multiplied\r\ncCeEL\r\n"}}
{"actor":{"display_login":"meee1"}}