modified thruster table to include all axis movement vectors

This commit is contained in:
2026-06-29 13:51:57 -05:00
parent d9c29c89be
commit de7decceaa
2 changed files with 106 additions and 16 deletions

42
docs.md
View File

@@ -194,6 +194,12 @@ Every cycle:
- Velocity Sensor `getAxis()`, `getVelocity`
- Poll input signal strengths for global downwards thrust, and fore and aft thrust
### Math
#### Calculate Counteractive Thrust
TODO: fill in
### Data Structures
#### Config
@@ -241,6 +247,8 @@ Config = {
}
```
#### SensorData
The member variables of the sensor table is as follows:
```lua
@@ -284,11 +292,21 @@ SensorData = {
}
```
#### Thrusters
The member variables of the Thruster table are as follows (using some example thrusters):
```lua
Thrusters = {
gyroscopic_propeller_bearing_0 = {
-- primary attitude thruster?
primary_pitch_thruster = true,
primary_roll_thruster = true,
primary_yaw_thruster = false,
-- primary lateral thruster?
primary_altitude_thruster = true,
primary_fore_thruster = false,
primary_aft_thruster = false,
type = "rotator",
name = "gyroscopic_propeller_bearing_0",
thruster = nil,
@@ -308,6 +326,14 @@ Thrusters = {
power = nil
},
gyroscopic_propeller_bearing_1 = {
-- primary attitude thruster?
primary_pitch_thruster = true,
primary_roll_thruster = true,
primary_yaw_thruster = false,
-- primary lateral thruster?
primary_altitude_thruster = true,
primary_fore_thruster = false,
primary_aft_thruster = false,
type = "rotator",
name = "gyroscopic_propeller_bearing_1",
thruster = nil,
@@ -327,6 +353,14 @@ Thrusters = {
power = nil
},
gyroscopic_propeller_bearing_2 = {
-- primary attitude thruster?
primary_pitch_thruster = true,
primary_roll_thruster = true,
primary_yaw_thruster = false,
-- primary lateral thruster?
primary_altitude_thruster = true,
primary_fore_thruster = false,
primary_aft_thruster = false,
type = "rotator",
name = "gyroscopic_propeller_bearing_2",
thruster = nil,
@@ -346,6 +380,14 @@ Thrusters = {
power = nil
},
gyroscopic_propeller_bearing_3 = {
-- primary attitude thruster?
primary_pitch_thruster = true,
primary_roll_thruster = true,
primary_yaw_thruster = false,
-- primary lateral thruster?
primary_altitude_thruster = true,
primary_fore_thruster = false,
primary_aft_thruster = false,
type = "rotator",
name = "gyroscopic_propeller_bearing_3",
thruster = nil,

View File

@@ -1,53 +1,101 @@
return {
gyroscopic_propeller_bearing_0 = {
primary_pitch_thruster = true,
primary_roll_thruster = true,
primary_yaw_thruster = false,
primary_altitude_thruster = true,
primary_fore_thruster = false,
primary_aft_thruster = false,
type = "rotator",
name = "gyroscopic_propeller_bearing_0",
thruster = nil,
transmission = nil,
affectVectors = {
yaw = nil,
pitch = "up",
roll = "star",
lateral = nil
angular = {
yaw = nil,
pitch = "up",
roll = "star",
},
lateral = {
x = nil,
y = "up",
z = nil
}
},
power = nil
},
gyroscopic_propeller_bearing_1 = {
primary_pitch_thruster = true,
primary_roll_thruster = true,
primary_yaw_thruster = false,
primary_altitude_thruster = true,
primary_fore_thruster = false,
primary_aft_thruster = false,
type = "rotator",
name = "gyroscopic_propeller_bearing_1",
thruster = nil,
transmission = nil,
affectVectors = {
yaw = nil,
pitch = "up",
roll = "port",
lateral = nil
angular = {
yaw = nil,
pitch = "up",
roll = "port",
},
lateral = {
x = nil,
y = "up",
z = nil
}
},
power = nil
},
gyroscopic_propeller_bearing_2 = {
primary_pitch_thruster = true,
primary_roll_thruster = true,
primary_yaw_thruster = false,
primary_altitude_thruster = true,
primary_fore_thruster = false,
primary_aft_thruster = false,
type = "rotator",
name = "gyroscopic_propeller_bearing_2",
thruster = nil,
transmission = nil,
affectVectors = {
yaw = nil,
pitch = "down",
roll = "port",
lateral = nil
angular = {
yaw = nil,
pitch = "down",
roll = "port",
},
lateral = {
x = nil,
y = "up",
z = nil
}
},
power = nil
},
gyroscopic_propeller_bearing_3 = {
primary_pitch_thruster = true,
primary_roll_thruster = true,
primary_yaw_thruster = false,
primary_altitude_thruster = true,
primary_fore_thruster = false,
primary_aft_thruster = false,
type = "rotator",
name = "gyroscopic_propeller_bearing_3",
thruster = nil,
transmission = nil,
affectVectors = {
yaw = nil,
pitch = "down",
roll = "star",
lateral = nil
angular = {
yaw = nil,
pitch = "down",
roll = "star",
},
lateral = {
x = nil,
y = "up",
z = nil
}
},
power = nil
}