Negative points in Goals

Discussion related to Mission design and creation.
Locked
User avatar
Raynald1
Posts: 89
Joined: Mon Jun 24, 2013 10:11 pm
Location: Prescott, AZ
Contact:

Negative points in Goals

Post by Raynald1 »

When I assign negative points in a goal it does net give the correct number of points but something completely different.
For example, when I set 3 in the PointValue box, the goal shows (3 points).
When I set -3 points in the PointValue box, I see (18446744073709551613 points) in the goal.
Same behavior for -5 points: 18446744073709551611
-10: 18446744073709551606.
Ray Bedard
True Course Simulations
Michael Semeniuk
Posts: 81
Joined: Mon May 09, 2011 5:35 pm

Re: Negative points in Goals

Post by Michael Semeniuk »

Hi Ray,
Currently point values are stored in an unsigned long integer format so negative numbers are not supported and will wraparound. The issue it appears is that users shouldn't be allowed to enter negative numbers.

Can you explain your use case? Are you trying to penalize a user if they perform a negative action so that a group goal will potentially not complete? Do you expect goals that have already been completed to potentially fail if the user performs a negative interaction?

Once we understand the use case, we can write up a ticket to address the issue in a future release.

Thanks,
Michael
User avatar
Raynald1
Posts: 89
Joined: Mon Jun 24, 2013 10:11 pm
Location: Prescott, AZ
Contact:

Re: Negative points in Goals

Post by Raynald1 »

Michael

I am using it in an academic context at a University.

I want to assign a score for the mission flown by a student that will be posted to his/her grade book in a learning management system (Canvas).

I am in the process of designing a system to extract the scores for each goal and post it to the screen after the student has flown the mission.

That score will also be downloaded to a Learning Record Store (LRS) using the TinCan xAPI.

Specifically, I want to assign a positive score to a positive action. For example, the goal is worth +5 points when the student goes to a gate at the prescribe altitude and position (I am using a hoop and an area to trigger the goal).

I also want to assign a negative (-10 points) when a students descends below a prescribed altitude as a penalty.

In answer to your questions:

- Are you trying to penalize a user if they perform a negative action so that a group goal will potentially not complete?

Not necessarily. I just want to display a "debrief" at the end of the mission (pass or fail) and download the score to my LRS.

- Do you expect goals that have already been completed to potentially fail if the user performs a negative interaction?

No. All the goals are independent of each other. I have not yet given much thought to the group goal issue and I need to spend more time on that issue.
Ray Bedard
True Course Simulations
Michael Semeniuk
Posts: 81
Joined: Mon May 09, 2011 5:35 pm

Re: Negative points in Goals

Post by Michael Semeniuk »

Gotcha.

Unfortunately, the number set for goal points will be of type ULONG. You could raw cast this to a LONG and it should work and return you the negative value you've set. Tell me if this works!

Michael
User avatar
Raynald1
Posts: 89
Joined: Mon Jun 24, 2013 10:11 pm
Location: Prescott, AZ
Contact:

Re: Negative points in Goals

Post by Raynald1 »

Michael

Thanks for the reply but could you be a bit more specific with the ULONG and the LONG.
Not sure where to set those values.
Ray Bedard
True Course Simulations
Michael Semeniuk
Posts: 81
Joined: Mon May 09, 2011 5:35 pm

Re: Negative points in Goals

Post by Michael Semeniuk »

Are you requesting the goals point values via SimConnect? If you are receiving the struct SIMCONNECT_RECV_GOAL, then try casting the member that contains the point value:

Code: Select all

struct SIMCONNECT_RECV_GOAL : public SIMCONNECT_RECV //when dwID == SIMCONNECT_RECV_ID_GOAL 
{ 
    DWORD dwRequestID; 
    GUID guidInstanceID;          // Instance id of the goal 
    BOOL isOptional;                         // Whether goal is optional for mission completion 
    DWORD dwOrder;                           // Priority order of goal 
    DWORD dwPointValue;                      // Point value of goal 
    SIMCONNECT_GOAL_STATE eGoalState;        // Goal state 
    char szGoalText[MAX_PATH]; // Goal text 
}; 

SIMCONNECT_RECV_GOAL yourQueriedGoal; // goal information you got back
to a long integer:

Code: Select all

LONG myPointValue = (LONG)yourQueriedGoal.dwPointValue;
Sorry for not being more clear.
User avatar
Raynald1
Posts: 89
Joined: Mon Jun 24, 2013 10:11 pm
Location: Prescott, AZ
Contact:

Re: Negative points in Goals

Post by Raynald1 »

Michael

I am trying to build a mission where a student gets 2 points for accomplishing a task like a climb to 9,000' in a slow climb.
Each time the students veers off the heading for more than 10 seconds, he receives -1 point.

The student passes the mission (Success) if he gets a total of more than 10 points.

In other words, I want to be able to subtract negative numbers in the total for the ObjectivePassingScore.

It is impossible to do inside SimDirector now with a -1 in the ObjectivePointValue of -1 in the box is shown as 18446744073709551615 in the black Goal element.
The problem is that the ObjectivePassingScore counts 1 as +1 and counts -1 as +18446744073709551615.

Can it be fixed in SinbDirector without having to go through SimConnect?

Thanks

Ray
Ray Bedard
True Course Simulations
User avatar
Raynald1
Posts: 89
Joined: Mon Jun 24, 2013 10:11 pm
Location: Prescott, AZ
Contact:

Re: Negative points in Goals

Post by Raynald1 »

I did a lot more trying last night and the problem is not as big as I described in my last post.

In order to make it work, I had to make all my goals "completed" instead of the goals with positive points "completed" and the goals with negative points as "failed".

It leaves a smaller problem of displaying negative points as 18446744073709551615 in the "PointValue" box.

Thanks

Ray
Ray Bedard
True Course Simulations
Locked