-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mission load and save #86
Comments
This returns the current mission that is |
mission database query example: This returns all missions that are save in the database in the api to the client. |
@fnoop Can you please review the above to make sure it aligns with what was discussed in gitter? Thanks! |
Could we please have a 'name' and 'description' field as well as 'id' field? this is so we can list the missions in the interface and the user will have some way of differentiating between different missions. Name could be a short title (eg. Map Field 1) of say max 16 or 32 chars and Description could be a longer text eg. 'Auto take off, Start from bottom left of field 1 and perform linear transects until field is entirely mapped, then auto land at takeoff point'. |
Sure, no problem. We can keep adding fields to missionlist as we require them. |
@fnoop I have added the values. Currently the |
Great! Thanks :) |
Is it possible to have a proper name+description for loaded mission, or is there a reason you leave it blank? |
Yes it is possible but more complex than the 10min it took to add the other feature :) One way around this might be to add a computationally cheap hash to each of the missions in the database. When we first get the mission from the vehicle we can generate a hash and compare against the database. If we find a match, keep the mission items as is but apply the name and description that we have stored. This also might fail as the home point is updated, changing the mission hash? Perhaps we would need two hashes, one with a home point for an exact match and one without the home point as a more general match... unsure until we try... Can you think of another way of persisting the mission name and description? |
I actually meant just something simpler than that - to manually add a fixed name/description to the 'loaded' id mission? |
Re 1 the all the required fields are already exposed (see below). Taking the example of NAV_WAYPOINT above the parameters are already exposed in graphql. 1: param1 For example The mission schema always has these 7 fields so normally the following occurs as you plan a mission: Make a new mission item. |
@fnoop I'm not saying it has to occur that way, but that is what I have experienced and it seems to work reasonably well. I feel that if we index the parameters by the labels they will always be changing, where as by using the numbers you can easily map what each param does to the correct graphql message field. I hope this makes sense, let me know if I'm not explaining myself clearly :) |
Ah no, that makes perfect sense! Me being stupid. |
Params 5, 6, 7 are not always latitude, longitude and altitude, eg:
Should the message fields be renamed to param5, param6, param7? |
Also looks like the param values are descriptions, are short names available?
|
Yes. I think this is a good idea.
When I wrote the extraction tool (some time ago) there was no further information available. This may have changed with later versions. As I recall MAVProxy was doing some level of hackery to generate units and short names from the longer descriptions |
Just confirming the point about the lack of short name or units for the params: As you can see the information isn't available. If we require it we will need to try and extract it before generating the json... How badly do you want it? :) |
Can we just create our own (average) human readable name and map it to the name value on the client? Perhaps something like what they do to make UI's multi-lingual. Just a flat file with a look-up. |
Yes but trying to avoid manual work where possible. If it already exists elsewhere then best to use other people's hard work :) |
you could strip off the prefix and underscores of the name field. name="MAV_CMD_NAV_WAYPOINT" WAYPOINT "MAV_CMD_NAV_LOITER_UNLIM" LOITER UNLIM And then use the description in a tool tip. |
Yes that's effectively what we're doing for the waypoint types - this is more about the waypoint parameters now. From the example above:
These should have short parameter names eg:
|
ah. well, if not available then i guess you are stuck with a look-up table. |
Yes, I think we will have to do the work by hand on this occasion... |
loaded
will be extracted from the database and sent to the front endloaded
will bring the current flight controller mission to the front endloaded
will save a mission to the databaseloaded
will cause an update to the flight controller waypointsModifications to the database occur via a separate mechanism (possibly mutation on
missionDatabase
)The text was updated successfully, but these errors were encountered: