Marco Milesi Posted December 27, 2015 Report Posted December 27, 2015 Hi all i have another problem with my tracker developed in VBnet. With the Majestic Q400 I do not record the location (latitude and longitude) and then not let me see the track while with all other aircraft works ok. Offsets that use are: Longitude As Offset(Of Long) = New Offset(Of Long)(&H568) Latitude As Offset(Of Long) = New Offset(Of Long)(&H560) while for the calculation use this function: Public Function getlatitude() Dim latdata = (Latitude.Value * 90 / (10001750 * 65536.0 * 65536.0)) Return latdata End Function Public Function getlongitude() Dim longdata = (Longitude.Value * 360.0 / (65536.0 * 65536.0 * 65536.0 * 65536.0)) Return longdata End Function does anyone know why? Thanks in advance Marco
Thomas Richter Posted December 27, 2015 Report Posted December 27, 2015 Hi, your functions are declared without a return type and 'return' a local declared variable (no public scope).
Paul Henty Posted December 27, 2015 Report Posted December 27, 2015 Hi Marco, It would be very surprising if a certain aircraft was stopping FSUIPC from reporting the Lon/Lat. Do you know what values are being returned from the function? Place a breakpoint on the 'Return' lines and see what's in the Latitude.Value property. I suspect what's happening is that these functions are never being run. This is probably because you have some other logic in the program which is not working because of the Q400. If it's a complex payware plane then they often model some things outside of FSX/P3D. This means you cannot get those value via FSUIPC. So maybe some other logic is not working and your program is never checking the Lon/Lat. Paul
Marco Milesi Posted December 28, 2015 Author Report Posted December 28, 2015 Thanks to all. @Paul: you're always right :razz: The problem is that the Majestic does not recognize the engine offset and my tracker performs a check on the state of the engines. Offsets that are used is: 0894 and 092C; I have to look for other offsets to recognize the state of the engines of the Majestic. Thanks Marco
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now