MobiFlight Community Support

Welcome to the forum for MobiFlight! Feel free to reach out to the community in case you have questions, issues or just want to share great ideas or details about your latest home cockpit project.

You like MobiFlight? Donate via PayPal and support the MobiFlight development. Thanks! 

icon
Avatar
cazadorman
Posts: 2
Hi all

First of all, I want to thank the producer of Mobiflight, i am realy appreciate for this.
It is not just an interface. At the same time it is a great program that the default airplane's offsets have been embedded in and have been created some areas that allows enter offsets of payware aircrafts such as PMDG. That's why you can configure what you need without being a programmer who can wrihte long codes.

I am working on PMDG MCP. There are a lot of topics about it.
this one https://www.mobiflight.com/forum/topic/565.html is very helpfull
thanks a lot Prizma82.

With a few small changes and additions, i managed to configure and run a PMDG MCP on P3D v4 (on FSX worked too).

My goal is creating a topic that allows to anyone easly find and useing.

sincerely yours


original topic by prizma82
https://www.mobiflight.com/forum/topic/565.html

Video:
https://www.youtube.com/watch?v=hxiEeNSBtVg

Mobiflight files and txt:

https://drive.google.com/drive/folders/1l97foa-VC9DLX6iiz5dVh8P05hXmdIoJ?usp=sharing


//-------------------------------------------oooOooo-----------------------------------------------//

Firstly create all the headings, then enter the offsets.



MCP_CRS_L_DISPLAY:

Offset: 6520 Volue Type: int Size in Byte: 2
Transform:
Display: 3 digits Left Padding YES 0

MCP_CRS_R_DISPLAY:

Offset: 6522 Volue Type: int Size in Byte: 2
Transform:
Display: 3 digits Left Padding YES 0

MCP_IAS_DISPLAY:

Offset: 6524 Volue Type: Float Size in Byte: 4
Transform:
Display: 3 digits Left Padding NO
Precondition 1:
Choose config : MCP_MACH_DISPLAY if current Value is : >= 1000
Precondition 2:
Choose config : MCP_IASBLANK_DISPLAY_READONLY if current Value is : = 0

MCP_MACH_DISPLAY:

Offset: 6524 Volue Type: Float Size in Byte: 4
Transform: $*1000+0.1
Display: 3 digits DECIMAL POINT under the left 3th digit, Left Padding YES - SPACEBAR
Compare:
If current volue is : >0 set it to: $ / 10.0 ( WITH DOT) else:
Precondition 1:
Choose config : MCP_IAS_DISPLAY if current Value is : <10
Precondition 2:
Choose config : MCP_IASBLANK_DISPLAY_READONLY if current Value is : = 0

MCP_IASBLANK_DISPLAY:

Offset: 6528 Volue Type: int Size in Byte: 1
Transform:
Display: 3 digits, Left Padding YES - SPACE
Compare:
If current volue is : = 1 set it to: Type 4xSPACE else:
Precondition:
Choose config : MCP_IASBLANK_DISPLAY_READONLY if current Value is : = 1

MCP_IASBLANK_DISPLAY_READONLY

Offset: 6528 Volue Type: int Size in Byte: 1
Transform:

MCP_IASOverspeedFlash:

Offset: 6529 Volue Type: int Size in Byte: 1
Transform:
Display: 1 ( 4th left of the IAS display setting) Left Padding NO
Compare:
If current volue is : = 1 set it to: 8 else: type 1xSPACEBAR
Precondition:
Choose config : MCP_IASUnderspeedFlash if current Value is : ! = A

MCP_IASUnderspeedFlash:

Offset: 652A 1 byte INT No Transform
Display: 1 digit Left Padding NO (The same display as Overspeed)
Compare:
If current volue is : = 1 set it to: A else: type 1xSPACEBAR
Precondition:
Choose config : MCP_IASOverspeedFlash" if current Value is : ! = 8

MCP_HDG_DISPLAY:

Offset: 652C Volue Type: int Size in Byte: 2
Transform: $*1
Display: 3 Left Padding: YES 0
Compare:

MCP_ALTITUDE_DISPLAY:

Offset: 652E Volue Type: int Size in Byte: 2
Transform:
Display: 5 Left Padding: YES SPACE
Compare:
If current volue is : < 0 set it to: $+65536 else: $
Precondition:
Choose config : MCP_ALTITUDE_DISPLAY_00000 if current Value is : > 0

MCP_ALTITUDE_DISPLAY_00000:

Offset: 652E Volue Type: int Size in Byte: 2
Transform:
Display: 5 Left Padding: YES SPACE
Compare:
If current volue is : = 0 set it to: 00000 else: $+65536
Precondition:
Choose config : MCP_ALTITUDE_DISPLAY if current Value is : = 0

MCP_VS_DISPLAY:

Offset: 6530 Volue Type: int Size in Byte: 2
Transform:
Display: 5 Left Padding: YES SPACE
Compare:
If current volue is : = 0 set it to: 0000 else: $
Precondition:
Choose config : : MCP_VS_BLANK_DISPLAY if current Value is : = 0

MCP_VS_BLANK_DISPLAY:

Offset: 6532 Volue Type: int Size in Byte: 1
Transform:
Display: 5 Left Padding: YES SPACE
Compare:
If current volue is : = 1 set it to: Type 5*SPACEBAR else: $
Precondition:
Choose config : : MCP_VS_DISPLAY if current Value is : <-10000
[Last edited by cazadorman, 2018-06-23 16:45]
2018-06-23 16:35
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 5501
Supporter
Hi. Thanks for rework the old stuff. I know it was not perfect and missunderstanding in case of Multiply and transform field.


On first view i only see 2 facts.... ( Try to check the hole guide next week)

1. High length Names. ...
For example " MCP_IASBLANK_DISPLAY_READONLY"
Some users report that Long names in Configs "can" get into trouble.
I personaly recommend to users to reduce Config names ( same like Device names) to a shorter format. Also Symbols like "_" are "maby" problematic in larger config files.

This is not a direct problem.... This is just a recommendation to prevent maby problems in the future.

2. IAS MACH Speed

iconQuote:

Offset: 6524 Volue Type: Float Size in Byte: 4
Transform: $*1000+0.1
Display: 3 digits DECIMAL POINT under the left 3th digit, Left Padding YES - SPACEBAR
Compare:
If current volue is : >0 set it to: $ / 10.0 ( WITH DOT) else:
Precondition 1:
Choose config : MCP_IAS_DISPLAY if current Value is : <10
Precondition 2:
Choose config : MCP_IASBLANK_DISPLAY_READONLY if current Value is : = 0



Here i miss the ROUND parameter.
Check this .... https://www.mobiflight.com/forum/message/5920.html
THEN you understand why i use decimal instead of point like you ..... Cause the Decimal is a part of the rounding function.
With ROUND you not need the +0,1 in transform.

But summary... Thank you for your work ! :thumbup:
Good Luck !
2018-06-23 21:41
Avatar
cazador
Posts: 4
OK then;

IMPORTANT NOTICE


iconpizman82:


1. High length Names. ...

For example " MCP_IASBLANK_DISPLAY_READONLY"

Some users report that Long names in Configs "can" get into trouble.

Also Symbols like "_" are "maby" problematic in larger config files.


2018-06-24 00:39
Avatar
cazador
Posts: 4
iconpizman82:



2. IAS MACH Speed


Transform: $*1000+0.1

If current volue is : >0 set it to: $ / 10.0 ( WITH DOT) else:



Here i miss the ROUND parameter.
Check this .... https://www.mobiflight.com/forum/message/5920.html
THEN you understand why i use decimal instead of point like you ..... Cause the Decimal is a part of the rounding function.
With ROUND you not need the +0,1 in transform.



Well, before i started MCP config, i have read both of two topics.
After your reply i tried again.

$*1000

$ / 10,0 (DECİMAL)


but mobiflight does not accept DECİMAL.

I am not an expert so I can not speak ambitious .Maybe I'm doing something wrong, but this is the result.

https://www.youtube.com/watch?v=qMpnyqxtaK0
[Last edited by cazador, 2018-06-24 01:25]
2018-06-24 01:14
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 5501
Supporter
You simply "miss" the ROUND Command.

maby you translate my german Original Text with a App like Google Translator.
In the past we have sometimes problems that Google cut out some words ( for example if they are already English in Original Text)
So it can happen that the word "round" is not longer existing in your Auto transalation result.

Correct Syntax for the THEN Field in Compare tabe is .... "Round($/10,0 " Its a DECIMAL not a Point !!

Here is original text...
iconQuote:

MACH:
Offset 6524 4 byte Float Multi 1000 (THOUSAND), 3 digits DECIMAL POINT on the left of the 3 digits, Left Padding YES - SPACE (Here the same display and positions as for IAS)
For Compare use IF Value is bigger then Zero >0 THEN Round($ / 10,0)
....



**********
Why a Decimal ???

