Re: [Flightgear-devel] Positioning Aircraft: accuracy

2013-06-29 Thread Saikrishna Arcot
If it helps, when building Flightgear, I get compile warnings saying
that there's a narrowing conversion from double to float in some YASim
methods:
|flightgear/src/FDM/YASim/YASim.cxx:261:30: warning: narrowing
conversion of
‘((YASim*)this)->YASim::.FGInterface::get_uBody()’ from
‘double’ to ‘float’ inside { } is ill-formed in C++11 [-Wnarrowing]||
||flightgear/src/FDM/YASim/YASim.cxx:261:43: warning: narrowing
conversion of
‘((YASim*)this)->YASim::.FGInterface::get_vBody()’ from
‘double’ to ‘float’ inside { } is ill-formed in C++11 [-Wnarrowing]||
||flightgear/src/FDM/YASim/YASim.cxx:261:56: warning: narrowing
conversion of
‘((YASim*)this)->YASim::.FGInterface::get_wBody()’ from
‘double’ to ‘float’ inside { } is ill-formed in C++11 [-Wnarrowing]|



On Sun 23 Jun 2013 06:09:32 PM CDT, Curtis Olson wrote:
>
> The hang glider is using the UIUC fdm, right? Perhaps that is using a
> float (6-7 digits of precision) to represent it's initial conditions
> ... or somewhere in the startup pipeline or the flightgear interface
> to the uiuc model, the initial lon/lat is stored as a float?
>
>
> On Sun, Jun 23, 2013 at 5:27 PM, D-NXKT  > wrote:
>
> Hmm, everything is fine if I use a different plane. Seems to be a hang
> glider specific problem.
> Monitoring the latitude and longitude variabel from the very beginning
> shows, that both variables have at first indeed the correct
> values. Then
> the latitude value suddenly jumps from 47.306263 to 47.306206.
>
> Sorry for the noise.
>
> Best regards
> D-NXKT
>
>
>
> --
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
> ___
> Flightgear-devel mailing list
> Flightgear-devel@lists.sourceforge.net
> 
> https://lists.sourceforge.net/lists/listinfo/flightgear-devel
>
>
>
>
> -- 
> Curtis Olson:
> http://www.atiak.com  - http://aem.umn.edu/~uav/
> http://www.flightgear.org
>  - http://gallinazo.flightgear.org
> 
>
>
> --
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
>
>
> ___
> Flightgear-devel mailing list
> Flightgear-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/flightgear-devel
> -- 
> Saikrishna Arcot
--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Positioning Aircraft: accuracy

2013-06-25 Thread Adam Dershowitz
A few years ago, I helped squash a bug that occurred when reading in data with 
generic IO (I think that my patch was included in the code).  At the time, it 
was reading in just a float.  So, when using it to read in position, the 
doubles for lat/long were being cut (rounded or truncated?) and it meant that 
during playback of flight the aircraft would jump around a little bit (on the 
order of meters), even when there was actually smooth position data in the 
input file.  The look was like a bad frame rate, because it would jump from 
position to position.
So, I concur that it sounds a lot like just a float is being used for initial 
position, when a double is necessary.


-- Adam


From: Curtis Olson mailto:curtol...@flightgear.org>>
Reply-To: FlightGear developers discussions 
mailto:flightgear-devel@lists.sourceforge.net>>
Date: Tuesday, June 25, 2013 12:05 PM
To: FlightGear developers discussions 
mailto:flightgear-devel@lists.sourceforge.net>>
Subject: Re: [Flightgear-devel] Positioning Aircraft: accuracy

It really smells like a double -> float conversion somewhere in the pipeline 
(more than a geocentric / geodetic conversion or something like that).

Curt.


On Tue, Jun 25, 2013 at 2:01 PM, D-NXKT 
mailto:d_n...@yahoo.de>> wrote:
> How far off is the aircraft placement - how much is the "jump"? Is it
> many hundreds of meters, or on the order a meter or two, or just
> centimeters?
>
> Jon


Several meters!

Or more precise:

first: lat= 47.306263  lon= 11.379070
"jump" to: lat= 47.3062060567  lon= 11.3790703145
   ^
Difference = 6.34 meters (20.80 ft)

Best regards
D-NXKT


--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net<mailto:Flightgear-devel@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/flightgear-devel



--
Curtis Olson:
http://www.atiak.com<http://www.atiak.com/> - http://aem.umn.edu/~uav/
http://www.flightgear.org<http://www.flightgear.org/> - 
http://gallinazo.flightgear.org<http://gallinazo.flightgear.org/>
--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Positioning Aircraft: accuracy

2013-06-25 Thread Curtis Olson
It really smells like a double -> float conversion somewhere in the
pipeline (more than a geocentric / geodetic conversion or something like
that).

Curt.


On Tue, Jun 25, 2013 at 2:01 PM, D-NXKT  wrote:

> > How far off is the aircraft placement - how much is the "jump"? Is it
> > many hundreds of meters, or on the order a meter or two, or just
> > centimeters?
> >
> > Jon
>
>
> Several meters!
>
> Or more precise:
>
> first: lat= 47.306263  lon= 11.379070
> "jump" to: lat= 47.3062060567  lon= 11.3790703145
>^
> Difference = 6.34 meters (20.80 ft)
>
> Best regards
> D-NXKT
>
>
>
> --
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
> ___
> Flightgear-devel mailing list
> Flightgear-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/flightgear-devel
>



-- 
Curtis Olson:
http://www.atiak.com - http://aem.umn.edu/~uav/
http://www.flightgear.org - http://gallinazo.flightgear.org
--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Positioning Aircraft: accuracy

2013-06-25 Thread D-NXKT
> How far off is the aircraft placement - how much is the "jump"? Is it
> many hundreds of meters, or on the order a meter or two, or just  
> centimeters?
> 
> Jon


Several meters!

Or more precise:

first: lat= 47.306263  lon= 11.379070
"jump" to: lat= 47.3062060567  lon= 11.3790703145
   ^
Difference = 6.34 meters (20.80 ft)

Best regards
D-NXKT


--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Positioning Aircraft: accuracy

2013-06-24 Thread Jon S. Berndt
> It seems that we have a problem with the FG/JSBSim-interface or it's a
> rounding error during JSBSim-initialisation?!
> 
> Summarizing my observations:
> - immediately after FG is started the property browser shows the
> correct values
> - this values hold true as long as the splash-screen appears
> - as soon as the splash-screen disappears and the plane pops up, the --
> lon/lat values jump to the wrong (rounded?) values
> - I also noticed that the "correct" values in the property browser are
> displayed with the same numbers of digits as typed. Simultaneous with
> the jump to the wrong values the number of digits increases to their
> count for "double" values
> 
> Maybe this observations help to debug this issue.
> 
> Best regards
> D-NXKT

How far off is the aircraft placement - how much is the "jump"? Is it many
hundreds of meters, or on the order a meter or two, or just centimeters?

Jon



--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Positioning Aircraft: accuracy

2013-06-24 Thread D-NXKT

> The hang glider is using the UIUC fdm, right?  Perhaps that is using a
> float (6-7 digits of precision) to represent it's initial 
>  conditions ... or somewhere in the startup pipeline or the flightgear
> interface to the uiuc
> model, the initial lon/lat is stored as a float?


Curt, you pointed me in the right direction! But it's the other way
around. The UIUC-Version of the hang glider works perfectly. The
JSBSim-Version is wrong.

Further investigations with several planes show that only (but all)
JSBSim-aircrafts are affected!

I've tested the ASW20-JSBSim, C172p and Rascal110-JSBSim.
The YASim- and UIUC-aircrafts work fine (ASK13, bo105, Rascal110-YASim)!

It seems that we have a problem with the FG/JSBSim-interface or it's a
rounding error during JSBSim-initialisation?!

Summarizing my observations:
- immediately after FG is started the property browser shows the correct
values 
- this values hold true as long as the splash-screen appears
- as soon as the splash-screen disappears and the plane pops up, the
--lon/lat values jump to the wrong (rounded?) values
- I also noticed that the "correct" values in the property browser are
displayed with the same numbers of digits as typed. Simultaneous with
the jump to the wrong values the number of digits increases to their
count for "double" values

Maybe this observations help to debug this issue.

Best regards
D-NXKT 


--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Positioning Aircraft: accuracy

2013-06-23 Thread Curtis Olson
The hang glider is using the UIUC fdm, right?  Perhaps that is using a
float (6-7 digits of precision) to represent it's initial conditions ... or
somewhere in the startup pipeline or the flightgear interface to the uiuc
model, the initial lon/lat is stored as a float?


On Sun, Jun 23, 2013 at 5:27 PM, D-NXKT  wrote:

> Hmm, everything is fine if I use a different plane. Seems to be a hang
> glider specific problem.
> Monitoring the latitude and longitude variabel from the very beginning
> shows, that both variables have at first indeed the correct values. Then
> the latitude value suddenly jumps from 47.306263 to 47.306206.
>
> Sorry for the noise.
>
> Best regards
> D-NXKT
>
>
>
>
> --
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
> ___
> Flightgear-devel mailing list
> Flightgear-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/flightgear-devel
>



-- 
Curtis Olson:
http://www.atiak.com - http://aem.umn.edu/~uav/
http://www.flightgear.org - http://gallinazo.flightgear.org
--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Positioning Aircraft: accuracy

2013-06-23 Thread D-NXKT
Hmm, everything is fine if I use a different plane. Seems to be a hang
glider specific problem. 
Monitoring the latitude and longitude variabel from the very beginning
shows, that both variables have at first indeed the correct values. Then
the latitude value suddenly jumps from 47.306263 to 47.306206.

Sorry for the noise.

Best regards 
D-NXKT



--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Positioning Aircraft: accuracy

2013-06-23 Thread D-NXKT
Hi Tom,

> How have you checked these values? I've just tried it myself and in 
> the property browser exactly the same values appear.

I started FG with 
--lon=11.379070
--lat=47.306263
--heading=155
--units-meters
--on-ground
and found me at --lon=11.3791 --lat=47.3063.
Manual input in the property browser moved me to the correct position.

> Maybe you are using an operating system with a low precision atof? In
> the property browser strtod is used to convert the number whereas for
> the dialog and arguments atof is used.

I'm using Suse 12.3 64bit.
How can I check the atof precision?

Thanks for the quick response
D-NXKT

  



--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Positioning Aircraft: accuracy

2013-06-23 Thread Thomas Geymayer
Hi,

Am 2013-06-23 22:27, schrieb D-NXKT:
> I noticed that positioning an aircraft at FG startup with --lon= and 
> lat= has only a limited accuracy. It seems that only the first 7
> digits are read. This leads to an uncertainty of several
> meters/feet! For example lon=11.379070 --lat=47.306263 is needed to
> place our hang glider directly in front of the ramp (LOWI-Scenery).
> Unfortunately the hang glider pops up several meters right of the
> ramp. I found out that FG internally uses this (rounded) values:
> --lon=11.3791 --lat=47.3063.

How have you checked these values? I've just tried it myself and in the
property browser exactly the same values appear.

> Same issue with input via the Menu "Location/Position Aircraft In
> Air".

Here by default values are shown with four decimal places, but also
values with higher precision are accepted.

> Only positioning via the property browser leads to exact results.

Maybe you are using an operating system with a low precision atof? In
the property browser strtod is used to convert the number whereas for
the dialog and arguments atof is used.

Tom

-- 
Thomas Geymayer  www.tomprogs.at / C-Forum und Tutorial: www.proggen.org

  Student of Computer Science @ Graz University of Technology
--- Austria 

--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


[Flightgear-devel] Positioning Aircraft: accuracy

2013-06-23 Thread D-NXKT
Hello,

I noticed that positioning an aircraft at FG startup with --lon= and
lat= has only a limited accuracy. It seems that only the first 7 digits
are read. This leads to an uncertainty of several meters/feet!
For example lon=11.379070 --lat=47.306263 is needed to place our hang
glider directly in front of the ramp (LOWI-Scenery). Unfortunately the
hang glider pops up several meters right of the ramp. I found out that
FG internally uses this (rounded) values: --lon=11.3791 --lat=47.3063.
Same issue with input via the Menu "Location/Position Aircraft In Air".
Only positioning via the property browser leads to exact results.
Maybe someone could fix this at the next opportunity?!

Thanks in advance
D-NXKT 


--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel