- Code: Tout sélectionner
.
.
.
si BandePassante = 7 alors
BP = 7000000
fin si
.
.
.
#Pour la Bande III
pour F = 174000000 + BP/2 à 230000000 pas BP
ListeFréquence.Ajouter( F, BP )
prochain F
C'est une règle généraliste que j'ai déduite de mes pérégrinations sur Internet. Hélas, il y aura surement des exceptions dans certains pays.
Mais pour la France, c'est OK (l'offset s'ajoute après).
Voici le vrai code, ça sera peut-être plus clair ?:
- Code: Tout sélectionner
Public Sub CalculFrequenceDVBT(Bbw As BandwidthAndBand, Ofs As Offset)
.
.
.
If (Bbw And BandwidthAndBand.BW7B3) = BandwidthAndBand.BW7B3 Then
If Ofs.None Then
ajoutFrequence(3, 7, 0)
End If
If Ofs.OS125 Then
ajoutFrequence(3, 7, 125)
End If
If Ofs.OS166 Then
ajoutFrequence(3, 7, 166)
End If
If Ofs.OS167 Then
ajoutFrequence(3, 7, 167)
End If
End If
.
.
.
End Sub
.
.
.
Private Sub ajoutFrequence(ba As Integer, bw As Integer, ofs As Integer)
Dim debut As Integer
Dim fin As Integer
Dim bp As Integer = bw * 1000000
Dim ofs2 As Integer = ofs * 1000
Select Case ba
Case 1
debut = 54000000
fin = 88000000
Case 3
debut = 174000000
fin = 230000000
Case 4
debut = 470000000
fin = 606000000
Case 5
debut = 606000000
fin = 86200000
Case Else
End Select
For i As Integer = CInt((debut + (bp / 2))) To fin Step bp
listeFrequenceDVBT.Add(New DVBTParam(i + ofs2, bw))
Next
End Sub
.
.
.


