Re: [Flightgear-devel] weather-utility.nas

2012-01-22 Thread Emilian Huminiuc
On Friday 20 January 2012 16:16:18 Emilian Huminiuc wrote:
> On Friday 20 January 2012 15:01:35 Torsten Dreyer wrote:
> > > The shader scales the texture with windspeed and rotates it to get
> > > the
> > > right orientation, but the actual rate those change is too quick to
> > > look good, and gives the impression of very high speed, that's why
> > > I suggested a longer interpolation time for the values passed to
> > > the shader, and to avoid doing the interpolations in the shader
> > > itself (as that would hit performance).
> > > 
> > > Only the two values of wind-from-north-fps and wind-from-east-fps
> > > are
> > > the ones that need this applied, as everything else is derived from
> > > these.
> > 
> > OK - that explains the impression of fast movements during wind-speed
> > changes. I have now added a time based interpolation to the wind vector
> > components in /environment/sea/surface/wind-from-XXX-fps. I made the
> > timing configurable at runtime in
> > /environment/sea/surface/config/wind-filter-time which sets the
> > filter-time for both exponential filters.
> > This is initialized to 60 in FGDATA/Environment/environment.xml and
> > looks reasonable to me. You might want to play around with that value
> > and we can adjust it if desired.
> > 
> > Along with this commit, I cleaned up water.eff and flutter.eff files
> > from unused properties wind-from-(heading-)deg which seemed to be
> > unused. Please check if that was correct.
> > 
> > The relevant commit is 2071a3297c9bc3a7f8df397fd8acaa71bc110f06 in
> > fgdata.
> > 
> > Torsten
> 
> Hi,
> 
> Sorry previous reply was written before receiving this, I will play around
> with the wind-filter-time prop.
> 
> Emilian

Played around with it a bit. I got reasonable "movement" sensation with wind-
filter-time set at ~1000.
The flutter effect might need the wind in realtime though, as flags usualy 
react imediately to wind direction changes.--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] weather-utility.nas

2012-01-22 Thread Torsten Dreyer
> Played around with it a bit. I got reasonable "movement" sensation with
> wind-filter-time set at ~1000.
>
> The flutter effect might need the wind in realtime though, as flags
> usualy react imediately to wind direction changes.
Huh - that's a huge value. With a filter-time that high, it will take 
approx one hour for the interpolated wind to match the given input.

Maybe a rate-limiter helps here. The exponential filter has a relatively 
high rate of change in the beginning, dropping to zero in infinity while 
the rate limiter changes the output at a constant rate of change.

Torsten

--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] weather-utility.nas

2012-01-22 Thread Curtis Olson
Are we fixing the right problem?  I was observing mach 5 speed waves while
the weather wind was changing.

On Sun, Jan 22, 2012 at 8:18 AM, Torsten Dreyer  wrote:

> > Played around with it a bit. I got reasonable "movement" sensation with
> > wind-filter-time set at ~1000.
> >
> > The flutter effect might need the wind in realtime though, as flags
> > usualy react imediately to wind direction changes.
> Huh - that's a huge value. With a filter-time that high, it will take
> approx one hour for the interpolated wind to match the given input.
>
> Maybe a rate-limiter helps here. The exponential filter has a relatively
> high rate of change in the beginning, dropping to zero in infinity while
> the rate limiter changes the output at a constant rate of change.
>
> Torsten
>
>
> --
> Try before you buy = See our experts in action!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-dev2
> ___
> 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
--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


[Flightgear-devel] [PATCH] fgdata chat message highlighting

2012-01-22 Thread scosu
Hi,

Sorry if this is not the right list for the patch.

The idea was to implement a small script to highlight chat messages in which 
the multiplayer-callsign is mentioned. This should make multiplayer 
communication with many pilots easier.

The message is highlighted in red.

scosudiff --git a/Nasal/screen.nas b/Nasal/screen.nas
index 2d572aa..bfebdeb 100644
--- a/Nasal/screen.nas
+++ b/Nasal/screen.nas
@@ -458,6 +458,47 @@ _setlistener("/sim/signals/fdm-initialized", func {
 # functions that make use of the window class (and don't belong anywhere else)
 ##
 
+# translates a string to lower case
+var tolower = func (str) {
+	for (var i = 0; i < size(str); i = i+1) {
+		if (str[i] >= `A` and str[i] <= `Z`)
+			str[i] = str[i] - `A` + `a`;
+	}
+	return str;
+}
+
+# highlights messages with the multiplayer callsign in the text
+var msg_mp = func (n) {
+	if (!getprop("/sim/multiplay/chat-display"))
+		return;
+	var msg = tolower(n.getValue());
+	var call = tolower(getprop("/sim/multiplay/callsign"));
+	var matching = 0;
+	var found = 0;
+	for(var i = 0; i < size(msg); i = i + 1) {
+		if (msg[i] == ` ` or msg[i] == `,` or msg[i] == `.` or msg[i] == `;` or msg[i] == `:` or msg[i] == `>`) {
+			if (matching == size(call)) {
+found = 1;
+break;
+			}
+			matching = 0;
+			continue;
+		}
+		if (matching >= size(call)) {
+			matching = matching + 1;
+			continue;
+		}
+		if (call[matching] == msg[i]) {
+			matching = matching + 1;
+		} else {
+			matching = 0;
+		}
+	}
+	if (found == 1 or matching == size(call))
+		screen.log.write(n.getValue(), 1.0, 0.5, 0.5);
+	else
+		screen.log.write(n.getValue(), 0.5, 0.0, 0.8);
+}
 
 var msg_repeat = func {
 	if (getprop("/sim/tutorials/running")) {
@@ -557,9 +598,7 @@ _setlistener("/sim/signals/nasal-dir-initialized", func {
 			func(n) map("copilot",  n.getValue(), 1.0, 1.0, 1.0));
 	listener.ai_plane = setlistener(m ~ "ai-plane",
 			func(n) map("ai-plane", n.getValue(), 0.9, 0.4, 0.2));
-	listener.mp_plane = setlistener(m ~ "mp-plane",
-			func(n) map("ai-plane", n.getValue(), 0.5, 0.0, 0.8,
-	func getprop("/sim/multiplay/chat-display")));
+	listener.mp_plane = setlistener(m ~ "mp-plane", msg_mp);
 });
 
 

--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Local Weather menu structure

2012-01-22 Thread Torsten Dreyer
>> So, let's add a "Advanced-->" button to the global weather dialog which
>> closes the global-weather dialog, enabled local weather and opens the
>> local weather dialog. In return, the local-weather dialog gets a
>> "Basic-->" button which disables local weather, closes the
>> local-weather-dialog and opens the global-weather-dialog.
>
> This sounds very convincing to me - I'm in favour of this solution. And
> we'd like to go that road further anyway :-)
>
And I just pushed that to FGDATA. "Global Weather" and "Local Weather" 
is dead. Long live "Basic Weather" and "Advanced Weather" :-)

Torsten


--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] [PATCH] fgdata chat message highlighting

2012-01-22 Thread scosu
Hi,

Thank you, I searched for this function but didn't find it. I replaced the 
'tolower' function with the string.lc calls in the patch.

scosu


On Sun, 22 Jan 2012 16:46:30 +0100
Melchior FRANZ  wrote:

> Hey,
> 
> your proposed function screen.tolower() is redundant, because there
> is already string.uc() (named after Perl's function uc() for "upper
> case").
> 
> m. (who wrote screen.nas)

diff --git a/Nasal/screen.nas b/Nasal/screen.nas
index 2d572aa..26e1508 100644
--- a/Nasal/screen.nas
+++ b/Nasal/screen.nas
@@ -458,6 +458,38 @@ _setlistener("/sim/signals/fdm-initialized", func {
 # functions that make use of the window class (and don't belong anywhere else)
 ##
 
+# highlights messages with the multiplayer callsign in the text
+var msg_mp = func (n) {
+	if (!getprop("/sim/multiplay/chat-display"))
+		return;
+	var msg = string.uc(n.getValue());
+	var call = string.uc(getprop("/sim/multiplay/callsign"));
+	var matching = 0;
+	var found = 0;
+	for(var i = 0; i < size(msg); i = i + 1) {
+		if (msg[i] == ` ` or msg[i] == `,` or msg[i] == `.` or msg[i] == `;` or msg[i] == `:` or msg[i] == `>`) {
+			if (matching == size(call)) {
+found = 1;
+break;
+			}
+			matching = 0;
+			continue;
+		}
+		if (matching >= size(call)) {
+			matching = matching + 1;
+			continue;
+		}
+		if (call[matching] == msg[i]) {
+			matching = matching + 1;
+		} else {
+			matching = 0;
+		}
+	}
+	if (found == 1 or matching == size(call))
+		screen.log.write(n.getValue(), 1.0, 0.5, 0.5);
+	else
+		screen.log.write(n.getValue(), 0.5, 0.0, 0.8);
+}
 
 var msg_repeat = func {
 	if (getprop("/sim/tutorials/running")) {
@@ -557,9 +589,7 @@ _setlistener("/sim/signals/nasal-dir-initialized", func {
 			func(n) map("copilot",  n.getValue(), 1.0, 1.0, 1.0));
 	listener.ai_plane = setlistener(m ~ "ai-plane",
 			func(n) map("ai-plane", n.getValue(), 0.9, 0.4, 0.2));
-	listener.mp_plane = setlistener(m ~ "mp-plane",
-			func(n) map("ai-plane", n.getValue(), 0.5, 0.0, 0.8,
-	func getprop("/sim/multiplay/chat-display")));
+	listener.mp_plane = setlistener(m ~ "mp-plane", msg_mp);
 });
 
 
--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Local Weather menu structure

2012-01-22 Thread Stuart Buchanan
On Sun, Jan 22, 2012 at 5:34 PM, Torsten Dreyer wrote:
> And I just pushed that to FGDATA. "Global Weather" and "Local Weather"
> is dead. Long live "Basic Weather" and "Advanced Weather" :-)

Thanks Torsten. That looks great.

BTW, if this change is merged into the 2.6.0 branch, we should also include
commit a38820828c5343dbcb77d97a65597d736c845ff4, which removes
a now-redundant reference to the local_weather_tiles menu item.

I've also made the co-requisite change to The Manual
(773db8825336521c42fd4d0edb22ca2d1bcc06ea) that should also
be merged.

-Stuart

--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Local Weather menu structure

2012-01-22 Thread Torsten Dreyer
Am 22.01.2012 21:27, schrieb Stuart Buchanan:
> On Sun, Jan 22, 2012 at 5:34 PM, Torsten Dreyer wrote:
>> And I just pushed that to FGDATA. "Global Weather" and "Local Weather"
>> is dead. Long live "Basic Weather" and "Advanced Weather" :-)
>
> Thanks Torsten. That looks great.
>
> BTW, if this change is merged into the 2.6.0 branch, we should also include
> commit a38820828c5343dbcb77d97a65597d736c845ff4, which removes
> a now-redundant reference to the local_weather_tiles menu item.
>
> I've also made the co-requisite change to The Manual
> (773db8825336521c42fd4d0edb22ca2d1bcc06ea) that should also
> be merged.

Ah - thanks. I wasn't aware of that line of code. We should make sure, 
ThorstenR has backported that into his codebase when commiting a new 
version from him.

I am hesitating from picking this into the release branch as one could 
argue if that was a bug fix. But if it's general consensus  that this a 
an improvement that should make it into the release, we should do it. 
The change is releatively small but I'd feel better if ThorstenR tested 
it before it gets picked.

Torsten

--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


[Flightgear-devel] Jenkins back...

2012-01-22 Thread Gene Buckle
Commercial power came back on at 8pm Pacific Time after being off from 
7:15am on Thursday.  The build server is back online!

g.


-- 
Proud owner of F-15C 80-0007
http://www.f15sim.com - The only one of its kind.
http://www.diy-cockpits.org/coll - Go Collimated or Go Home.
Some people collect things for a hobby.  Geeks collect hobbies.

ScarletDME - The red hot Data Management Environment
A Multi-Value database for the masses, not the classes.
http://www.scarletdme.org - Get it _today_!

Political correctness is a doctrine, fostered by a delusional, illogical
minority, and rabidly promoted by an unscrupulous mainstream media, which
holds forth the proposition that it is entirely possible to pick up a turd
by the clean end.

--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Scenemodels/MapServer.flightgear.org,

2012-01-22 Thread Martin Spott
Martin Spott wrote:
k> Unfortunately the web server is currently hung on reboot and I wasn't
> able to fix it as quick as expected,

Schould be serviceable again, now.  Those who are subscribed to the
"-commitlogs" mailing list already noticed earlier  ;-)

Martin.
-- 
 Unix _IS_ user friendly - it's just selective about who its friends are !
--

--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel