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

Reported heading is a bit weird #4

Closed
pierr3 opened this issue Aug 29, 2016 · 8 comments
Closed

Reported heading is a bit weird #4

pierr3 opened this issue Aug 29, 2016 · 8 comments
Assignees

Comments

@pierr3
Copy link

pierr3 commented Aug 29, 2016

The reported heading from the aircraft is not displayed properly in EuroScope, see capture (Last item is heading)

https://s3.eu-central-1.amazonaws.com/pithos/ShareX/2016/08/EuroScope_2016-08-29_23-25-41.png

@ogruetzmann ogruetzmann self-assigned this Aug 29, 2016
@ogruetzmann
Copy link
Owner

That looks strange, indeed. Will have a look on wednesday.

@ogruetzmann
Copy link
Owner

@pierr3 I am able to reproduce this, it's reported heading + 360. Strange enough, that's the value I get from GetReportedHeading().
Are you using ES Beta or the public release version? I ask because I tested this once in an earlier beta and I believe it was working fine there.
I will take this to the ES Beta forum.

@pierr3
Copy link
Author

pierr3 commented Aug 31, 2016

Yes, I'm using the latest EuroScope beta, but somehow it works fine with
vSMR, which also uses this value to display the "primary target" on the
radar pointed the correct way.

2016-08-31 12:35 GMT+02:00 ogruetzmann notifications@github.com:

@pierr3 https://github.com/pierr3 I am able to reproduce this, it's
reported heading + 360. Strange enough, that's the value I get from
GetReportedHeading().
Are you using ES Beta or the public release version? I ask because I
tested this once in an earlier beta and I believe it was working fine there.
I will take this to the ES Beta forum.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#4 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABv6K0119JrCdNDHeC7bQLXnb8v-yRKsks5qlVjhgaJpZM4Jv6h7
.

@ogruetzmann
Copy link
Owner

ogruetzmann commented Aug 31, 2016

Did you check the actual return value there? Depending on what function you use, it will work just fine. I used GeographicLib in another plugin, and it doesn't matter if the value is 270 or 630, the result is the same.
I just checked in the public release version, the value is fine there. In the beta,
int hdg = GetReportedHeading()
leaves me with heading + 360 (I checked this via debug session).

To me it looks like Gergely has to fix it. If I do it, I'll either have to put in a switch, or I'll break it for public release users.

@ogruetzmann
Copy link
Owner

Here's the result from the public release (third row):
hdg

@pierr3
Copy link
Author

pierr3 commented Aug 31, 2016

Maybe just do (x + 360) % 360 ? It'll work for both public and beta.

@ogruetzmann
Copy link
Owner

Good idea. Never thought about using the modulo operator this way. I'll do this. :)

@ogruetzmann
Copy link
Owner

Looks fine:

ModeS-static.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants