Skip to content

Commit

Permalink
#641 Updated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
krichardsson committed Nov 12, 2020
1 parent 80f63c7 commit 492adb5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
14 changes: 8 additions & 6 deletions docs/functional-areas/lighthouse/setting_up.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,14 @@ The output from the script should look something like:
{.origin = {0.044224, 3.075050, 3.035368, }, .mat = {{-0.367098, 0.847259, -0.383915, }, {-0.658670, -0.528202, -0.535869, }, {-0.656805, 0.056157, 0.751967, }, }},{% endraw %}


Copy the last two lines and, on the computer or virtual machine you use for Crazyflie development, paste them into the file 'src/modules/src/lighthouse/lighthouse_position_est.c'. They should replace the contents of lighthouseBaseStationsGeometry[].

baseStationGeometry_t lighthouseBaseStationsGeometry[2] = {
{% raw %}{.origin = {0.929796, -1.359615, 3.187089, }, .mat = {{-0.621841, -0.513463, -0.591329, }, {0.451725, -0.851970, 0.264749, }, {-0.639733, -0.102486, 0.761734, }, }},
{.origin = {0.044224, 3.075050, 3.035368, }, .mat = {{-0.367098, 0.847259, -0.383915, }, {-0.658670, -0.528202, -0.535869, }, {-0.656805, 0.056157, 0.751967, }, }},{% endraw %}
};
Copy the last two lines and, on the computer or virtual machine you use for Crazyflie development, paste them into the file 'src/modules/src/lighthouse/lighthouse_core.c'. They should replace the contents of lighthouseCoreState.bsGeometry.

{% raw %}NO_DMA_CCM_SAFE_ZERO_INIT pulseProcessor_t lighthouseCoreState = {
.bsGeometry = {
{.origin = {0.929796, -1.359615, 3.187089, }, .mat = {{-0.621841, -0.513463, -0.591329, }, {0.451725, -0.851970, 0.264749, }, {-0.639733, -0.102486, 0.761734, }, }},
{.origin = {0.044224, 3.075050, 3.035368, }, .mat = {{-0.367098, 0.847259, -0.383915, }, {-0.658670, -0.528202, -0.535869, }, {-0.656805, 0.056157, 0.751967, }, }},
},
};{% endraw %}

The .origin part represents the position of each base station, while the .mat part is the orientation (rotation matrix). Check that the positions seems reasonable.

Expand Down
2 changes: 1 addition & 1 deletion src/deck/drivers/src/lighthouse.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

static bool isInit = false;

// lighthouseBaseStationsGeometry has been moved to lighthouse_position_est.c
// lighthouseBaseStationsGeometry has been moved to lighthouse_core.c

static void lighthouseInit(DeckInfo *info)
{
Expand Down

0 comments on commit 492adb5

Please sign in to comment.