default gui configuration panel on custom objects

Development related to the GMAT core and GUI

default gui configuration panel on custom objects

Postby marchand » Wed Aug 14, 2013 8:44 pm

I was about to ask this question when I eventually found the answer by reverse engineering the Estimation plugin. If you create a custom object that has reference objects of specific types, and you want the default gui configuration panel to give you a drop-down menu of objects of Only that type, you need to make sure to include the method GetPropertyObjectType in your object. For each reference object, this method should return the exact type, or Gmat::UNKNOWN_OBJECT otherwise. For example, if your custom object has two reference objects of type Gmat::COORDINATE_SYSTEM and type Gmat::LIBRATION_POINT, your GetPropertyObjectType method would look something like this:

Code: Select all
Gmat::ObjectType MyObjectName::GetPropertyObjectType(const Integer id) const
{
   if (id == LPO_COORDINATESYSTEM) {
      return Gmat::COORDINATE_SYSTEM;
   }

   if (id == LPO_LIBRATIONPOINT) {
      return Gmat::LIBRATION_POINT;
   }
   
   return Gmat::UNKNOWN_OBJECT;
}


If you fail to include this method your reference object drop-down boxes will list EVERY SINGLE object in the GMAT resource tree, regardless of type.

Hope that helps someone :^)
marchand
 
Posts: 86
Joined: Tue Feb 21, 2012 2:42 pm

Re: default gui configuration panel on custom objects

Postby jjkparker » Wed Aug 14, 2013 8:55 pm

Thanks for your sleuthing! :-)
Joel J. K. Parker
Flight dynamics engineer, GMAT team
http://gmatcentral.org
jjkparker
 
Posts: 617
Joined: Thu Jan 07, 2010 9:48 pm
Location: NASA Goddard Space Flight Center, Greenbelt, MD

Re: default gui configuration panel on custom objects

Postby irag12 » Sat Sep 13, 2014 12:29 pm

I've been working on creating the Ground Station class. Currently, I have created an Observer base class that has Ground Stations and Space Based Observers as derived classes. Currently, the SBO class is a shell and not fully fleshed out as I'm focusing on getting the ground stations functional first. When I created the Observer class, I based it off of the Space Object class. As such, the position, velocity, and "attitude" information that are required of a ground station are mostly captured already. In this sense, the "attitude" of the sensor describes where the antenna is pointing.
We offer Braindumps.com online training with 100% success guarantee. Download University of Washington study pack and pass your EX0-101 exam in single attempt.if you need more information APPLE see main Facebook Good Luck.
irag12
 
Posts: 1
Joined: Sat Sep 13, 2014 12:25 pm


Return to Core Development

Who is online

Users browsing this forum: No registered users and 5 guests

cron