QQ登录

只需一步,快速开始

查看: 22009|回复: 13
打印 上一主题 下一主题

flightgear属性树

[复制链接]

主题

好友

565

积分

超级版主

跳转到指定楼层
楼主
发表于 2013-4-12 23:53:27 |只看该作者 |倒序浏览
本帖最后由 freeyun 于 2013-4-13 00:31 编辑

   关于FG的属性系统。
属性树整合各个子系统,是FG中枢神经,它是全局的,属性树包括飞机的位置,方向,速度 ,动力模型 声音等
这个是关于它的维基http://www.flightgear.org.cn/wiki/%E5%B1%9E%E6%80%A7%E6%A0%91
获取的它的值用Get,设置是用Set
菜单-DeBug->browse internal Properties

下面这段代码是FG初始化属性树fgSetDefaults() 函数
    // Position (deliberately out of range)
    fgSetDouble("/position/longitude-deg", 9999.0);
    fgSetDouble("/position/latitude-deg", 9999.0);
    fgSetDouble("/position/altitude-ft", -9999.0);
    // Orientation
    fgSetDouble("/orientation/heading-deg", 9999.0);
    fgSetDouble("/orientation/roll-deg", 0.0);
    fgSetDouble("/orientation/pitch-deg", 0.424);
    // Velocities
    fgSetDouble("/velocities/uBody-fps", 0.0);
    fgSetDouble("/velocities/vBody-fps", 0.0);
    fgSetDouble("/velocities/wBody-fps", 0.0);
    fgSetDouble("/velocities/speed-north-fps", 0.0);
    fgSetDouble("/velocities/speed-east-fps", 0.0);
    fgSetDouble("/velocities/speed-down-fps", 0.0);
    fgSetDouble("/velocities/airspeed-kt", 0.0);
    fgSetDouble("/velocities/mach", 0.0);
                                // Presets
    fgSetDouble("/sim/presets/longitude-deg", 9999.0);
    fgSetDouble("/sim/presets/latitude-deg", 9999.0);
    fgSetDouble("/sim/presets/altitude-ft", -9999.0);
    fgSetDouble("/sim/presets/heading-deg", 9999.0);
    fgSetDouble("/sim/presets/roll-deg", 0.0);
    fgSetDouble("/sim/presets/pitch-deg", 0.424);
    fgSetString("/sim/presets/speed-set", "knots");
    fgSetDouble("/sim/presets/airspeed-kt", 0.0);
    fgSetDouble("/sim/presets/mach", 0.0);
    fgSetDouble("/sim/presets/uBody-fps", 0.0);
    fgSetDouble("/sim/presets/vBody-fps", 0.0);
    fgSetDouble("/sim/presets/wBody-fps", 0.0);
    fgSetDouble("/sim/presets/speed-north-fps", 0.0);
    fgSetDouble("/sim/presets/speed-east-fps", 0.0);
    fgSetDouble("/sim/presets/speed-down-fps", 0.0);
    fgSetBool("/sim/presets/onground", true);
    fgSetBool("/sim/presets/trim", false);
    // Miscellaneous
    fgSetBool("/sim/startup/game-mode", false);
    fgSetBool("/sim/startup/splash-screen", true);
    fgSetBool("/sim/startup/intro-music", true);
    // we want mouse-pointer to have an undefined value if nothing is
    // specified so we can do the right thing for voodoo-1/2 cards.
    // fgSetString("/sim/startup/mouse-pointer", "disabled");
    fgSetString("/sim/control-mode", "joystick");
    fgSetBool("/controls/flight/auto-coordination", false);
    fgSetString("/sim/logging/priority", "alert");
    // Features
    fgSetBool("/sim/hud/color/antialiased", false);
    fgSetBool("/sim/hud/enable3d[1]", true);
    fgSetBool("/sim/hud/visibility[1]", false);
    fgSetBool("/sim/panel/visibility", true);
    fgSetBool("/sim/sound/enabled", true);
    fgSetBool("/sim/sound/working", true);
    // Flight Model options
    fgSetString("/sim/flight-model", "jsb");
    fgSetString("/sim/aero", "c172");
    fgSetInt("/sim/model-hz", NEW_DEFAULT_MODEL_HZ);
    fgSetDouble("/sim/speed-up", 1.0);
    // Rendering options
    fgSetString("/sim/rendering/fog", "nicest");
    fgSetBool("/environment/clouds/status", true);
    fgSetBool("/sim/startup/fullscreen", false);
    fgSetBool("/sim/rendering/shading", true);
    fgSetBool("/sim/rendering/skyblend", true);
    fgSetBool("/sim/rendering/textures", true);
    fgTie( "/sim/rendering/filtering", SGGetTextureFilter, SGSetTextureFilter, false);
    fgSetInt("/sim/rendering/filtering", 1);
    fgSetBool("/sim/rendering/wireframe", false);
    fgSetBool("/sim/rendering/horizon-effect", false);
    fgSetBool("/sim/rendering/enhanced-lighting", false);
    fgSetBool("/sim/rendering/distance-attenuation", false);
    fgSetBool("/sim/rendering/specular-highlight", true);
    fgSetString("/sim/rendering/materials-file", "materials.xml");
    fgSetInt("/sim/startup/xsize", 800);
    fgSetInt("/sim/startup/ysize", 600);
    fgSetInt("/sim/rendering/bits-per-pixel", 16);
    fgSetString("/sim/view-mode", "pilot");
    fgSetDouble("/sim/current-view/heading-offset-deg", 0);
    // HUD options
    fgSetString("/sim/startup/units", "feet");
    fgSetString("/sim/hud/frame-stat-type", "tris");
    // Time options
    fgSetInt("/sim/startup/time-offset", 0);
    fgSetString("/sim/startup/time-offset-type", "system-offset");
    fgSetLong("/sim/time/cur-time-override", 0);
                                // Freeze options
    fgSetBool("/sim/freeze/master", false);
    fgSetBool("/sim/freeze/position", false);
    fgSetBool("/sim/freeze/clock", false);
    fgSetBool("/sim/freeze/fuel", false);
    fgSetString("/sim/multiplay/callsign", "callsign");
    fgSetString("/sim/multiplay/rxhost", "");
    fgSetString("/sim/multiplay/txhost", "");
    fgSetInt("/sim/multiplay/rxport", 0);
    fgSetInt("/sim/multiplay/txport", 0);
   
    fgSetString("/sim/version/flightgear", FLIGHTGEAR_VERSION);
    fgSetString("/sim/version/simgear", SG_STRINGIZE(SIMGEAR_VERSION));
    fgSetString("/sim/version/openscenegraph", osgGetVersion());
    fgSetString("/sim/version/revision", REVISION);
    fgSetInt("/sim/version/build-number", HUDSON_BUILD_NUMBER);
    fgSetString("/sim/version/build-id", HUDSON_BUILD_ID);
