Skip to content
This repository has been archived by the owner on Feb 5, 2024. It is now read-only.

PM Drone Restructure #186

Draft
wants to merge 13 commits into
base: pathManRestructure
Choose a base branch
from

Conversation

nehasriva025
Copy link

Description

Restructured PM to be able to work with both fixed wing and multi rotor aircraft. Implemented PM functions for drone given fijo struct from CV and TM.

Documentation

Partially complete documentation can be found here: https://uwarg-docs.atlassian.net/wiki/spaces/ZP/pages/2035056654/Drone+PM+Restructure

Copy link
Member

@antholuo antholuo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall it looks good.

There's a few issues with names starting with leading underscores, I'm not sure how hard it will be to go through and change them but it would be great if it's possible!

typedef struct CommandsForAM{
float roll,pitch; // commanded orientation (radians)
float rudderPercent;
float throttlePercent;
_PassbyControl passbyData;
} CommandsForAM;


//Data for attitude manager to send to path manager.
typedef struct AttitudeData{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why doesn't fixed wing have this?

@@ -6,6 +6,7 @@

#ifndef TELEM_PATH_INTERFACE_HPP
#define TELEM_PATH_INTERFACE_HPP
#define IS_FIXED_WING FALSE
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there anyway we can change these to const or constexpr? We're trying to move away from using #define directives.

double lattiude;
};

struct fijo{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please put a //FIXME or //TODO stating that these are to be changed for comp season

@@ -49,6 +51,13 @@ _ModifyFlightPathErrorCode editFlightPath(Telemetry_PIGO_t * telemetryData, Wayp
*/
_GetNextDirectionsErrorCode pathFollow(Telemetry_PIGO_t * telemetryData, WaypointManager& cruisingStateManager, _WaypointManager_Data_In input, _WaypointManager_Data_Out * output, bool& goingHome, bool& inHold);

#else

_ModifyFlightPathErrorCode editFlightPath(WaypointManager& cruisingStateManager, fijo * telemetryData, _WaypointManager_Data_In input);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know a lot of this isn't your code, but is it possible to change names to no longer having leading underscores?

@@ -96,7 +99,7 @@ class takeoffRollStage : public pathManagerState
void exit(pathManager* pathMgr) {(void) pathMgr;}
static pathManagerState& getInstance();
static WaypointManager takeoffPath;
static _PathData takeoffPoint;
static _PathData takeoffPoint; // target
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same thing with leading underscores here

class landingStage : public pathManagerState
{
public:
void enter(pathManager* pathMgr) {(void) pathMgr;}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

naming in this class

/**
* Structure stores information about the waypoints along our path to the destination and back. Got rid of turn radius
*/
struct _PathData {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a reason we have next + prev as well as lat and lon?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants