• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Coordinates (heading) isn't correct ???

Messages
107
Country
vietnam
Hi,

New problem, new question . It's about ground polygon tweaking again .:confused:
In Gmax, I created 2 ground polygons
- Ground (layer 8) -> ground.asm, ground_0.asm
- Runway 25R/7L (layer 12) -> 25r7l.asm, 25r7l_0.asm

and exported them separately .
After that, I tweak the ASM file to call two layers in one ASM file (followed the article : http://www.fsdeveloper.com/wiki/index.php?title=Ground_polygons_(ASM_tweak)) and renamed it ground_layout.asm.
But after I exported again, in FS, it didn't show the correct heading I set for 2 files when I export them with FS2002 MakeMDL.exe .
I thought the difference appeared when I tweaked the ASM file .

Here is the coordinate of Ground.asm file
;compile with BGLC /BGL G:\gmax\Scenes\ground.asm
header label word
dw 0001 ; 00 World set number
dd 0001267B8H ; 02 North bound
dd 000124754H ; 06 South bound
dd 04BD9C6E1H ; 10 East bound
dd 04BD9C6DFH ; 14 West bound
dw 20 dup(0)
dd (offset OBJECT_DATA) - (offset header)
dw 33 dup(0)

OBJECT_DATA label word
db 21 ;;LATBAND_REL
dw 00923h ;;lat min (inclusive) 512M units
dw 00934h ;;lat max (exclusive)
dd (offset OBJECT_0) - (offset OBJECT_DATA)
db 0 ;;EOL
OBJECT_0 label BGLCODE
db 12 ; NEAR_FAR_HUGE_OBJECT_HEADER
dd 000125786h,04BD9C6E0h ; latitude,longitude
db 100 ; image power
dd (offset OBJECT_0_END) - (offset OBJECT_0)

and 25L7R.asm file :
;compile with BGLC /BGL G:\gmax\Scenes\25r7l.asm
header label word
dw 0001 ; 00 World set number
dd 0001263D6H ; 02 North bound
dd 000124B36H ; 06 South bound
dd 04BD9C6E1H ; 10 East bound
dd 04BD9C6DFH ; 14 West bound
dw 20 dup(0)
dd (offset OBJECT_DATA) - (offset header)
dw 33 dup(0)

OBJECT_DATA label word
db 21 ;;LATBAND_REL
dw 00925h ;;lat min (inclusive) 512M units
dw 00932h ;;lat max (exclusive)
dd (offset OBJECT_0) - (offset OBJECT_DATA)
db 0 ;;EOL
OBJECT_0 label BGLCODE
db 12 ; NEAR_FAR_HUGE_OBJECT_HEADER
dd 000125786h,04BD9C6E0h ; latitude,longitude
db 100 ; image power
dd (offset OBJECT_0_END) - (offset OBJECT_0)

The tweaking file Ground_layout.asm file I used the coordinate of ground.asm file .
The question is what's the exactly coordinate I should use when I tweaking :confused:

If I tweak 2 files ground.asm and 25r7l.asm seperately, they worked fine (FS show correct heading, coordinates) . But I tweak as complex method, don't work for me !!!

Thanks
 

Attachments

Last edited:
Hi,

I think there are two things you could be seeing here:

  1. MakeMDL rounds the coordinates you input, so anything behind the dot will be lost. That could thus result in small errors for the heading.
  2. Did you export both files with the same coordinates and heading from GMax? If that is not the case than combining them in the same ASM file is not a good idea. That only works fine if they have the same origin and heading.
 
Hi Arno,
I attached two picture captured from my FS, please look at them .
When I exported all ground polygons from Gmax and exported with MakeMDL FS2k2, I set the coordinate : 10.816594 -> N10* 48' 59.7384 and 106.665034 -> E106* 39' 54.1224, heading 249 degree .
It created ground.bgl and 25r7l.bgl (2 ASM files included). When I copied two bgl files to my scenery, it worked fine .
But if I tweak the ASM file to call them into the unique ASM file, the heading doesn't correct :confused:
 

Attachments

  • fs9 2008-08-11 13-07-29-87.jpg
    fs9 2008-08-11 13-07-29-87.jpg
    91.5 KB · Views: 618
  • fs9 2008-08-11 13-13-47-76.jpg
    fs9 2008-08-11 13-13-47-76.jpg
    95.9 KB · Views: 596
Last edited:
Hi,

When applying the tweak you did not copy the command that does the rotation. Try to code like this:

Code:
OBJECT_0_START label word
    ADDCAT      OBJECT_0_GROUND, 8
    ADDCAT      OBJECT_0_25R7L, 12
    BGL_JUMP_32 OBJECT_0_END  

OBJECT_0_GROUND label    BGLCODE
    SCALE_AGL   OBJECT_0_RETURN, 10000, 4146, 131072, 000125786h, 019B6h, 04BD9C6E0h, 00BE5h, 0, 0
    INSTANCE_CALL   obj_ground, 0, 0, 0B111h
    BGL_RETURN


OBJECT_0_25R7L label    BGLCODE
    SCALE_AGL   OBJECT_0_RETURN, 10000, 3152, 131072, 000125786h, 019B6h, 04BD9C6E0h, 00BE5h, 0, 0
    INSTANCE_CALL   obj_25r7l, 0, 0, 0B111h
    BGL_RETURN

OBJECT_0_RETURN label word
    BGL_RETURN

obj_ground label word
    include    ground_0.asm

obj_25r7l label word
    include   25r7l_0.asm    

OBJECT_0_END label word
EOF
 
Hi again Arno,
Yes, that's it, thank you very much for your useful advice :D
Now it worked fine and I can tweak more.......
 
Back
Top