In Mobiflight Mathematical Syntax there exist a POINT . and a DECIMAL , !
1. A Point means the real decimal.... If you need a FLOAT Value like 1,234 THEN This is in Scripting Code always a POINT . So it must be 1.234
2. A Decimal splits parts of a function ! For Example a If Function got Syntax if(Condition,Then,Else) For example if($=1,9,0) This means IF Value is 1 Then set value to 9 Else set value to 0 ! You see..... Here the 3 Things (Condition, Then and Else) are split with the DECIMAL.

Same System is used for ROUND Function ... here Syntax is Round(Value,Numer of Decimalparts ) For example Round($,2) means Round Current value to 2 decimal Numbers.
So a Value like 1,23999 result in 1,24 .

******

Summary :
If you use a Point in that case then the result is $/10.0 Means Value divide through 10,0 :::::: 10,0 is the same like 10 . So this not occure in a error but make no sense finaly.
If you use a decimal BUT without the "Round" command then Mobiflight crash .... Cause you use a DECIMAL , without a Command like Round, IF, and so on.
(( Important NOTE ... "Round" must be written with a big R ..... if you write "round" then Mobi will crash to.... The Syntax must be 100% correct all time ! ))

Finaly why it work..... Cause you use the tricky $+0.1 in Transform.... That will always Add 0.1 and will round the Value theoretical. But This is not correct ! In some Cases this will not work correct and maby a speed of Mach 0,69 in Sim is shown as Mach 0.70 in your Display..... With the "Round" it normaly be correct 100%


I hope this explane all the stuff.
Good Luck !
2018-06-24 03:14
Avatar
cazador
Posts: 4
iconpizman82:

You simply "miss" the ROUND Command.

Correct Syntax for the THEN Field in Compare tabe is .... "Round($/10,0 " Its a DECIMAL not a Point !!

Here is original text...

iconQuote:

MACH:
Offset 6524 4 byte Float Multi 1000 (THOUSAND), 3 digits DECIMAL POINT on the left of the 3 digits, Left Padding YES - SPACE (Here the same display and positions as for IAS)
For Compare use IF Value is bigger then Zero >0 THEN Round($ / 10,0)
....





You are absolutely right.
i've missed Round word of front of $/10,0 but this is not related with Google translate difficulties. i've just thought that "Round" word indicates that <<$/10,0>> syntax gives rounding result.
Everything more clear right now. I am going to change related areas now.
[Last edited by cazador, 2018-06-24 11:23]
2018-06-24 11:14
Avatar
StephanHo
From: EDDG, Germany
Posts: 1819
Supporter
Hi everyone,

It is true that in most European countries the decimal place is the comma (,). When programming, on the other hand, it is the point (.).

Therefore, when we talk about Mobiflight, the decimal place will always be the point, while the comma will act as a parameter separator or enumeration.

By now, most Europeans have gotten used to it and are handling it accordingly.

In aviation, they make it very easy to handle. They just say "decimal", no matter if it's a comma or a dot.
Grüße,
Stephan (Time: UTC+1)
2018-06-24 20:33
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 5501
Supporter
OFF TOPIC :love:

iconStephanHo:


In aviation, they make it very easy to handle. They just say "decimal", no matter if it's a comma or a dot.



Thats not 100% correct i think..... here we got a location fact, too. US Airspace (FAA) and the Rest of the World (ICAO).

If you monitor Live ATC for example of Amsterdam or Zurich you here they use DECIMAL.
For example in Zurich "Contact tower on One One Eight DECIMAL One"

If you monitor KJFK New York then you can see the US phrases work with POINT.
They say " Monitor Ground on One Two One POINT Niner" .... Or short "Call Ground POINT Niner"

Basicly stupid.... Google for that... There are more differences.... For example in Europa they say "Line up and Wait" in US you hear "Position and Hold"
Good Luck !
2018-06-25 09:54
Avatar
StephanHo
From: EDDG, Germany
Posts: 1819
Supporter
OFF TOPIC again

Here the master is wrong.

The name POINT is only valid for flights within the USA.
For international flights DECIMAL applies.

See ICAO Civil Aviation Regulations for Air Navigation Services, Annex 10, Volume 2, Amentment 89:

5.2.1.4.1.1 with the decimal point in appropriate sequence being indicated by the word DECIMAL.

Note 1.- The following examples illustrate the application of this procedure:

Number Transmitted as

100.3 ONE ZERO ZERO DECIMAL THREE
38 143.9 THREE EIGHT ONE FOUR THREE DECIMAL NINE

Note 2.- For identification of VHF frequencies the number of digits used after the decimal point are determined on the basis of the channel spacing (5.2.1.7.3.4.3, refer to frequencies separated by 25 kHz, 5.2.1.7.3.4.4 to separate frequencies by 8.33 kHz.

Note 3.- The channeling / frequency pairing relationship for 8.33 kHz and 25 kHz is found in Table 4.1 (bis), Volume V.


Only for the sake of completeness

Original document: https://www.google.de/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0ahUKEwi8h7H5y-7bAhVEYJoKHf1yAMMQFggqMAA&url=https%3A%2F%2Fwww.icao.int%2Fsafety%2Facp%2FInactive%2520working%2520groups%2520library%2FACP-WG-C-3%2Fwgc3_wp7.doc&usg=AOvVaw1EBjorRsnL2VqA8p48SmCO
Grüße,
Stephan (Time: UTC+1)
2018-06-25 12:40
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 5501
Supporter
Last time OFF TOPIC... I swear :blush:

iconStephanHo:


Here the master is wrong.

The name POINT is only valid for flights within the USA.
For international flights DECIMAL applies.



iconpizman82:


Thats not 100% correct i think..... here we got a location fact, too. US Airspace (FAA) and the Rest of the World (ICAO).
...
There are more differences.... For example in Europa they say "Line up and Wait" in US you hear "Position and Hold"



Thats what i´m say... In US it´s point ... everywhere else its decimal. ( Whatever it should me decimal in US too but FAA do it own rules ( same with Trasition Level or VFR Squwak)
Or do i NOW missunderstand you Stephan ?

by the way.... Thank you for the "master" B)
Good Luck !
2018-06-26 00:31
Avatar
slammer88
From: LTBJ, Turkey
Posts: 154
Hi guys.

I've tried the uploaded config file of cazador, but IAS module somehow giving me config errors. Is it totally correct right now or are there any mistakes ? I am getting IAS & Mach displays with under & over speed, but when it goes to blank, mobiflight stops working.

Any ideas ?
2019-01-13 12:37
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 5501
Supporter
Hi Slammer.

I not use the File from him. So i not check it for errors and if he include/fix the issues we talk about here in the past (missing round)

Basicly:

If Mobiflight Stop working ( Run Button change into Stop button and Error Message in Logging) THEN
You have a Error in your Config. Mostly a wrong syntax.

If Mobiflight Run already but just your Display is Blank in wrong spot ( And start working again if you just change the Value with encoder) THEN
Thats a Bug in 7.5.0 and must be reworked ( You still know from other topic we talk about)

!!! NOTE: Maby somebody find time to CHECK the File from Above.... If its a broke Error File the user should rework it or delete it to stop confusing !
Good Luck !
2019-01-14 08:21
Avatar
Storic
From: Norway
Posts: 2
Hi,

Sorry to bump this old thread, but I have followed the setup described. But I'm having issues with the IAS/MACH display.

MCP_IAS_DISPLAY and MCP_MACH_DISPLAY work, but the problem is MCP_IASBLANK_DISPLAY and MCP_IASBLANK_DISPLAY_READONLY.

When there is no numbers in the sim-display, the MCP_IASBLANK_DISPLAY_READONLY sends "1".
And when the sim display is active it sends "0" at the same time as IAS or MACH is also sending value to the display. Making it flicker, with 0 beeing the clearest.


Any idea what is wrong here?
Have doubled and trippled checked the compare and preconditions, and they are the same as the first post.
2022-03-19 20:33
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 5501
Supporter
Hi

this guide is mutliple times outdated.

PMDG change some logics meanwhile ( NGX"u") and also Mobiflight over the years allow lots of new stuff ( Placeholder/ Refferences , Blanking a Display by Dim Feature and so on)
Whorst Problem.... I no longer own P3D ( i swap to FS2020 last year) .... So i not be able to check this myself !


Basically.... the main Idea still workes... But today we would make those Configs much more efficient and more easy.

Please contact me on DISCORD.
then we can check the Config in a live Shared Screen Season.

I´m 100% sure your problem is a wrong Precondition.... So 2 Configs work same time ( whatever should not do this).
BUT
As i said... Today we no longer use Preconditions. today we would solve this within one single config with new features and posibilitys.

Lets figure this out together..... Contact me !
Good Luck !
2022-03-20 00:15
Avatar
Storic
From: Norway
Posts: 2
Thanks for your reply!

Will send you a discord msg next time I see you are online and I have the time! :thumbup:
2022-03-20 10:08
icon