Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add multiplier value for GPS_STATUS.satellite_azimuth where 255 means 360deg #885

Merged
merged 1 commit into from
May 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions generator/mavschema.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@
<xs:simpleType name="factor">
<xs:restriction base="xs:string">
<xs:enumeration value="1E-2"/> <!-- actual value = stated value / 100 -->
<xs:enumeration value="360/255"/> <!-- actual value = stated value * 360/255, as used for GPS_STATUS.satellite_azimuth -->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@peterbarker How about

Suggested change
<xs:enumeration value="360/255"/> <!-- actual value = stated value * 360/255, as used for GPS_STATUS.satellite_azimuth -->
<xs:enumeration value="360div255"/> <!-- actual value = stated value * 360/255, as used for GPS_STATUS.satellite_azimuth -->

Copy link
Contributor

@hamishwillee hamishwillee May 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or to put it another way, I have no strong opinions, but good to put this in.

degScaledToByte? degScaled255

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally, I'd prefer "360/255" because, it is both:

  • directly evaluatable in pretty much any programming language for when the actual value is required for maths.
  • humanly understandable as text if printed as-is (e.g. web page, Wireshark dissector, code comments, etc).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's see what @peterbarker says - I dislike the slash sorry!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the slash. It means we can continue to just eval these things.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i prefer the slash

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pushing this @shancock884

</xs:restriction>
</xs:simpleType>

Expand Down
Loading