Get Information about the aircraft's Gears

Discuss on the SimConnect SDK can be used by programmers to write add-on components for Prepar3D
Post Reply
redouane_bpw
Posts: 31
Joined: Sat Dec 01, 2018 1:29 pm

Get Information about the aircraft's Gears

Post by redouane_bpw »

Hello
i'm making an addon using the simconnect and I need help !
i know how to request the user aircraft position but i need to request the front gear (wheel ) position too
in the SDK this variable doesn't exist and i tried many Maths solutions to calculate the position of the front gear But no result :( !
i tried by considering P3D wolrd as 2D falt groud but also no result !

hope some one can help me getting the front gear position in coordinates LAT /LON ( not meters PLZ )

and thnx in advance :)
BenBaron
Posts: 80
Joined: Fri Jan 16, 2015 7:51 am

Re: Get Information about the aircraft's Gears

Post by BenBaron »

Hi,

just a quick one: I don't know how to do this via SimConnect, or if this was even possible. When I needed this information, I used FSUIPC to get the path of the currently loaded aircraft.cfg. Within you have the contact_points section where you can query the x, y, z-offset of the front gear. From there, it is easy to calculate it's lat and lon from the aircraft position.

This was the only thing comming to my mind.

Greets, Benny
redouane_bpw
Posts: 31
Joined: Sat Dec 01, 2018 1:29 pm

Re: Get Information about the aircraft's Gears

Post by redouane_bpw »

Can you plz tell me how to calculate it ? Using offsets
i used all my maths but, earth isn't Flat !
User avatar
janvaane
Posts: 918
Joined: Mon Apr 23, 2012 11:17 am
Contact:

Re: Get Information about the aircraft's Gears

Post by janvaane »

It is written in the FSUIPC manuals in C:\P3D4\Modules\FSUIPC Documents\
Use an Offset status pdf document and search with the keyword "position" it will give you the INITIAL POSITION
Offset 0560 and 0568 will give you the LAT and LON
Hope that this will give you some directions.
|KLM149 | i7-8700k-16GB | Radeon RX580 8GB| flightsimeindhoven.com |
User avatar
WarpD
Posts: 1469
Joined: Mon Feb 14, 2011 5:29 am

Re: Get Information about the aircraft's Gears

Post by WarpD »

1. No need to use FSUIPC to obtain lat/lon of aircraft. None.
2. To calculate lat/lon of gear you simply need to use a great circle projection from the aircraft's lat/lon based on heading and distance to nose gear.
Ed Wilson
Senior Developer
Mindstar Aviation
redouane_bpw
Posts: 31
Joined: Sat Dec 01, 2018 1:29 pm

Re: Get Information about the aircraft's Gears

Post by redouane_bpw »

WarpD wrote: Thu Jan 03, 2019 10:52 pm 1. No need to use FSUIPC to obtain lat/lon of aircraft. None.
2. To calculate lat/lon of gear you simply need to use a great circle projection from the aircraft's lat/lon based on heading and distance to nose gear.
I asked the same question in fsdev
and still no answer how to calculate that
you know i got a solution already but i need to find out how to calculate without my attachment solution
User avatar
WarpD
Posts: 1469
Joined: Mon Feb 14, 2011 5:29 am

Re: Get Information about the aircraft's Gears

Post by WarpD »

Google is a brilliant help... but here:

http://www.edwilliams.org/avform.htm#LL
Ed Wilson
Senior Developer
Mindstar Aviation
BenBaron
Posts: 80
Joined: Fri Jan 16, 2015 7:51 am

Re: Get Information about the aircraft's Gears

Post by BenBaron »

WarpD wrote: Thu Jan 03, 2019 10:52 pm ...based on heading and distance to nose gear.
Is the x,y,z-offset of the NLG directly available via SimConnect?

Greets, Benny
JB3DG
Posts: 609
Joined: Mon Jan 09, 2012 6:44 pm

Re: Get Information about the aircraft's Gears

Post by JB3DG »

Nope. Always been one of those things that we have had to extrapolate.
Jonathan Bleeker
Milviz systems dev

Formerly known as Naruto-kun
obinder
Posts: 145
Joined: Sun Jun 08, 2014 9:43 am

Re: Get Information about the aircraft's Gears

Post by obinder »

Hi @ll,

what about "PUSHBACK CONTACTX, Y, Z"?

If an aircraft is built to spec and if it has a front gear, wouldn't those simulator variables give you the correct location?

Best regards
Oliver Binder
Lorby-SI
redouane_bpw
Posts: 31
Joined: Sat Dec 01, 2018 1:29 pm

Re: Get Information about the aircraft's Gears

Post by redouane_bpw »

i think it's about to us too to get them !
obinder
Posts: 145
Joined: Sun Jun 08, 2014 9:43 am

Re: Get Information about the aircraft's Gears

Post by obinder »

redouane_bpw wrote: Sun Jan 06, 2019 8:01 pm i think it's about to us too to get them !
Sorry, but I don't understand.

The simulator variables mentioned above work just fine for me. They give me the offset from the datum reference point to the location on the 3D model where the tug attaches, which, with an aircraft that actually has a front gear, should be pretty much the exact same spot where the front gear itself is.

The lat/lon you get when querying the aircraft position are those of the datum reference point, so a simple calculation using those "PUSHBACK OFFSET" values results in lat/lon of the front gear. No magic required.

Best regards
Oliver Binder
Lorby-SI
Post Reply