Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Looking for some help with Majestic Q400

Featured Replies

Hi All,

I'm making a home cockpit for the Majestic Q400 and I've just finished my Weather Radar panel. I've downloaded the excellent LINDA files for the Q400 however no controls for the Weather radar are in the file for assignment to my panel.

I've worked out how to do the Weather Mode (OFF, STBY, TEST, ON) as well as the Wx, WxA and GND MAP modes.

I'm stuck on getting the programming right for tilt and gain functions. Additionally, I'd like to make a toggle function for the Stab control.

Here's what Majestic supplies about these functions:

 

Name							Index	Type	Dir	Cockpit	UDP		Description
						
WXR_->controls.stab_off_cntr	F602	BYTE	IN	YES		YES		0 STAB ON, 1 STAB OFF (TILT knob pulled).
WXR_->controls.tilt_cntrl		F603	WORD	IN	YES		YES		0x0000 to 0xFFFF. Neutral 0x8000
WXR_->controls.gain_cntrl		F604	WORD	IN	YES		YES		0x0000 to 0xFFFF. Neutral 0x8000

Anyone have any insight on the best way to get these functions into my LINDA user file?

Dan

 

  • Author

Got the tilt working with the code below. This was tricky to figure out, but eventually I was able to do it. First, the range of the Tilt Knob is from 0 to 65535. There are 32 different tilt sets for the full range of motion on the radar (-15.9, -15, -14.....+13, +14,+15). 65535 divided by 32 is 2047.968. Essentially you're having LINDA read the position of the radar from MJC as a hex value, and then as long as it's not in the maximum range either way (-15.9 corresponds to 0 and +15 corresponds to 65535), LINDA adds 2047.96857 to the hex value to increase the tilt or subtracts to decrease the tilt. Clear as mud?

Next..the gain.

 

WxTiltDelta = 2047.96875

function WXR_Tilt_Inc ()
    WxTiltVar = MJCD8_Read(33799)

    if WxTiltVar < 63487 then
    WxTiltVar = WxTiltVar + WxTiltDelta
    else
    WxtiltVar = 65535
    end
    MJCD8_Write(WxTiltVar, 33799)

end

function WxTilt_Dec ()
    WxTiltVar = MJCD8_Read(33799)

    if WxTiltVar > 2000 then
    WxTiltVar = WxTiltVar - WxTiltDelta
    else
    WxTiltVar = 0
    end
    MJCD8_Write(WxTiltVar, 33799)

end

Working on the gain next.

Dan

 

  • Author
WxGainDelta = 3120.7142857

function WXR_Gain_Dec ()
    WxGainVar = MJCD8_Read(33287)

    if WxGainVar > 3119 then
    WxGainVar = WxGainVar - WxGainDelta
    else
    WxGainVar = 0
    end
    MJCD8_Write(WxGainVar, 33287)

end

function WXR_Gain_Inc ()
    WxGainVar = MJCD8_Read(33287)

    if WxGainVar < 62413 then
    WxGainVar = WxGainVar + WxGainDelta
    else
    WxtiltVar = 65535
    end
    MJCD8_Write(WxGainVar, 33287)

end

Here is the code for the gain increase/decrease.

Dan

 

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.