机器人车技术开发分享网
6-GPS室外定位导航车仪器指示表显示
  • 首页 > 智能小车
  • 作者:小v
  • 2020年6月29日 10:10 星期一
  • 浏览:34
  • 字号:
  • 评论:0
  • 这里使用的开源方案 为 flight-indicator .

    github为  https://github.com/horo2016/jean-flight-indicator

    提供支持航向、速度、高度、俯仰和横滚、垂直速度和转弯的标准飞行指示器的Javascript动画svg。此外,直升机特有的飞行参数指示器可用于操纵杆定位、踏板定位和集合操纵杆的角度。

    实站中应用如下

    Use it as browser variable
    // Set basic options for all flight indicators
    FlightIndicator.setOptions({
            assets: "../img/" // path where the svgs are located
    });
    
    // Create all indicator and pass the id of the html element 
    // which shall be used as container for the specific indicator svg
     var speed = new FlightIndicator.Speed({
        containerId: "speed-container",
        onIndicatorReady: function () {
            
        }
    });
    var heading = new FlightIndicator.Heading({
        containerId: "heading-container",
        onIndicatorReady: function () {
            
        }
    });
    var altitude = new FlightIndicator.Altitude({
        containerId: "altitude-container",
        onIndicatorReady: function () {
            
        }
    });
    var horizon = new FlightIndicator.Horizon({
        containerId: "horizon-container",
        onIndicatorReady: function () {
            
        }
    });
    var verticalSpeed = new FlightIndicator.VerticalSpeed({
        containerId: "vertical-speed-container",
        onIndicatorReady: function () {
            
        }
    });
    var turn = new FlightIndicator.Turn({
        containerId: "turn-container",
        onIndicatorReady: function () {
            
        }
    });
    var stick = new FlightIndicator.Stick({
        containerId: "stick-container",
        onIndicatorReady: function () {
            
        }
    });
    var pedal = new FlightIndicator.Pedal({
        containerId: "pedal-container",
        onIndicatorReady: function () {
            
        }
    });
    var collective = new FlightIndicator.Collective({
        containerId: "collective-container",
        onIndicatorReady: function () {
            
        }
    });
    
    // Update methods. 
    // Call this methods for each new value you want to display
    // For a smooth visualisation of the values within the specific indicator, 
    // it is recommended to update every 50ms.
    speed.update(/* number within range from 0kt to 160kt */);
    heading.update(/* number within range from 360° to -360° */);
    altitude.update(/* number within range from 0ft to 99999ft */);
    horizon.update(
        /* number within range from 40° to -40° */, 
        /* number within range from 30° to -30° */
    );
    verticalSpeed.update(/* number within range from 4000ft to -4000ft */)
    turn.update(
        /* number within range from -3°/sec to 3°/sec */, 
        /* number within range from -1 to 1 */
    );
    stick.update(
        /* number within range from 1 to -1 */, 
        /* number within range from 1 to -1 */
    );
    pedal.update(
        /* number within range from 1 to 0 */, 
        /* number within range from 1 to 0 */
    );
    collective.update(/* number within range from 0° to 60° */);
    Use it with require.js
    require(["path/to/FlightIndicator"], function(FlightIndicator){
        // Work with FlightIndicator
    });

      您阅读这篇文章共花了:  
    二维码加载中...
    本文作者:小v      文章标题: 6-GPS室外定位导航车仪器指示表显示
    本文地址:http://blog.cvosrobot.com/?post=516
    版权声明:若无注明,本文皆为“机器人车技术开发分享网”原创,转载请保留文章出处。

    返回顶部| 首页| 手气不错| 捐赠支持| 自定义链接| 自定义链接| 自定义链接| 手机版本|后花园

    Copyright © 2014-2017 机器人车技术开发分享网   京ICP备14059411 Copyright 2014-2019 小v工作室 版权所有 All Rights Reserved

    sitemap