//--------------------------------------------------------------------------- int SetState(double epoch, double state[], int stateDim) { int retval = -1; if (pSetup != NULL) { GmatState *theState = pSetup->GetPropStateManager()->GetState(); if (stateDim <= theState->GetSize()) { theState->SetEpoch(epoch); theState->SetState(state, stateDim); retval = 0; } else { char msg[128]; sprintf(msg, "ERROR: Incoming state size (%d) is larger than the " "propagation state vector size (%d)!\n Epoch: %lf\n " "State = [%lf %lf %lf %lf %lf %lf]\n", stateDim, theState->GetSize(), epoch, state[0], state[1], state[2], state[3], state[4], state[5]); lastMsg = msg; retval = -2; } } else lastMsg = "ERROR in SetState: The propagation setup is not yet set."; return retval; }