#
# Ellipso
#
# $Id: ellipso.tcl,v 1.3 2004/10/06 16:37:04 lloydwood Exp $

#
# Do ELLIPSO-BOREALIS
#

set SATS_PER_PLANE 5
set NUM_PLANES 2

set apogee_altitude 7846.0
set perigee_altitude 520.0

# setup orbital elements
set a [expr ($apogee_altitude+$perigee_altitude)/2+$RADIUS_OF_EARTH]
set e [expr ($apogee_altitude-$perigee_altitude)/(2*$a)]
set inc 116.565
set omega -90.0

# compute period of orbit
set T_per [expr 2 * $PI * pow($a,1.5) / sqrt($MU)]


satellites GV_BEGIN
for {set j 0} {$j < $NUM_PLANES} {incr j} {
	set Omega [expr $j * 360.0 / $NUM_PLANES]
	for {set i 0} {$i < $SATS_PER_PLANE} {incr i} {
		if { $j % 2 == 0} {
			set plane_offset 0
		} else {
			set plane_offset [expr $T_per / $SATS_PER_PLANE / 2.0]
		}
		set T [expr $T_per * $i / $SATS_PER_PLANE + $plane_offset]
		satellites LOAD $a $e $inc $Omega $omega $T
	}
}
satellites GV_END



#
# Do ELLIPSO-CONCORDIA
#

# setup orbital elements
set a [expr 8040.0+$RADIUS_OF_EARTH]
set e 0.0
set inc 0
set Omega 0.0
set omega 0.0

# compute period of orbit
set T_per [expr 2 * $PI * pow($a,1.5) / sqrt($MU)]

satellites GV_BEGIN
for {set i 0} {$i < 6} {incr i} {
	set T [expr $T_per*$i/6]
	satellites LOAD $a $e $inc $Omega $omega $T
}
satellites GV_END
