/usr/share/savi/tcl/star.tcl is in savi 1.4.6-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 | #
######################################################
#
# SaVi by Lloyd Wood (lloydwood@users.sourceforge.net),
# Patrick Worfolk (worfolk@alum.mit.edu) and
# Robert Thurman.
#
# Copyright (c) 1997 by The Geometry Center.
# Also Copyright (c) 2013 by Lloyd Wood.
#
# This file is part of SaVi. SaVi is free software;
# you can redistribute it and/or modify it only under
# the terms given in the file COPYRIGHT which you should
# have received along with this file. SaVi may be
# obtained from:
# http://savi.sourceforge.net/
# http://www.geom.uiuc.edu/locate/SaVi
#
######################################################
#
# star.tcl
#
# $Id: star.tcl,v 1.8 2013/05/05 05:19:26 lloydwood Exp $
proc star(build) {} {
global star_oe coverage_angle
set star_oe(name) "star"
if {[eval window(raise) star]} return
set name [build_Toplevel star]
wm protocol $name WM_DELETE_WINDOW star(dismiss)
build_Title $name "create crude star constellation"
set cmd [build_CmdFrame $name cmd]
build_LabelEntryColumns $cmd le0 \
{text " " {"Star parameters" \
"Number of orbital planes" \
"Number of satellites per plane" \
"altitude (km)" \
"inclination (deg)" \
"eccentricity e" \
"omega" \
"long. asc. node offset (deg)" \
"overall phase offset (deg)" \
"coverage angle (deg)" } } \
{dentry "Orbital elements" {star_oe(P) star_oe(S) \
star_oe(alt) star_oe(inc) \
star_oe(e) star_oe(omega) \
star_oe(lan_offset) \
star_oe(phase_offset) \
coverage_angle } } \
{slider " " { star(slide_P) star(slide_S) \
star(slide_alt) star(slide_inc) star(slide_e) \
star(slide_omega) star(slide_lan_offset) \
star(slide_phase_offset) star(coverage_angle)} }
pack $cmd -anchor n -fill both -expand 1
build_LabelEntryColumns $cmd lename \
{lentry "Star name" star_oe(name)}
for {set i 0} {$i < 9} {incr i} {
bind $cmd.le0.c1.$i <Return> star(create)
bind $cmd.le0.c1.$i <Tab> star(create)
}
build_Buttonbar $name dbbar \
{"Create crude star" star(create)} \
{"Dismiss" star(dismiss)}
update
star(reset)
}
proc star(dismiss) {} {
destroy .star
}
proc star(update) {} {
update
}
proc star(create) {} {
global star_oe last_filename
if {$star_oe(P) < 0} return
if {$star_oe(S) < 0} return
if {($star_oe(inc) < -90) || ($star_oe(inc) > 90)} return
if {($star_oe(omega) < -180) || ($star_oe(omega) > 180)} return
if {($star_oe(lan_offset) < -180) || ($star_oe(lan_offset) > 180)} return
if {($star_oe(phase_offset) < -180) || ($star_oe(phase_offset) > 180)} return
main(delete_all)
walker_star $star_oe(P) $star_oe(S) \
$star_oe(alt) $star_oe(inc) $star_oe(e) $star_oe(omega) \
$star_oe(lan_offset) $star_oe(phase_offset) $star_oe(name)
set last_filename "Crude star"
main(update)
}
proc star(slide_P) v {
global star_oe
set star_oe(P) [expr $v+3]
}
proc star(slide_S) v {
global star_oe
set star_oe(S) [expr $v+1]
}
proc star(slide_F) v {
global star_oe
set star_oe(F) [expr $v]
}
proc star(slide_alt) v {
global star_oe
set star_oe(alt) [expr $v*300]
}
proc star(slide_inc) v {
global star_oe
set star_oe(inc) [expr $v*1.8 - 90]
}
proc star(slide_e) v {
global star_oe
# Don't want slider to allow eccentricity > 0.85
# as this shows movement of orbit over time.
set star_oe(e) [expr $v/125.0]
}
proc star(slide_omega) v {
global star_oe
set star_oe(omega) [expr $v*3.6 - 180]
}
proc star(slide_lan_offset) v {
global star_oe
set star_oe(lan_offset) [expr $v*3.6 - 180]
}
proc star(slide_phase_offset) v {
global star_oe
set star_oe(phase_offset) [expr $v*3.6 - 180]
}
proc star(coverage_angle) v {
global coverage_angle
set coverage_angle [expr $v*0.9]
}
proc star(iridium) {} {
global star_oe coverage_angle
set star_oe(name) "Crude-star"
set star_oe(P) 6
set star_oe(S) 11
set star_oe(alt) 780
set star_oe(inc) 86.4
set star_oe(e) 0.0
set star_oe(omega) 0.0
set star_oe(lan_offset) 0.0
set star_oe(phase_offset) 0.0
set coverage_angle 8.2
}
proc star(reset) {} {
# start with sensible values for a popular rosette - crude Iridium
star(iridium)
}
|