Re: [Flightgear-devel] Nasal: airportinfo() question

2011-05-11 Thread Claus Christmann
On Monday, May 09, 2011 11:41:53 AM Curtis Olson wrote:

 
 Ultimately, what I'd like to do for my project is have an auto-land gui
 button that will pop up a list of nearby airports.  The user selects the
 one they want and then a list of runways pops up, perhaps ranked based on
 the prevailing wind conditions.  Then when the destination is chosen, the
 aircraft flies to the airport, enters the downwind pattern, base, final,
 lands at exactly the target spot.  (Maybe with just a little randomization
 so we don't wear out the concrete always hitting the exact same spot every
 time.)
 

Curt and all,

this is fairly exactly what I am tasked to do for a research project. We have 
code to create optimal (I put that in quotes as that obviously lies in the 
eye of the beholder) trajectories, taking some dynamic limitations into 
account. We would love to test this code in realistic cockpit scenarios, 
replicating -- in a perfect world -- for example, the Hudson River landing.

Looking for an interface between emergency path planning and the pilot (Curt's 
auto-land gui) we decided that hacking/altering the CDU would be a 
reasonable attempt as pilots are familiar with the instrument and how to use 
it. (That is the reason why I wrote a Nasal based CDU for FlightGear based 
upon Gijs great work.)

So what I would like to ask of you, i.e. people who have toyed around with 
this idea (or read about it, know about it), is to kindly give me some 
pointers on where I could learn about current developments in this area or 
where I could learn about the C/C++ code/api to the navdata base and the route 
manager.

Having written the CDU in Nasal I believe to have a fairly good grasp on the 
language, however I would prefer to write this lower level stuff in C++. Not 
only because I believe that I/we will need the computational benefit, but also 
as this might make it easier to contribute more of the code (as a potential 
closed source library) to more interested parties - although I do promise to 
try to get as much of my/our work to be open sourced.