分享到: QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
分享分享0 收藏收藏1

主题

好友

565

积分

超级版主

沙发
发表于 2013-4-13 00:03:55 |只看该作者
输入事件(键盘,摇杆)和属性树和动力模型FDM ,三者关系!有待进一步研究中!
回复

使用道具 举报

主题

好友

161

积分

理论基础学员

板凳
发表于 2013-4-15 19:57:59 |只看该作者
实时输出用Get,那在用VC编程时都需要哪些头文件、库等等呢???
工程里该如何设置呢?
有做过的朋友说明下啦,谢谢!~

点评

GET什么?  详情 回复 发表于 2013-4-15 21:02
回复

使用道具 举报

主题

好友

565

积分

超级版主

地板
发表于 2013-4-15 21:02:38 |只看该作者
kgdjszx 发表于 2013-4-15 19:57
实时输出用Get,那在用VC编程时都需要哪些头文件、库等等呢???
工程里该如何设置呢?
有做过的朋友说明 ...

GET什么?
回复

使用道具 举报

主题

好友

161

积分

理论基础学员

5#
发表于 2013-4-15 23:05:01 |只看该作者
就是要获取“高度”“速度”“经纬度”“爬升率”等等,就是与Position 、Velocities等相关的信息,
怎样取出来?一边我在vc工程中能够实时显示出来。

谢谢您的回复。

点评

你是想获取FDM的数据吧!只能给你做参考!,具体也没有去写过。!  详情 回复 发表于 2013-4-15 23:47
回复

使用道具 举报

主题

好友

565

积分

超级版主

6#
发表于 2013-4-15 23:47:06 |只看该作者
本帖最后由 freeyun 于 2013-4-16 00:05 编辑
kgdjszx 发表于 2013-4-15 23:05
就是要获取“高度”“速度”“经纬度”“爬升率”等等,就是与Position 、Velocities等相关的信息,
怎样取 ...

你是想获取FDM的数据吧!只能给你做参考!http://wiki.flightgear.org/Property_Tree/Reference#Flight_Dynamics_Model,具体也没有去写过。!
不过根据你意思,你是想通过网络方式实时获取所有的FDM的数据
我个人认为FG在协议上有这个东西提供:我还没有仔细去了解过它FGIO,它所有的协议都在这个目录下:flightgear\src\Network
回复

使用道具 举报

主题

好友

161

积分

理论基础学员

7#
发表于 2013-4-16 00:05:20 |只看该作者
看到了,非常感谢您的迅速回复!
我好好看看去。

研究出东西来,上网给大家分享下。

点评

共同讨论,刚好我,我在研究它的这个属性树!有个帖子写过关于FGIO,你可以去看看!  详情 回复 发表于 2013-4-16 00:09
回复

使用道具 举报

主题

好友

565

积分

超级版主

8#
发表于 2013-4-16 00:09:39 |只看该作者
kgdjszx 发表于 2013-4-16 00:05
看到了,非常感谢您的迅速回复!
我好好看看去。

共同讨论,刚好我,我在研究它的这个属性树!有个帖子写过关于FGIO,你可以去看看!
回复

使用道具 举报

主题

好友

167

积分

版主

9#
发表于 2013-4-16 20:51:19 |只看该作者
壮哉我大楼主!
回复

使用道具 举报

主题

好友

565

积分

超级版主

10#
发表于 2013-4-16 23:03:08 |只看该作者
Breaking_Dawn 发表于 2013-4-16 20:51
壮哉我大楼主!

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 加入FG

本版积分规则

手机版|联系我们| FlightGear ( 吉ICP备19002044号-7 )

GMT+8, 2024-4-26 11:09

Powered by Discuz! X3.2

© 2001-2013 FlightGear Inc.

返回顶部