-
Posts
82 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Gallery
Downloads
Posts posted by jd
-
-
i'm at a loss at why rc would cause follow me to stop working. can you give me any more information? or maybe you can post your problem in the radar contact forum where maybe some others with similar configurations can help you.
http://forums1.avsim.net/index.php?showforum=135
jd
-
do it the math this way
x / 65536 / 65536 * 360
-
you have to do some conversions
here is my routine to set the plane at the proper lat/long/alt
Public Function set_plane(lat As Single, lon As Single, alt As Single, hdg As Single) As Boolean
Dim x As Long
Dim dwresult As Long
x = FTOM(CLng(alt))
Call FSUIPC_Write(&H574, 4, VarPtr(x), dwresult)
x = lat * 10001750 / 90
Call FSUIPC_Write(&H564, 4, VarPtr(x), dwresult)
x = lon * 65536 * 65536 / 360
Call FSUIPC_Write(&H56C, 4, VarPtr(x), dwresult)
x = hdg * 65536 * 65536 / 360
Call FSUIPC_Write(&H580, 4, VarPtr(x), dwresult)
Call FSUIPC_Process(dwresult)
-
Call FSUIPC_WriteS(&H8001&, Len(fsuipckey), fsuipckey, dwResult) '
Call FSUIPC_Process(dwResult)
where fsuipckey is a string containing the key (no spaces), concatenated with a null
jd
-
for the ai aircraft, that data is in the tcas tables. check the documentation for specifics
jd
-
my vb does unsigned arithmetic :-)
-
you're probably overflowing the magvar variable
i use
MagVar = MagVar / 65536 * 360
what is the real magnetic variation where you're at? i'm betting that it is really -20, which will yield a number slightly higher than 360
so you will need a routine to take a heading that is larger than 360, and normalize it to a number between 0 and 359
jd
-
no idea, sorry
jd
-
Function norm360(h As Long) As Long
If h > 360 Then
norm360 = h - 360
ElseIf h = 0 Then
norm360 = 360
ElseIf h < 0 Then
norm360 = h + 360
Else
norm360 = h
End If
End Function
-
here is my code snippet
Public Function Plane_heading() As Single ' degrees Plane's magnetic heading.
Dim x As Long
Dim dwResult As Long
Call FSUIPC_Read(&H580, 4, VarPtr(x), dwResult)
Call FSUIPC_Process(dwResult)
Plane_heading = norm360((x / 65536 / 65536 * 360) - magvar)
end function
you may have to adjust for the magnetic variation, which is what magvar is (another function, to get the current magnetic variation)
norm360 is a normalize function, which brings all heading to a range of 1-360 degrees
-
twenty degree magnetic variation would put you within 1 degree of the number you gave me
jd
-
and what was the magnetic variation?
jd
-
what was your plane heading?
-
i don't know what to say. this is the function i have used in radar contact since v3. it works, because i'm constantly checking the plane heading..
Public Function Plane_heading() As Single
Dim x As Long
Dim dwResult As Long
Call FSUIPC_Read(&H580, 4, VarPtr(x), dwResult)
Call FSUIPC_Process(dwResult)
Plane_heading = x / 65536 / 65536 * 360
End Function
-
it's vb6, and the code has worked that way from v3.x through v4.x without a problem.
-
Public Function Plane_heading() As Single
Dim x As Long
Dim dwResult As Long
Call FSUIPC_Read(&H580, 4, VarPtr(x), dwResult)
Call FSUIPC_Process(dwResult)
Plane_heading = x / 65536 / 65536 * 360
End Function
-
for plane altitude, i use the following
Dim x As Long
Dim dwResult As Long
Call FSUIPC_Read(&H574, 4, VarPtr(x), dwResult) 'meters
Call FSUIPC_Process(dwResult)
Plane_Alt = Mtof(CSng(x))
-
Press Release
JDT LLC Announces Radar Contact Version 4 will begin shipping December 10, 2005.
Flight Simulator will now have the best ATC at every airport, every hour, every day.
Memphis, TN, November 11 2005: John Dekker and Doug Thompson report that Radar Contact Version 4 has been released to manufacturing, with an expected general availability of December 10, 2005. Radar Contact, a highly successful Flight Simulator ATC add-on, provides a realistic experience to Flight Simulator enthusiasts, wherever and whenever they fly.
Version 4 offers:
· Interaction with traffic on the ground and in the air around you. Realistic chatter to and from the traffic.
· Internationalization – which means realistic Transition Altitude/Transition Level, proper phraseology outside the United States, more accurate ATC procedures.
· Enroute holds now tied to arrival weather.
· Support for pilot's discretion (PD) descent clearance from cruise to allow descents that are better aligned with those calculated by FMCs/CDUs.
· Centers accurately divided into real world sectors.
· More pilots, more controllers, 109 popular airport names recorded, over 700 carrier names recorded, all center names recorded, all aircraft types recorded.
· More realistic crossing restrictions based on runway in use. Runways chosen based on AI activity.
· More efficient arrival vectors.
More information available at http://www.jdtllc.com
-
what is the value if sim_any when you call the fsuipc_open?
breakpoint there, and hover the variable.
-
i'm assuming SIM_ANY is defined?
i'm assuming fs is running when you try this button click?
suggest you breakpoint at every fsuipc call, and make sure all your variables contain the right values, and find which call causes the error message
jd
-
let's see the code
-
Hi There guys,
I have been playing around with this FSUIPC module for a few days now and i just cant figure this out.
Im trying to get my VB program to read and check FS if im slewing or not.
I currecntly have this code..
Private Sub Command1_Click() Dim dwResult As Long Dim Slew As Integer If FSUIPC_Read(&H5DC, 2, VarPtr(Slew), dwResult) Then If FSUIPC_Process(dwResult) Then If dwResult = 1 Then MsgBox "Slewing Else MsgBox "Not slewing End If End If Else MsgBox "Cant read FSUIPC" End If End Sub
I just keep getting the error "Cant read FSUIPC".
Also the example in the SDK doesnt work either.
Please can someone help me.
Thanks in Advance..
Dave
definately fsuipc_open, also
test for slew = 1 not dwresult = 1
-
and roll ;-)
-
here is my code
Public Function Plane_Bank() As Single
Dim x As Long
Dim dwResult As Long
Call FSUIPC_Read(&H57C, 4, VarPtr(x), dwResult)
Call FSUIPC_Process(dwResult)
Plane_Bank = x / 65536 / 65536 * 360
End Function
Hoping soon for Version 2... Please!
in FollowMe Support Forum
Posted
oh, sorry.