Board index FlightGear Support Compiling

FlightGear Simulation using 6DoF Preconfigured Block  Topic is solved

Building FlightGear from source, and in the need for help?

FlightGear Simulation using 6DoF Preconfigured Block

Postby TenaciousT » Mon Nov 21, 2016 12:16 am

Hi all,

I am using Simulink to input flight data namely the latitude, longitude, and altitude data into FlightGear. This is done via the 6DoF Preconfigured Block which takes in
latitude longitude altitude and aircraft attitude data. The simulation can be compiled within simulink however in FlightGear it showed that my aircraft is situated what seemed like outer space?

I have set my run script to running like the following: (time of day should be morning but it seemed that it's not working)

D:
cd D:\Program Files\FlightGear 3.4.0\

SET FG_ROOT=D:\Program Files\FlightGear 3.4.0\\data
.\\bin\fgfs --aircraft=c172 --fdm=network,localhost,5501,5502,5503 --fog-fastest --disable-clouds --timeofday=morning --disable-sound --in-air --enable-freeze --airport=NZCH --runway=20 --altitude=0 --heading=92.1646 --offset-distance=0 --offset-azimuth=0 --lon=172.5569 --lat=-43.6533
TenaciousT
 
Posts: 10
Joined: Thu Nov 17, 2016 8:31 pm

Re: FlightGear Simulation using 6DoF Preconfigured Block

Postby wkitty42 » Mon Nov 21, 2016 2:41 am

what version of flightgear are you using? the --timeofday option was broken several version back and has been fixed since then...

on the other parameters... choose the --airport --runway OR the --lon --lat --heading stuff... i'm using the latest 2017.1.0 code and the --lon --lat took preference over the --airport... those coordinates place you 10nm south of NZCH headed east with NZWG 6.1nm away between you and NZCH...

you might also want to verify that you have the --altitude set properly as i'm not sure i'm understanding what you mean by "seemed like outer space"... my tests just now are with the UFO and it seems to spawn properly at ground level at those lon lat coordinates... can you maybe provide a screen shot of this? you'll have to post it on a site like imgur or similar and then link the image here...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 4630
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: FlightGear Simulation using 6DoF Preconfigured Block

Postby TenaciousT » Mon Nov 21, 2016 4:13 am

Hi wkitty42,

I am using FlightGear v3.4.0. My altitude that's fed into the block starts initially at 15m, I could manipulate the data to make this the relative reference. Here are some screenshots, (thanks for the imgur tip):
Simulink model inside the subsystem:
Image

Full Simulink model on the outside:
Image

Simulated Output screenshot in FlightGear:
Image

I will need to try your suggestion by placing --lat --lon at the beginning and omit the --airport options.
TenaciousT
 
Posts: 10
Joined: Thu Nov 17, 2016 8:31 pm

Re: FlightGear Simulation using 6DoF Preconfigured Block

Postby ludomotico » Mon Nov 21, 2016 6:20 am

TenaciousT wrote in Mon Nov 21, 2016 4:13 am:My altitude that's fed into the block starts initially at 15m,


Since NZCH seems to have an altitude of 35m above see level, are you sure you are setting the aircraft above the ground?
User avatar
ludomotico
 
Posts: 997
Joined: Tue Apr 24, 2012 1:01 pm
Version: git
OS: Debian GNU/Linux

Re: FlightGear Simulation using 6DoF Preconfigured Block

Postby TenaciousT » Mon Nov 21, 2016 9:12 am

Even though NZCH has an altitude of 35m above sea level, the longitude and latitude that I have set takes precedence over which airport I set it to. Beside the point, I have tried setting the altitude below the visible ground level and it showed to me that I could still see the aircraft clearly below the ground surface. So I do not think setting it to ground level contributes to the whole simulation screen turning pitch dark and that I could see starry skies all round.
TenaciousT
 
Posts: 10
Joined: Thu Nov 17, 2016 8:31 pm

Re: FlightGear Simulation using 6DoF Preconfigured Block

Postby TenaciousT » Tue Nov 22, 2016 9:41 am

- what OS (Windows Xp/Vista, Mac etc.) are you running? I am running Windows 10
- what FlightGear version do you use? Running FlightGear v3.4
- what graphics card do you have? Intel 4000
- does the problem occur with any aircraft, at any airport? Not sure.
- where did you download your aircraft/scenery from? Built in software
- is there any output printed to the console (black window)? Aircraft seemed to locate in outerspace with visible moon.
TenaciousT
 
Posts: 10
Joined: Thu Nov 17, 2016 8:31 pm

Re: FlightGear Simulation using 6DoF Preconfigured Block

Postby Parnikkapore » Tue Nov 22, 2016 10:04 am

-Remove the --altitude or change it to 1000.
-Try disabling the Simulink link.
-Set the time: Are you under the ground?
There are free alternatives to every program you encounter. You just have to find them.
Parnikkapore
 
Posts: 752
Joined: Thu Oct 29, 2015 10:16 am
Callsign: HS-FGS
Version: next [PPA]
OS: Mint 18

Re: FlightGear Simulation using 6DoF Preconfigured Block

Postby TenaciousT » Tue Nov 22, 2016 9:32 pm

Hi Parnikkapore,

I don't think I should be disabling the link to Simulink otherwise I would not be able to visualise the data sent to FlightGear.
When you say Set the time you mean --TimeofDay=morning?
This is my script without the altitude:
D:
cd D:\Program Files\FlightGear 3.4.0\

SET FG_ROOT=D:\Program Files\FlightGear 3.4.0\\data
.\\bin\fgfs --aircraft=c172 --fdm=network,localhost,5501,5502,5503 --lat=-43.6533 --lon=172.5569 --fog-fastest --disable-clouds --disable-sound --in-air --enable-freeze --timeofday=morning --heading=92.1712 --offset-distance=0 --offset-azimuth=0
TenaciousT
 
Posts: 10
Joined: Thu Nov 17, 2016 8:31 pm

Re: FlightGear Simulation using 6DoF Preconfigured Block

Postby TenaciousT » Tue Nov 22, 2016 9:40 pm

Hi all,

Just to clarify the problem, I do not have trouble initialising my aircraft with the runfg.bat file. The aircraft is on the ground. What I am having trouble is not understanding why the aircraft would be sent out of Earth into space, when I sent the --lat and --lon and --altitude data directly into the FlightGear 6DoF preconfigured block in Simulink.

Appreciate y'all responses.
TenaciousT
 
Posts: 10
Joined: Thu Nov 17, 2016 8:31 pm

Re: FlightGear Simulation using 6DoF Preconfigured Block  

Postby TenaciousT » Tue Nov 22, 2016 9:46 pm

Hi all,

I found out the problem!! The problem is with my Simulink block, I sent in longitude data into the latitude input of my block and vice versa. The symbols on the Preconfigured blockset can be very confusing :P Thanks all.
TenaciousT
 
Posts: 10
Joined: Thu Nov 17, 2016 8:31 pm

Re: FlightGear Simulation using 6DoF Preconfigured Block

Postby AndersG » Tue Nov 22, 2016 9:47 pm

TenaciousT wrote in Mon Nov 21, 2016 9:12 am:Even though NZCH has an altitude of 35m above sea level, the longitude and latitude that I have set takes precedence over which airport I set it to. Beside the point, I have tried setting the altitude below the visible ground level and it showed to me that I could still see the aircraft clearly below the ground surface. So I do not think setting it to ground level contributes to the whole simulation screen turning pitch dark and that I could see starry skies all round.


However, pitch black and starry skies all around might be night somewhere where you don't have any scenery (or are below ground - ground is one-sided in FG). Also, if you set time of day for FG at startup that will apply at the startup location - so if the position your external FDM sends in is very different the time of day you actually see may differ.
Callsign: SE-AG
Aircraft (uhm...): Submarine Scout, Zeppelin NT, ZF Navy free balloon, Nordstern, Hindenburg, Short Empire flying-boat, ZNP-K, North Sea class, MTB T21 class, U.S.S. Monitor, MFI-9B, Type UB I submarine, Gokstad ship, Renault FT.
AndersG
 
Posts: 2412
Joined: Wed Nov 29, 2006 9:20 am
Location: Göteborg, Sweden
Callsign: SE-AG
OS: Debian GNU Linux

Re: FlightGear Simulation using 6DoF Preconfigured Block

Postby TenaciousT » Tue Nov 22, 2016 10:22 pm

if you set time of day for FG at startup that will apply at the startup location - so if the position your external FDM sends in is very different the time of day you actually see may differ.


You are right AndersG, however, I set my --lat --lon to match with my initial position data so setting different time of day should not matter. I guess you could try initialising with --lat --lon during initialising to see what I mean by starry skies lol.
TenaciousT
 
Posts: 10
Joined: Thu Nov 17, 2016 8:31 pm

Re: FlightGear Simulation using 6DoF Preconfigured Block

Postby AndersG » Wed Nov 23, 2016 4:40 pm

I frequently start FG with --timeofday=... and --lat and --lon and I can't say that I have noticed any problems?
Callsign: SE-AG
Aircraft (uhm...): Submarine Scout, Zeppelin NT, ZF Navy free balloon, Nordstern, Hindenburg, Short Empire flying-boat, ZNP-K, North Sea class, MTB T21 class, U.S.S. Monitor, MFI-9B, Type UB I submarine, Gokstad ship, Renault FT.
AndersG
 
Posts: 2412
Joined: Wed Nov 29, 2006 9:20 am
Location: Göteborg, Sweden
Callsign: SE-AG
OS: Debian GNU Linux

Re: FlightGear Simulation using 6DoF Preconfigured Block

Postby wkitty42 » Thu Nov 24, 2016 9:50 pm

TenaciousT wrote in Tue Nov 22, 2016 9:46 pm:I found out the problem!! The problem is with my Simulink block, I sent in longitude data into the latitude input of my block and vice versa. The symbols on the Preconfigured blockset can be very confusing :P Thanks all.

excellent! glad you found the problem and sussed it :)
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 4630
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5


Return to Compiling

Who is online

Users browsing this forum: No registered users and 1 guest