dcshmd

package module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

README

dcs-hmd

DCS-HMD is a helmet-mounted display (HMD) designed for DCS World, specifically for the Ka-50 helicopter. It displays the current values of:

  • Rotor pitch (from 1 to 15)
  • Rotor RPM (from 0 to 110)
  • Vertical velocity (from -30 to 30)

I plan to add the ability to show the current values of the following parameters at a later date:

  • Airspeed
  • (Radio) altitude
  • Heading
  • Attitude indicator (bank/pitch)

Demo

Watch the video

Installation

  1. Download the dcs-hmd-vX.X.X.zip file from the latest release and extract it.

  2. Open a command prompt or terminal window and navigate to the directory where you extracted the dcs-hmd-vX.X.X.zip file.

  3. Run the dcs-hmd.exe program with the -i flag followed by the path to your DCS scripts directory (usually %USERPROFILE%\Saved Games\DCS.openbeta\Scripts). For example:

    dcs-hmd.exe -i "%USERPROFILE%\Saved Games\DCS.openbeta\Scripts"
    

    This will automatically install the required scripts in the specified DCS scripts directory.

  4. If you have multiple monitors, run dcs-hmd.exe on the monitor where you want the helmet-mounted display (HMD) to appear.

  5. Run DCS World in borderless windowed mode, and select the Ka-50 helicopter mission.

Uninstall

To uninstall all scripts that were installed with the -i flag, you can use the -u flag followed by the path to your DCS scripts directory (usually %USERPROFILE%\Saved Games\DCS.openbeta\Scripts). For example:

dcs-hmd.exe -u "%USERPROFILE%\Saved Games\DCS.openbeta\Scripts"

This will delete all installed scripts and update the Export.lua file.

Troubleshooting

If you encounter any problems while using DCS-HMD, please follow these steps to help me solve the issue more quickly:

  1. Run dcs-hmd.exe with the -v flag to print version information. This will display information such as the version number, build time, and Git hash.

    dcs-hmd.exe -v
    
  2. Copy the version information and include it when reporting the issue on GitHub.

  3. Provide a detailed description of the problem, including any error messages or logs.

By providing this information, it will help me understand which version of the software is installed and which version of the code may be causing the problem.

Documentation

Index

Constants

View Source
const (
	ScreenWidth  = 800
	ScreenHeight = 600
)

Variables

This section is empty.

Functions

func InstallScripts added in v0.1.0

func InstallScripts(scriptsInstallDir string, verbose bool) error

InstallScripts installs the scripts in the specified target directory. If verbose is true, the function prints detailed log messages to stdout.

func UninstallScripts added in v0.1.0

func UninstallScripts(scriptsInstallDir string, verbose bool) error

UninstallScripts uninstalls the scripts from the specified target directory. If verbose is true, the function prints detailed log messages to stdout.

Types

type FontFace

type FontFace struct {
	font.Face
	// contains filtered or unexported fields
}

func NewFontFace

func NewFontFace(size, dpi int) (*FontFace, error)

func (*FontFace) DrawText

func (h *FontFace) DrawText(rt *ebiten.Image, str string, x, y int, clr color.Color)

func (*FontFace) DrawTextWithShadow

func (h *FontFace) DrawTextWithShadow(rt *ebiten.Image, str string, x, y int, clr color.Color)

func (*FontFace) DrawTextWithShadowCenter

func (h *FontFace) DrawTextWithShadowCenter(rt *ebiten.Image, str string, x, y int, clr color.Color, width int)

func (*FontFace) DrawTextWithShadowRight

func (h *FontFace) DrawTextWithShadowRight(rt *ebiten.Image, str string, x, y int, clr color.Color, width int)

func (*FontFace) TextWidth

func (h *FontFace) TextWidth(str string) int

type HUD

type HUD struct {
	// contains filtered or unexported fields
}

func NewHUD

func NewHUD() (*HUD, error)

func (*HUD) Close

func (h *HUD) Close() error

func (*HUD) Draw

func (h *HUD) Draw(screen *ebiten.Image)

func (*HUD) Layout

func (h *HUD) Layout(outsideWidth, outsideHeight int) (screenWidth, screenHeight int)

func (*HUD) SetRotorPitch

func (h *HUD) SetRotorPitch(val float64)

SetRotorPitch is thread-safe to update rotor pitch.

func (*HUD) SetRotorRPM

func (h *HUD) SetRotorRPM(val float64)

SetRotorRPM is thread-safe to update rotor RPM.

func (*HUD) SetVerticalVelocity added in v0.1.0

func (h *HUD) SetVerticalVelocity(val float64)

SetVerticalVelocity is thread-safe to update vertical velocity.

func (*HUD) Update

func (h *HUD) Update() error

Directories

Path Synopsis
aircraft
cmd
gui
internal
win
Package utils provides utility functions and types
Package utils provides utility functions and types

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL