added a WIP schema for all data structures under the ### Data Structures heading
This commit is contained in:
90
docs.md
90
docs.md
@@ -193,3 +193,93 @@ Every cycle:
|
||||
- Altitude Sensor `getHeight()`, `getAirPressure()`, `getVerticalSpeed()`
|
||||
- Velocity Sensor `getAxis()`, `getVelocity`
|
||||
- Poll input signal strengths for global downwards thrust, and fore and aft thrust
|
||||
|
||||
### Data Structures
|
||||
|
||||
#### Config
|
||||
|
||||
The member variables of the Config table is as follows:
|
||||
|
||||
```lua
|
||||
Config = {
|
||||
ConfigPath = "/path/to/config.txt",
|
||||
thrusterConfigPath = "path/to/thrusters.txt",
|
||||
Debug = false, -- controls various debug print statements
|
||||
Monitors = {
|
||||
InstrumentPanelMonitor = {
|
||||
name = "peripheralName",
|
||||
peripheral = {} -- stores the table returned by running peripheral.wrap(name)
|
||||
},
|
||||
AutopilotControlMonitor = {
|
||||
name = "peripheralName",
|
||||
peripheral = {}
|
||||
}
|
||||
},
|
||||
Autopilot = {
|
||||
AutopilotEngaged = false, -- global shutoff for all autopilot functions
|
||||
AutoForeAft = false, -- automatic forward/rearward throttle
|
||||
AutopilotDesiredSpeed = nil, -- keep a certain velocity
|
||||
AutopilotDesiredHeading = nil -- maintain a certain heading
|
||||
},
|
||||
SensorCorrection = {
|
||||
Heading = 0 -- this is directly added to the heading value, in case the vessel was built with the heading not being direct north
|
||||
},
|
||||
Throttles = {
|
||||
fore = {
|
||||
name = "peripheralName",
|
||||
side = "redstoneRelaySide" -- it is assumed that a user will use a redstone relay for their throttles
|
||||
},
|
||||
aft = {
|
||||
name = "peripheralName",
|
||||
side = "redstoneRelaySide"
|
||||
},
|
||||
down = {
|
||||
name = "peripheralName",
|
||||
side = "redstoneRelaySide"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
The member variables of the sensor table is as follows:
|
||||
|
||||
```lua
|
||||
SensorData = {
|
||||
Velocity = {
|
||||
Raw = {
|
||||
x = nil,
|
||||
y = nil,
|
||||
z = nil
|
||||
}
|
||||
},
|
||||
Altitude = {
|
||||
Altitude = nil,
|
||||
AirPressure = nil,
|
||||
VerticalSpeed = nil
|
||||
},
|
||||
NavTable = {
|
||||
Heading = nil,
|
||||
HasTarget = nil,
|
||||
-- values past this are only populated if HasTarget == true
|
||||
TargetBearing = nil,
|
||||
TargetClosureRate = nil,
|
||||
TargetVerticalOffset = nil,
|
||||
TargetRelativeAngle = nil
|
||||
},
|
||||
Gimbal = {
|
||||
Angles = {
|
||||
xAngle = nil,
|
||||
zAngle = nil
|
||||
},
|
||||
AngularRates = {
|
||||
wx = nil,
|
||||
wy = nil,
|
||||
wz = nil
|
||||
},
|
||||
LinearAcceleration = {
|
||||
ax = nil,
|
||||
ay = nil,
|
||||
az = nil
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user