I am looking forward to hearing from you with pointers to documentation, 
examples, helpful source files - all that good stuff that could get me up to 
speed quickly (as I haven't touched the C code of FG yet.)

Regards,

Claus


-- 
Claus Christmann, M.S.
Graduate Research Assistant

Georgia Institute of Technology
270 Ferst Dr NW
Atlanta, GA 30332-0150

http://uav.ae.gatech.edu

--
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Nasal: airportinfo() question

2011-05-11 Thread Curtis Olson
On Wed, May 11, 2011 at 8:04 AM, Claus Christmann wrote:

 Curt and all,

 this is fairly exactly what I am tasked to do for a research project. We
 have
 code to create optimal (I put that in quotes as that obviously lies in
 the
 eye of the beholder) trajectories, taking some dynamic limitations into
 account. We would love to test this code in realistic cockpit scenarios,
 replicating -- in a perfect world -- for example, the Hudson River landing.

 Looking for an interface between emergency path planning and the pilot
 (Curt's
 auto-land gui) we decided that hacking/altering the CDU would be a
 reasonable attempt as pilots are familiar with the instrument and how to
 use
 it. (That is the reason why I wrote a Nasal based CDU for FlightGear based
 upon Gijs great work.)

 So what I would like to ask of you, i.e. people who have toyed around with
 this idea (or read about it, know about it), is to kindly give me some
 pointers on where I could learn about current developments in this area or
 where I could learn about the C/C++ code/api to the navdata base and the
 route
 manager.

 Having written the CDU in Nasal I believe to have a fairly good grasp on
 the
 language, however I would prefer to write this lower level stuff in C++.
 Not
 only because I believe that I/we will need the computational benefit, but
 also
 as this might make it easier to contribute more of the code (as a potential
 closed source library) to more interested parties - although I do promise
 to
 try to get as much of my/our work to be open sourced.

 I am looking forward to hearing from you with pointers to documentation,
 examples, helpful source files - all that good stuff that could get me up
 to
 speed quickly (as I haven't touched the C code of FG yet.)


Hi Claus,

So far I've been prototyping all my trajectory planning and management in
nasal, but I will eventually migrate that over to C/C++ so I can run on a
real embedded computer on a real UAS.

I'm glad you put optimal in quotes. :-)  There are so many *different*
things you could optimize for and all it takes would be 1 or 2 seconds late
entering a turn, or a few degrees off on your bank angle, a slight
mis-estimate of physics or speed, or a slight mis-estimate of wind and you
could come up short of the runway.  If you build in too much margin for
safety and have slight errors in the opposite direction you could end up
overrunning your target landing spot.

FlightGear is an awesome tool for testing all this out though ... the proof
is in the pudding so to speak, and these are exactly the sorts of challenges
that are perfect for testing in a flight simulator.

In my case I'm focused more on plotting a landing trajectory that looks and
feels intelligent, looks direct, looks solid (the safe ultimate completion
of the maneuver is never in doubt) :-) and doesn't waste a ton of extra time
or energy.

If you know *exactly* the logic that will give you the optimal result, then
going straight to C++ is probably fine.  For myself, I'm thinking this
through as I go, testing different ideas, and observing the results ... so
in my case prototyping the logic in nasal is a really great step.  I've
added trajectory markers and smoke to my UAV model so I can visualize the
absolute flight path and see it relative to the wind as well.  It's quite a
nice tool for exposing suboptimal strategies and for understanding what
needs to be fixed and why.

I have also been playing with different wind vectors and different amounts
of turbulence.  I've found that with real uav flight, I never achieve the
rock solid perfect results I can see in the sim, even with the exact same
flight control code.  But if I turn on just a little bit of turbulence, what
I see in the sim seems to really align with the results I see in real life.
 A simulation is a great tool, but at the end of the day, it needs to
correlate with reality in certain important ways.

Best regards,

Curt.
-- 
Curtis Olson:
http://www.atiak.com - http://aem.umn.edu/~uav/
http://www.flightgear.org - http://gallinazo.flightgear.org
--
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


[Flightgear-devel] Nasal: airportinfo() question

2011-05-09 Thread Curtis Olson
Hi,

I see that for Nasal scripts we can call airportinfo() to get the name and
runway info for the closest airport.  We can also call airportinfo(ID) to
get the details of a specific airport.  However, what I don't see is a way
to request a list of the n closest airports (or the airports within a
specified radius of my current location.)  Is this (or something similar)
possible to do within nasal?

I'm playing around with an auto-land script and sometimes when you are
flying in an area with several airports near by, the airport that is
technically the closest to you, might not be the one you are interested in.

Thanks,

Curt.
-- 
Curtis Olson:
http://www.atiak.com - http://aem.umn.edu/~uav/
http://www.flightgear.org - http://gallinazo.flightgear.org
--
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Nasal: airportinfo() question

2011-05-09 Thread Curtis Olson
It does appear that the FGPositioned interface offers everything we would
need.  I don't know about optimization issues, but it can return a list of
all the airports within a certain radius of your current location (or any
arbitrary location.)  I also see a function that will sort by distance.
 Then if the user selects a specific airport, airportinfo() already has the
functionality to return all the airport details.

I see that the current airportinfo() function calls FGAirport class methods
which are wrappers around the FGPositioned classes.  I'm not sure exactly
why that is unless it's related to finding the right instance of the
database.  I haven't dug too deeply into the code.

Martin is right, we could probably slap something together pretty quickly,
but it might make more sense for James or someone else more familiar with
this code to put together a solid sensible structure and make sure all the
pieces tie together in a logical consistent manner.  That's probably not me,
at least not this week.  Perhaps in the future if this is still an open
issue and the need rises up higher on my priority list, I'll dig in and make
an attempt.

Ultimately, what I'd like to do for my project is have an auto-land gui
button that will pop up a list of nearby airports.  The user selects the one
they want and then a list of runways pops up, perhaps ranked based on the
prevailing wind conditions.  Then when the destination is chosen, the
aircraft flies to the airport, enters the downwind pattern, base, final,
lands at exactly the target spot.  (Maybe with just a little randomization
so we don't wear out the concrete always hitting the exact same spot every
time.)

Best regards,

Curt.


On Mon, May 9, 2011 at 9:10 AM, Scott wrote:


   James Turner and I had a bit of a e.mail conversation about this some
 time
 ago. My (non-existant) C++ skills aren't up to writing anything, but James
 thought everything was in the underlying code, and shouldn't be too
 difficult
 to expose to Nasal.

   I've had three disk failure since that time, so I've lost the e.mail
 thread, but we did define quite a few wishlist functions.

   BTW I didn't know you could get the closest airport, that is still
 quite
 handy for some scenarios, but getting all airports within a radius of a
 specified geo-coord is even more useful.


  Scott.


 On Monday 09 May 2011 23:45:04 Curtis Olson wrote:
  Hi,
 
  I see that for Nasal scripts we can call airportinfo() to get the name
 and
  runway info for the closest airport.  We can also call airportinfo(ID) to
  get the details of a specific airport.  However, what I don't see is a
 way
  to request a list of the n closest airports (or the airports within a
  specified radius of my current location.)  Is this (or something similar)
  possible to do within nasal?
 
  I'm playing around with an auto-land script and sometimes when you are
  flying in an area with several airports near by, the airport that is
  technically the closest to you, might not be the one you are interested
 in.
 
  Thanks,
 
  Curt.


 --
 WhatsUp Gold - Download Free Network Management Software
 The most intuitive, comprehensive, and cost-effective network
 management toolset available today.  Delivers lowest initial
 acquisition cost and overall TCO of any competing solution.
 http://p.sf.net/sfu/whatsupgold-sd
 ___
 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
--
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel