Skip to content
Christian Haettich edited this page Jan 24, 2016 · 3 revisions

Modifying Satellites

Modifying the position

// changes the position of satellite with id == 3 to azimuth = 120.5 and elevation = 45.0
skyplotWidget->setAzimuth( 3, 120.5 );
skyplotWidget->setElevation( 3, 45.0 );

Modifying the label

// changes the label to 'x4'
skyplotWidget->setLabel( 4, QString('x4') );

Modifying the color

// changes the color of the ring (the border, only visible when state is marked)
skyplotWidget->setOuterColor( 5, Qt::red );

// changes the color of the filling of the circle
skyplotWidget->setInnerColor( 5, Qt::yellow );

// changes the color of the label
skyplotWidget->setFontColor( 5, Qt::blue );

Change the state

// set satellite with id==6 as visible
skyplotWidget->setState( 6, SkyplotWidget::SatelliteState::Visible );

// set satellite with id==6 as half-visible
skyplotWidget->setState( 6, SkyplotWidget::SatelliteState::HalfVisible );

// set satellite with id==6 as half-visible and flashing
skyplotWidget->setState( 6, SkyplotWidget::SatelliteState::HalfVisible |
                            SkyplotWidget::SatelliteState::Flashing  );

// set satellite with id==6 as half-visible, flashing and marked
skyplotWidget->setState( 6, SkyplotWidget::SatelliteState::HalfVisible |
                            SkyplotWidget::SatelliteState::Flashing    |
                            SkyplotWidget::SatelliteState::Marked );


// Invisible beats everything else. 
// The following will result in an invisible satellite
skyplotWidget->setState( 6, SkyplotWidget::SatelliteState::Invisible
                            SkyplotWidget::SatelliteState::HalfVisible );
// and Visible beats visible. So the following 
// will be fully visible:
skyplotWidget->setState( 6, SkyplotWidget::SatelliteState::Visible
                            SkyplotWidget::SatelliteState::HalfVisible );

// If no visibility is defined, the satellite will not be visible, e.g.
skyplotWidget->setState( 6, SkyplotWidget::SatelliteState::Flashing );

Iterating over all IDs

// sets all satellites into the half-visible state
for( auto id : skyplotWidget->ids() )
{
   skyplotWidget->setState( id, SkyplotWidget::SatelliteState::HalfVisible );
}

Clone this wiki locally