-
Notifications
You must be signed in to change notification settings - Fork 8
Configuration File
Keenan Nicholson edited this page Jan 8, 2020
·
5 revisions
To facilitate easy configuration, all settings are located in the configuration.js
javascript file, with each overarching setting class listed as a variable. (IE. system
, headingTape
, speedTape
, etc.) We will cover setting details here:
- Connect your computer to the
stratux
wifi network. - Login to the pi using ssh: (Password should be 'raspberry')
ssh 192.168.10.1 -l pi
- CD to the proper directory:
cd /var/www/ahrs
- Modify the
configuration.js
file with nano (or your preferred command-line editor)
nano configuration.js
- Change settings as needed.
- Save and exit (nano) with
^x
(control-x) theny
thenenter
- After editing is complete, exit ssh
exit
/** ******************************** SYSTEM ******************************** **/
var system = {
// Overall system settings
overlay_active: true, // Enable warning overlay on startup
ahrs: {
// Settings for the overall AHRS
updateTimeout: 750, // Time (in ms) required for a metric to be set as invalid
reloadAfterTimeoutCount: 4 // Number of times the timeout has to be hit before a reboot
},
fmu: {
// Settings for the overall AHRS
updateTimeout: 1500 // Time (in ms) required for a metric to be set as invalid
},
checkActiveTime: 2250,
// Websocket URL for situation
websocket_url: "ws://raspberrypi.local/situation",
enable_ahrs_ws: false,
// Websocket URL for FMU Update
fmu_url: "ws://raspberrypi.local:8888",
enable_fmu: false, // Enable FMU support - in development
cpu_temp_warn: 70, // Temp at which the 'Temp' banner will be displayed (C)
allow_reload: true, // Allows the app to automatically reload if it detects an issue
status_url: "http://raspberrypi.local/getStatus",
push_url: "http://raspberrypi.local",
simulate: false
};
/** ******************************** ****** ******************************** **/
Variable | Description |
---|---|
ahrs.updateTimeout |
Time (in ms) required for an AHRS source to timeout. |
fmu.updateTimeout |
Time (in ms) required for an FMU source to timeout. |
checkActiveTime |
Time (in ms) required for the whole system to reboot if no valid sources. |
websocket_url |
URL of the AHRS websocket from stratux . Should remain constant. |
fmu_url |
URL of the fmu websocket from stratux . In development. |
enable_fmu |
Enable flag for the FMU. In development, recommend that this be false. |
allow_reload |
Allows the system to auto-reload if the data connection to stratux fails. |
status_url |
URL of the status webpage from stratux . Should remain constant. |
simulate |
Simulation flag. Set to true to enable AHRS simulation mode. |
/** ******************************* HEADING ******************************** **/
var headingTape = {
// Compass / track tape at the bottom of the AHRS
range: 30, // Visual range of degrees present at one time. IE: a
// value of '30' allows 30 degrees visiable at all times.
ticks_per_number: 10 // Specifies how often numbers are written on the tape.
// A val of '10' means every 10th number is shown
};
/** ******************************* ******* ******************************** **/
Variable | Description |
---|---|
range |
Range of degrees continually in view for the heading tape. |
ticks_per_number |
Signifies how often a tick is displayed. 10 -> 0°, 10°, 20°,... |
/** ******************************** SPEED ********************************* **/
var speedTape = {
// Speed tape on the left of the AHRS
lowerSpeed: 0, // Lower displayed speed given in the selected unit
upperSpeed: 200, // Upper displayed speed given in the selected unit
speeds: [
// Speed color band configurations given in the selected unit
{
color: COLORS.WHITE,
start: 55,
end: 115
},
{
color: COLORS.GREEN,
start: 64,
end: 140
},
{
color: COLORS.YELLOW,
start: 140,
end: 171
},
{
color: COLORS.RED,
start: 171,
end: 200
}
],
units: UNITS.KTS // Units for displaying speed and for speed config.
};
/** ******************************** ***** ********************************* **/
Variable | Description |
---|---|
lowerSpeed |
Speed at the bottom of the speed tape. Usually 0 . |
upperSpeeds |
Speed at the top of the speed tape. |
speeds |
Array containing multiple speed bands (colored 'arcs' on a traditional indicator'. See COLORS for possible arc colors. |
units |
Unit for displaying speed. See UNITS for possible units (speed). |
/** ******************************* ALTITUDE ******************************* **/
var altTape = {
units: UNITS.FEET, // Units for displaying altitude
altimeter_setting_unit: UNITS.INHG, // Units for entering altimeter settings (INHG, HPA or MILLIBAR)
default_kollsman_inhg: 29.92, // Default kollsman setting for the baro altimeter (inHg)
default_kollsman_millibar_hpa: 1013.2, // Default kollsman setting for the baro altimeter (millibar / hPa)
kollsman_memory_seconds: 18000 // Number of seconds the kollsman setting will be remembered (cookie)
};
/** ******************************* ******** ******************************* **/
Variable | Description |
---|---|
units |
Unit for displaying altitude. See UNITS for possible units (distance). |
altimeter_setting_unit |
Default unit for the altimeter setting (UNITS.INHG , UNITS.HPA or UNITS.MB ). |
default_kollsman_inhg |
Default kollsman (altimeter) setting in inHg. |
default_kollsman_millibar_hpa |
Default kollsman (altimeter) setting in hpa or millibar. |
killsman_memory_seconds |
Number of seconds the altimeter setting will be remembered after setting (upon app restart). |
/** ******************************** VSPEED ******************************** **/
var vspeedTape = {
units: UNITS.FPM // Units for displaying vertical speed
};
/** ******************************** ****** ******************************** **/
Variable | Description |
---|---|
units |
Unit for displaying vertical speed. See UNITS for possible units (speed). |
/** ********************************* AHRS ********************************* **/
var ahrsTape = {
// AHRS in the center of the AHRS
limits: [30, -30], // Limits for the degrees that are displayed. Values
// outside this range show chevrons
degrees_in_view: 25, // Degrees in constant view (range)
chevrons: 4, // Number of chevrons shown passed the limits
chevron_space: 140 // Space given to each chevron (sizing)
};
/** ********************************* AHRS ********************************* **/
Variable | Description |
---|---|
limits |
Total degree range for pitch. Chevrons past these values. |
degrees_in_view |
Total degrees in continuous view. |
chevrons |
Number of chevrons shown passed the degree limit. |
chevron_space |
Space given to each chevron (style change). |
/** ****************************** SLIP SKID ******************************* **/
var slipSkid = {
multiplier: 6, // Arbitrary scale for tuning slip-skid movement
display: true
};
/** ****************************** SLIP SKID ******************************* **/
Variable | Description |
---|---|
multiplier |
Unitless scale for tuning slip-skid movement. Modify if you notice incorrect indication scale. |
display |
Whether or not to display the slip-skid indicator. |
/** *************************** TURN COORDINATOR *************************** **/
var turnCoordinator = {
display: true
};
/** *************************** TURN COORDINATOR *************************** **/
Variable | Description |
---|---|
display |
Whether or not to display the turn coordinator. |
/** ******************************** G-Meter ******************************* **/
var gMeter = {
display: true
};
/** ******************************** ******* ******************************* **/
Variable | Description |
---|---|
display |
Whether or not to display the g-meter. |
/** ****************************** Sat Count ******************************* **/
var satCount = {
display: true
};
/** ****************************** ********* ******************************* **/
Variable | Description |
---|---|
display |
Whether or not to display the satellite counter. |
Variable | Name | Unit Type | Unit System |
---|---|---|---|
UNITS.KTS |
Knots | Speed | US |
UNITS.MPH |
Miles per Hour | Speed | US |
UNITS.FPS |
Feet per Second | Speed | US |
UNITS.FPM |
Feet per Minute | Speed | US |
UNITS.KPH |
Kilometers per Hour | Speed | SI |
UNITS.MPS |
Meters per Second | Speed | SI |
UNITS.MPM |
Meters per Minute | Speed | SI |
UNITS.FEET |
Feet | Distance | US |
UNITS.MILES |
Miles | Distance | US |
UNITS.NAUTICLE_MILES |
Nautical Miles | Distance | US |
UNITS.METERS , UNITS.M
|
Meters | Distance | SI |
UNITS.INHG |
Inches of Mercury | Pressure | US |
UNITS.MILLIBAR , UNITS.MB
|
Millibar | Pressure | SI |
UNITS.HPA |
Hectopascal | Pressure | SI |
Variable | Color |
---|---|
COLORS.RED |
Red |
COLORS.GREEN |
Green |
COLORS.YELLOW |
Yellow |
Stratux AHRS Display :: Stratux Project : AHRS License